/* Elegantex Textiles - B2B Product Catalog */
:root {
  --gold: #b8956a; --gold-light: #d4c5a9; --dark: #1a1a1a; --text: #2d2d2d;
  --mid: #666; --light: #999; --bg: #faf8f5; --white: #fff; --border: #e8e5df;
  --red: #c0392b; --font-en: 'Helvetica Neue', Arial, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-en); color: var(--text); background: var(--white); line-height: 1.6; }

/* ── Navigation ── */
.nav { position: fixed; top: 0; width: 100%; z-index: 1000; background: rgba(255,255,255,0.97); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; }
.nav-logo { font-size: 1.3rem; font-weight: 700; color: var(--gold); letter-spacing: 1px; text-decoration: none; }
.nav-logo span { color: var(--dark); font-weight: 400; font-size: 0.8rem; display: block; letter-spacing: 0; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text); font-size: 0.85rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; transition: color 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--dark); transition: 0.3s; }

/* ── Hero Carousel (fixed) ── */
.hero { margin-top: 68px; position: relative; width: 100%; height: 65vh; min-height: 400px; overflow: hidden; background: var(--dark); }
.hero-slides { display: flex; width: 100%; height: 100%; transition: transform 0.5s ease-in-out; will-change: transform; }
.hero-slide { flex: 0 0 100%; width: 100%; height: 100%; position: relative; display: flex; align-items: center; justify-content: center; }
.hero-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.65; }
.hero-text { position: relative; z-index: 2; text-align: center; color: var(--white); padding: 20px; max-width: 700px; }
.hero-text h1 { font-size: 2.6rem; font-weight: 700; letter-spacing: 2px; margin-bottom: 10px; }
.hero-text p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 20px; }
.hero-cta { display: inline-block; padding: 12px 32px; background: var(--gold); color: var(--white); text-decoration: none; font-weight: 600; letter-spacing: 1px; border-radius: 2px; transition: background 0.3s; }
.hero-cta:hover { background: #a07d4a; }
.hero-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 3; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--white); background: transparent; cursor: pointer; padding: 0; transition: 0.3s; }
.hero-dots button.active { background: var(--gold); border-color: var(--gold); }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(0,0,0,0.3); border: none; color: var(--white); font-size: 1.8rem; width: 44px; height: 44px; cursor: pointer; border-radius: 50%; transition: 0.3s; display: flex; align-items: center; justify-content: center; }
.hero-arrow:hover { background: rgba(0,0,0,0.6); }
.hero-arrow.prev { left: 15px; }
.hero-arrow.next { right: 15px; }

/* ── Sections ── */
.section { padding: 70px 20px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 45px; }
.section-title h2 { font-size: 1.8rem; color: var(--dark); letter-spacing: 1px; margin-bottom: 8px; }
.section-title p { color: var(--mid); font-size: 0.95rem; }
.section-title .line { width: 50px; height: 2px; background: var(--gold); margin: 12px auto; }

/* ── Category Cards ── */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-card { position: relative; overflow: hidden; border-radius: 4px; aspect-ratio: 4/3; cursor: pointer; text-decoration: none; display: block; }
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.cat-card:hover img { transform: scale(1.05); }
.cat-card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.75), transparent 50%); display: flex; flex-direction: column; justify-content: flex-end; padding: 25px; color: var(--white); }
.cat-card-overlay h3 { font-size: 1.4rem; margin-bottom: 5px; }
.cat-card-overlay p { opacity: 0.85; font-size: 0.85rem; }
.cat-card-badge { position: absolute; top: 12px; right: 12px; background: var(--gold); color: var(--white); padding: 4px 14px; font-size: 0.75rem; font-weight: 600; border-radius: 2px; }

