@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Heebo', sans-serif; background: #f5f5f7; color: #1d1d1f; min-height: 100vh; }

/* Header */
.header { background: #fff; padding: 14px 0; box-shadow: 0 1px 3px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: center; min-height: 60px; }
.header-logo { display: flex; align-items: center; }
.header-logo img { height: 56px; display: block; }
.header-nav { max-width: 1200px; margin: 0 auto; padding: 4px 20px 12px; }
.header-back { display: inline-flex; align-items: center; gap: 6px; color: #014868; text-decoration: none; font-size: 14px; font-weight: 600; background: #e8f2f8; padding: 7px 16px; border-radius: 20px; transition: background 0.2s; }
.header-back:hover { background: #d0e8f5; text-decoration: none; }

/* Hero */
.hero { background: linear-gradient(135deg, #014868 0%, #01364d 100%); color: white; padding: 44px 24px; text-align: center; }
.hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.5px; }
.hero p { font-size: 18px; font-weight: 300; opacity: 0.9; max-width: 600px; margin: 0 auto 18px; }
.product-badge { display: inline-block; background: rgba(255,255,255,0.12); backdrop-filter: blur(10px); padding: 8px 20px; border-radius: 10px; font-size: 14px; border: 1px solid rgba(255,255,255,0.18); }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 36px 24px; }
.section-title { text-align: center; font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.section-subtitle { text-align: center; font-size: 15px; color: #86868b; margin-bottom: 36px; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

/* Card */
.card { background: #fff; border-radius: 18px; overflow: hidden; transition: all 0.3s ease; cursor: pointer; position: relative; border: 3px solid transparent; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.card.selected { border-color: #014868; box-shadow: 0 0 0 2px #014868, 0 12px 40px rgba(1,72,104,0.2); }
.card.selected .check-badge { opacity: 1; transform: scale(1); }
.check-badge { position: absolute; top: 14px; left: 14px; width: 32px; height: 32px; background: #014868; border-radius: 50%; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(0.5); transition: all 0.3s ease; z-index: 2; }
.check-badge svg { width: 18px; height: 18px; fill: white; }
.card-image { background: #fafafa; padding: 18px; display: flex; align-items: center; justify-content: center; height: 250px; position: relative; }
.card-image img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.3s ease; }
.card:hover .card-image img { transform: scale(1.05); }
.gallery-count { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,0.6); color: white; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 500; }
.card-body { padding: 16px; text-align: center; }
.color-name { font-size: 17px; font-weight: 600; margin-bottom: 3px; }
.color-name-en { font-size: 12px; color: #86868b; }
.color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-left: 6px; vertical-align: middle; border: 1px solid rgba(0,0,0,0.1); }

/* Lightbox */
.lightbox-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 1000; align-items: center; justify-content: center; flex-direction: column; }
.lightbox-overlay.active { display: flex; }
.lightbox-close { position: absolute; top: 16px; left: 16px; width: 40px; height: 40px; background: rgba(255,255,255,0.15); border: none; border-radius: 50%; color: white; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; }
.lightbox-close:hover { background: rgba(255,255,255,0.3); }
.lightbox-color-name { color: white; font-size: 18px; font-weight: 600; padding: 14px 60px 14px; text-align: center; background: rgba(0,0,0,0.55); width: 100%; }
.lightbox-color-name small { font-size: 13px; font-weight: 400; opacity: 0.7; margin-right: 8px; }
.lightbox-main { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 700px; margin: 0 auto; padding: 16px 56px; position: relative; min-height: 0; }
.lightbox-img-container { background: #fff; border-radius: 14px; padding: 20px; display: flex; align-items: center; justify-content: center; max-height: 58vh; width: 100%; }
.lightbox-img-container img { max-width: 100%; max-height: 50vh; object-fit: contain; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; background: rgba(255,255,255,0.15); border: none; border-radius: 50%; color: white; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-nav.prev { right: -52px; }
.lightbox-nav.next { left: -52px; }
.lightbox-counter { color: rgba(255,255,255,0.6); font-size: 12px; margin-bottom: 6px; }
.lightbox-thumbs { display: flex; gap: 6px; padding: 6px 24px 80px; overflow-x: auto; max-width: 100%; justify-content: center; }
.lightbox-thumbs::-webkit-scrollbar { height: 3px; }
.lightbox-thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 2px; }
.thumb-item { width: 56px; height: 56px; flex-shrink: 0; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; opacity: 0.5; transition: all 0.2s; background: #fff; padding: 3px; }
.thumb-item.active { border-color: white; opacity: 1; }
.thumb-item:hover { opacity: 0.9; }
.thumb-item img { width: 100%; height: 100%; object-fit: contain; }
.lightbox-select-btn { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #014868; color: white; border: none; padding: 14px 48px; border-radius: 12px; font-size: 16px; font-weight: 700; font-family: 'Heebo', sans-serif; cursor: pointer; transition: background 0.2s, box-shadow 0.2s; z-index: 1010; box-shadow: 0 6px 24px rgba(0,0,0,0.45); white-space: nowrap; }
.lightbox-select-btn:hover { background: #015d85; box-shadow: 0 8px 28px rgba(0,0,0,0.55); }

/* Form */
.form-section { max-width: 560px; margin: 50px auto 0; background: #fff; border-radius: 18px; padding: 36px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.form-section h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; text-align: center; }
.form-section .form-desc { text-align: center; color: #86868b; margin-bottom: 28px; font-size: 14px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-group input { width: 100%; padding: 12px 14px; border: 1.5px solid #d2d2d7; border-radius: 10px; font-size: 15px; font-family: 'Heebo', sans-serif; transition: border-color 0.2s; background: #fff; }
.form-group input:focus { outline: none; border-color: #014868; box-shadow: 0 0 0 3px rgba(1,72,104,0.1); }
.selected-preview { display: none; align-items: center; gap: 14px; padding: 14px; background: #f5f5f7; border-radius: 10px; margin-bottom: 20px; }
.selected-preview.visible { display: flex; }
.selected-preview img { width: 54px; height: 54px; object-fit: contain; }
.selected-preview .info { font-size: 14px; font-weight: 500; }
.selected-preview .info small { display: block; color: #86868b; font-weight: 400; font-size: 12px; }
.submit-btn { width: 100%; padding: 14px; background: #014868; color: white; border: none; border-radius: 10px; font-size: 17px; font-weight: 600; font-family: 'Heebo', sans-serif; cursor: pointer; transition: all 0.2s; margin-top: 6px; }
.submit-btn:hover { background: #015d85; transform: translateY(-1px); }
.submit-btn:disabled { background: #d2d2d7; cursor: not-allowed; transform: none; }
.success-message { display: none; text-align: center; padding: 36px; }
.success-message.visible { display: block; }
.success-icon { width: 72px; height: 72px; background: #34c759; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.success-icon svg { width: 36px; height: 36px; fill: white; }
.success-message h3 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.success-message p { color: #86868b; font-size: 15px; }

.footer { text-align: center; padding: 36px 24px; color: #86868b; font-size: 12px; }

@media (max-width: 768px) {
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 16px; }
    .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .card-image { height: 170px; padding: 12px; }
    .card-body { padding: 10px; }
    .color-name { font-size: 14px; }
    .form-section { margin: 36px 0 0; padding: 20px; }
    .lightbox-main { padding: 12px 12px; max-width: 100%; }
    .lightbox-img-container { max-height: 48vh; padding: 14px; }
    .lightbox-img-container img { max-height: 40vh; }
    .lightbox-nav { width: 32px; height: 32px; font-size: 16px; }
    .lightbox-nav.prev { right: 4px; }
    .lightbox-nav.next { left: 4px; }
    .thumb-item { width: 44px; height: 44px; }
}
@media (max-width: 400px) { .grid { grid-template-columns: 1fr; } }