/* ── Features ── */
.features { background: var(--bg); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-item { text-align: center; padding: 25px 15px; }
.feature-icon { font-size: 2.2rem; margin-bottom: 12px; }
.feature-item h4 { font-size: 0.95rem; margin-bottom: 6px; color: var(--dark); }
.feature-item p { font-size: 0.8rem; color: var(--mid); }

/* ── Tabs ── */
.tabs { display: flex; justify-content: center; gap: 4px; margin-bottom: 35px; }
.tab-btn { padding: 10px 28px; border: 1px solid var(--border); background: var(--white); cursor: pointer; font-size: 0.85rem; font-weight: 500; letter-spacing: 1px; transition: 0.3s; color: var(--mid); border-radius: 2px; }
.tab-btn.active { background: var(--gold); color: var(--white); border-color: var(--gold); }
.tab-btn:hover:not(.active) { border-color: var(--gold); color: var(--gold); }

.loading { text-align: center; padding: 40px; color: var(--mid); grid-column: 1 / -1; font-size: 1rem; }

/* ── Product Grid (4 columns) ── */
.tab-content { display: none; }
.tab-content.active { display: block; }
.product-grid { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 15px; }

/* ── Product Card (Rounded, B2B style) ── */
.product-card { border: 1px solid #e8e8e8; border-radius: 10px; overflow: hidden; background: var(--white); transition: all 0.25s; display: flex; flex-direction: column; }
.product-card:hover { border-color: #d0d0d0; box-shadow: 0 4px 16px rgba(0,0,0,0.09); transform: translateY(-2px); }
.product-card-img { position: relative; width: 100%; aspect-ratio: 1; background: #f7f7f7; overflow: hidden; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-body { padding: 12px 14px 10px; text-align: center; flex: 1; display: flex; flex-direction: column; }
.product-card-body .code { font-size: 0.82rem; color: var(--dark); font-weight: 600; margin-bottom: 4px; }
.product-card-body .price { color: var(--red); font-weight: 700; font-size: 1rem; margin-bottom: 8px; }
.product-card-body .moq { font-size: 0.7rem; color: var(--light); margin-bottom: 10px; }
.btn-view { display: inline-block; padding: 8px 22px; background: var(--gold); color: #fff; border: none; border-radius: 6px; font-size: 0.78rem; font-weight: 600; cursor: pointer; letter-spacing: 0.5px; transition: background 0.3s; text-decoration: none; margin-top: auto; }
.btn-view:hover { background: #a07d4a; }

/* ── Product Detail Modal ── */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,0.85); align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal { background: var(--white); border-radius: 4px; max-width: 800px; width: 100%; max-height: 92vh; overflow-y: auto; position: relative; display: flex; flex-direction: column; }
@media (min-width: 640px) { .modal { flex-direction: row; } }
.modal-close { position: absolute; top: 10px; right: 14px; background: rgba(0,0,0,0.5); color: var(--white); border: none; font-size: 1.4rem; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; z-index: 5; line-height: 30px; text-align: center; transition: 0.3s; }
.modal-close:hover { background: rgba(0,0,0,0.8); }
.modal-img-wrap { flex: 0 0 50%; background: #f5f5f5; display: flex; align-items: center; justify-content: center; min-height: 350px; }
.modal-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { flex: 1; padding: 28px 24px; }
.modal-body h3 { font-size: 1.1rem; margin-bottom: 6px; color: var(--dark); font-weight: 700; }
.modal-body .modal-price { font-size: 1.4rem; color: var(--red); font-weight: 700; margin-bottom: 6px; }
.modal-body .modal-moq { display: inline-block; background: var(--gold); color: var(--white); padding: 5px 16px; font-size: 0.8rem; font-weight: 600; border-radius: 2px; margin-bottom: 16px; }
.modal-specs { display: flex; flex-direction: column; gap: 8px; }
.modal-spec-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.modal-spec-item:last-child { border-bottom: none; }
.modal-spec-item .label { font-size: 0.78rem; color: var(--light); text-transform: uppercase; letter-spacing: 0.5px; }
.modal-spec-item .value { font-size: 0.88rem; color: var(--dark); font-weight: 500; text-align: right; }

/* ── About & Contact ── */
.about-header { margin-top: 68px; padding: 70px 20px; background: var(--bg); text-align: center; }
.about-header h1 { font-size: 2.2rem; margin-bottom: 8px; }
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; align-items: start; }
.about-text h3 { font-size: 1.2rem; margin-bottom: 12px; color: var(--gold); }
.about-text p { margin-bottom: 12px; color: var(--mid); line-height: 1.7; }
.about-image img { width: 100%; border-radius: 4px; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 25px; }
.gallery-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; cursor: pointer; transition: transform 0.3s; }
.gallery-grid img:hover { transform: scale(1.05); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 45px; }
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.contact-form input, .contact-form textarea, .contact-form select { padding: 13px; border: 1px solid var(--border); font-size: 0.9rem; font-family: inherit; border-radius: 2px; transition: border-color 0.3s; }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { outline: none; border-color: var(--gold); }
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form button { padding: 13px 28px; background: var(--gold); color: var(--white); border: none; font-size: 0.95rem; font-weight: 600; letter-spacing: 1px; cursor: pointer; border-radius: 2px; transition: background 0.3s; }
.contact-form button:hover { background: #a07d4a; }
.contact-info-item { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.contact-info-icon { font-size: 1.4rem; min-width: 36px; text-align: center; }
.contact-info-item h4 { font-size: 0.95rem; margin-bottom: 2px; }
.contact-info-item p, .contact-info-item a { color: var(--mid); font-size: 0.85rem; text-decoration: none; }
.form-success { display: none; padding: 16px; background: #e8f5e9; color: #2e7d32; border-radius: 4px; text-align: center; font-weight: 500; margin-bottom: 14px; }

/* ── Footer ── */
.footer { background: var(--dark); color: var(--white); padding: 45px 20px 20px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 35px; margin-bottom: 25px; }
.footer-col h4 { color: var(--gold); margin-bottom: 12px; font-size: 0.95rem; letter-spacing: 1px; }
.footer-col p, .footer-col a { color: #aaa; font-size: 0.85rem; line-height: 1.8; text-decoration: none; display: block; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { max-width: 1200px; margin: 0 auto; border-top: 1px solid #333; padding-top: 18px; text-align: center; color: #666; font-size: 0.8rem; }

/* ── Loading / Empty ── */
.loading { text-align: center; padding: 40px; color: var(--mid); grid-column: 1 / -1; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .about-content, .contact-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-text h1 { font-size: 2rem; }
  .modal-specs { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 68px; left: 0; width: 100%; background: var(--white); flex-direction: column; gap: 0; border-bottom: 1px solid var(--border); }
  .nav-links.active { display: flex; }
  .nav-links a { padding: 14px 20px; border-top: 1px solid var(--border); }
  .nav-toggle { display: flex; }
  .hero { height: 45vh; min-height: 280px; }
  .hero-text h1 { font-size: 1.6rem; }
  .hero-text p { font-size: 0.9rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 45px 15px; }
  .hero-arrow { display: none; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-card-body { padding: 8px 10px; }
  .hero-text h1 { font-size: 1.3rem; }
  .tabs { flex-wrap: wrap; }
  .modal { margin: 10px; }
}


/* Email Popup */
.popup-overlay { display: none; position: fixed; inset: 0; z-index: 5000; background: rgba(0,0,0,0.7); align-items: center; justify-content: center; padding: 20px; }
.popup-overlay.active { display: flex; }
.popup { background: #fff; border-radius: 12px; max-width: 480px; width: 100%; padding: 35px 30px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.popup h3 { font-size: 1.4rem; margin-bottom: 8px; color: var(--dark); }
.popup p { color: var(--mid); font-size: 0.9rem; margin-bottom: 20px; }
.popup input[type=email] { width: 100%; padding: 12px 15px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.95rem; margin-bottom: 18px; }
.popup input[type=email]:focus { outline: none; border-color: var(--gold); }
.popup-label { font-weight: 600; color: var(--dark); margin-bottom: 10px; font-size: 0.9rem; text-align: left; }
.popup-radio-group { text-align: left; margin-bottom: 18px; }
.popup-radio { display: flex; align-items: center; gap: 8px; padding: 8px 0; cursor: pointer; font-size: 0.88rem; color: var(--text); }
.popup-radio input[type=radio] { accent-color: var(--gold); width: 16px; height: 16px; }
.popup button[type=submit] { width: 100%; padding: 13px; background: var(--gold); color: #fff; border: none; border-radius: 6px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.3s; }
.popup button[type=submit]:hover { background: #a07d4a; }
.popup-skip { background: none; border: none; color: var(--light); cursor: pointer; font-size: 0.8rem; margin-top: 12px; text-decoration: underline; }
.popup-skip:hover { color: var(--mid); }

.fab-section { display: none; }
.fab-section.active { display: block; }
.fab-desc { text-align: center; color: var(--mid); font-size: 0.9rem; margin-bottom: 25px; max-width: 700px; margin-left: auto; margin-right: auto; }
.fab-tab-btn { padding: 10px 20px; border: 1px solid var(--border); background: var(--white); cursor: pointer; font-size: 0.82rem; font-weight: 500; letter-spacing: 0.5px; transition: 0.3s; color: var(--mid); border-radius: 2px; white-space: nowrap; }
.fab-tab-btn.active { background: var(--gold); color: var(--white); border-color: var(--gold); }
.fab-tab-btn:hover:not(.active) { border-color: var(--gold); color: var(--gold); }

/* Dropdown Menu */
.nav-dropdown { position: relative; }
.nav-dropdown .dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; min-width: 200px; border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 8px 24px rgba(0,0,0,0.1); z-index: 1001; list-style: none; padding: 5px 0; }
.nav-dropdown:hover .dropdown-menu { display: block; }
.nav-dropdown .dropdown-menu li { display: block; }
.nav-dropdown .dropdown-menu a { display: block; padding: 10px 18px; color: var(--text); font-size: 0.82rem; text-transform: none; letter-spacing: 0.3px; border-bottom: 1px solid #f5f5f5; }
.nav-dropdown .dropdown-menu a:hover { background: var(--bg); color: var(--gold); }
.nav-dropdown .dropdown-menu li:last-child a { border-bottom: none; }
.nav-dropdown > a::after { content: ' \25BE'; font-size: 0.7rem; }
@media (max-width: 768px) {
  .nav-dropdown .dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 15px; display: none; }
  .nav-dropdown.open .dropdown-menu { display: block; }
}

.product-card-img .img-badge { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.65); color: #fff; padding: 3px 8px; font-size: 0.65rem; font-weight: 600; border-radius: 3px; letter-spacing: 0.5px; }
