/* Nexzora Creation - Base Styles (shared) */
:root {
  --bg: #F8F5F0;
  --beige: #F0EBE3;
  --cream: #FFFDF9;
  --gold: #C9A227;
  --gold-hover: #E0B94A;
  --gold-dark: #A88B1E;
  --charcoal: #2C2C2C;
  --gray: #6B6560;
  --border: #E8E0D5;
  --silver: #B8B8B8;
  --white: #FFFFFF;
  --shadow: 0 4px 20px rgba(44, 44, 44, 0.08);
  --shadow-hover: 0 8px 30px rgba(44, 44, 44, 0.12);
  --radius: 12px;
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Prevent horizontal shift + bounce at top/bottom */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--charcoal);
  line-height: 1.6;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  position: relative;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}
/* Locked when filter / lightbox / menu is open (top set by JS) */
body.no-scroll {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  left: 0;
  right: 0;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
button, .btn { cursor: pointer; border: none; font-family: inherit; transition: var(--transition); }


/* ===== LOADER ===== */
.page-loader {
  position: fixed;
  inset: 0;
  background: #F8F5F0;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
  transition: opacity 0.35s ease;
}

.page-loader.hide {
  opacity: 0;
  pointer-events: none;
}

.loader-logo {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  border-radius: 50%;

  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);

  transform-origin: center;
  will-change: transform, opacity;

  animation: pulse 2.5s ease-in-out forwards;
}

.loader-logo img {
  width: 70px;
  height: auto;
}

/* Zoom in → zoom out → full-screen zoom and fade */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  30% {
    transform: scale(1.35);
    opacity: 1;
  }

  48% {
    transform: scale(0.8);
    opacity: 1;
  }

  100% {
    transform: scale(35);
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .loader-logo {
    width: 90px;
    height: 90px;
  }

  .loader-logo img {
    width: 58px;
  }
}


/* ===== TOP BAR ===== */
.top-bar {
  background: var(--charcoal); color: var(--cream);
  text-align: center; padding: 8px 16px; font-size: 0.85rem; letter-spacing: 0.3px;
}
.top-bar span { color: var(--gold); }

/* ===== HEADER ===== */
.header {
  background: var(--cream); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  width: 100%;
  max-width: 100%;
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; height: 72px;
}
.logo { display: flex; align-items: center; gap: -20px; }
.logo img { height: 48px; width: auto; }
.logo-text { font-size: 1.1rem; font-weight: 600; letter-spacing: 1px; color: var(--charcoal); }
.logo-text span { color: var(--gold); font-weight: 400; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a {
  font-size: 0.92rem; font-weight: 500; color: var(--charcoal);
  position: relative; padding: 4px 0;
}
.nav a:hover, .nav a.active { color: var(--gold); }
.nav a.active::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 100%;
  height: 2px; background: var(--gold);
}
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-actions a, .header-actions button {
  background: none; position: relative; color: var(--charcoal); font-size: 1.2rem;
}
.header-actions a:hover, .header-actions button:hover { color: var(--gold); }
.badge {
  position: absolute; top: -6px; right: -8px; background: var(--gold); color: var(--charcoal);
  font-size: 0.65rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
}
.mobile-toggle { display: none; background: none; font-size: 1.5rem; color: var(--charcoal); }

/* Search Overlay */
.search-overlay {
  position: fixed; inset: 0; background: rgba(44,44,44,0.65); z-index: 2000;
  display: none; align-items: flex-start; justify-content: center; padding-top: 80px;
}
.search-overlay.active { display: flex; }
.search-box {
  background: var(--cream); width: 92%; max-width: 620px; border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-hover); position: relative;
}
.search-box input {
  width: 100%; padding: 14px 48px 14px 18px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 1rem; outline: none; background: var(--white);
}
.search-box input:focus { border-color: var(--gold); }
.search-results {
  margin-top: 16px; max-height: 360px; overflow-y: auto;
}
.search-result-item {
  display: flex; align-items: center; gap: 14px; padding: 12px;
  border-radius: 8px; cursor: pointer; transition: var(--transition);
}
.search-result-item:hover { background: var(--beige); }
.search-result-item img {
  width: 56px; height: 56px; object-fit: cover; border-radius: 6px; background: var(--beige);
}
.search-result-item .info h4 { font-size: 0.95rem; margin-bottom: 2px; }
.search-result-item .info p { font-size: 0.85rem; color: var(--gold); font-weight: 600; }
.search-close-btn {
  position: absolute; top: 16px; right: 16px; background: none; font-size: 1.3rem; color: var(--gray);
}

/* ===== COMMON SECTIONS ===== */
.section { max-width: 1280px; margin: 0 auto; padding: 50px 20px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header .label {
  font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold); font-weight: 500; margin-bottom: 8px;
}
.section-header h2 { font-size: 2.2rem; font-weight: 700; color: var(--charcoal); margin-bottom: 10px; }
.section-header p { color: var(--gray); max-width: 560px; margin: 0 auto; }

.btn-primary {
  background: var(--gold); color: var(--charcoal); padding: 14px 28px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { background: var(--gold-hover); transform: translateY(-2px); }
.btn-outline {
  background: transparent; border: 1.5px solid var(--gold); color: var(--charcoal);
  padding: 13px 26px; border-radius: 8px; font-weight: 600; font-size: 0.95rem;
}
.btn-outline:hover { background: var(--gold); color: var(--charcoal); }

/* Products */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: var(--cream); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); transition: var(--transition); position: relative;
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.product-img { position: relative; aspect-ratio: 1; background: var(--beige); overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-img img { transform: scale(1.05); }
.wishlist-btn {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; background: var(--white);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1); color: var(--gray); font-size: 1rem; z-index: 2;
}
.wishlist-btn:hover, .wishlist-btn.active { color: #e74c3c; }
.product-badge {
  position: absolute; top: 12px; left: 12px; background: var(--gold); color: var(--charcoal);
  font-size: 0.7rem; font-weight: 600; padding: 4px 10px; border-radius: 20px; z-index: 2;
}
.product-info { padding: 16px; overflow: hidden; }
.product-category { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); margin-bottom: 4px; }
.product-info h3 {
  font-size: 1rem; font-weight: 600; margin-bottom: 6px; line-height: 1.3;
  /* Prevent long names from breaking 2-column layout */
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.product-rating { display: flex; align-items: center; gap: 4px; font-size: 0.85rem; color: var(--gold); margin-bottom: 8px; }
.product-rating span { color: var(--gray); font-size: 0.8rem; }
.product-price { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.product-price .current { font-size: 1.15rem; font-weight: 700; color: var(--charcoal); }
.product-price .original { font-size: 0.9rem; color: var(--gray); text-decoration: line-through; }
.btn-view {
  width: 100%; background: var(--charcoal); color: var(--cream); padding: 10px;
  border-radius: 8px; font-weight: 600; font-size: 0.9rem; text-align: center; display: block;
}
.btn-view:hover { background: var(--gold); color: var(--charcoal); }

/* Page Header */
.page-header {
  max-width: 1280px; margin: 0 auto; padding: 40px 20px 20px;
  display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px;
}
.page-header .left .label { font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.page-header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.page-header p { color: var(--gray); font-size: 0.95rem; }
.filters-btn {
  background: var(--charcoal); color: var(--cream); padding: 10px 20px; border-radius: 8px;
  font-weight: 600; display: flex; align-items: center; gap: 8px;
}
.filters-btn:hover { background: var(--gold); color: var(--charcoal); }

/* Filter Panel */
.filter-panel {
  position: fixed; top: 0; right: -380px; width: 360px; height: 100%;
  background: var(--cream); box-shadow: -4px 0 30px rgba(0,0,0,0.12); z-index: 1500;
  transition: right 0.35s ease; padding: 24px; overflow-y: auto;
  overscroll-behavior: contain; /* filter scrolls itself, page stays fixed */
  -webkit-overflow-scrolling: touch;
}
.filter-panel.active { right: 0; }
.filter-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1400; display: none;
  overscroll-behavior: none; touch-action: none;
}
.filter-overlay.active { display: block; }
.filter-panel h3 { font-size: 1.2rem; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.filter-group { margin-bottom: 24px; }
.filter-group h4 { font-size: 0.9rem; margin-bottom: 12px; color: var(--charcoal); }
.filter-group label { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 0.9rem; cursor: pointer; }
.filter-group input[type="checkbox"] { accent-color: var(--gold); width: 16px; height: 16px; }
.color-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.color-swatch {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; position: relative;
}
.color-swatch.active, .color-swatch:hover { border-color: var(--gold); }
.color-swatch input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }

/* Product Detail & Lightbox – base rules (product.css adds responsive overrides) */
.product-detail {
  max-width: 1280px;
  margin: 0 auto;
  padding: 30px 20px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}
.product-detail > * {
  min-width: 0;
  max-width: 100%;
}
.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 20px 0;
  font-size: 0.9rem;
  color: var(--gray);
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
}
.breadcrumb a:hover { color: var(--gold); }
.product-gallery { position: relative; width: 100%; max-width: 100%; }
.main-image {
  background: var(--beige);
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: zoom-in;
  width: 100%;
  max-width: 100%;
}
.main-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbnails { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; width: 100%; }
.thumb {
  width: 72px; height: 72px; flex-shrink: 0; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; background: var(--beige);
}
.thumb.active, .thumb:hover { border-color: var(--gold); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  background: rgba(0,0,0,0.94);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: min(90%, 900px);
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-close {
  position: absolute; top: 20px; right: 28px; color: white; font-size: 2.2rem;
  background: none; cursor: pointer; z-index: 10;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,0.15);
  color: white; font-size: 1.3rem; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); z-index: 10;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-counter {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.8); font-size: 0.9rem;
}

/* Cart / Wishlist / Content */
.cart-page, .wishlist-page, .content-page {
  max-width: 1100px; margin: 0 auto; padding: 40px 20px 60px;
}
.content-page { max-width: 900px; }
.content-page h1 { font-size: 2.2rem; margin-bottom: 20px; }
.content-page p { color: var(--gray); margin-bottom: 16px; line-height: 1.8; }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 3rem; color: var(--silver); margin-bottom: 16px; }

/* Footer */
.footer { background: var(--charcoal); color: var(--cream); padding: 50px 20px 20px; margin-top: 40px; }
.footer-inner {
  max-width: 1280px; margin: 0 auto; display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}
.footer-brand img { height: 44px; margin-bottom: 14px; }
.footer-brand p { color: var(--silver); font-size: 0.9rem; line-height: 1.7; max-width: 280px; }
.footer h4 { font-size: 1rem; margin-bottom: 16px; color: var(--gold); }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: var(--silver); font-size: 0.9rem; }
.footer ul a:hover { color: var(--gold); }
.footer-bottom {
  max-width: 1280px; margin: 40px auto 0; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; font-size: 0.85rem; color: var(--silver);
}
.footer-bottom a { color: var(--gold); }
.powered { font-size: 0.8rem; }
.powered span { color: var(--gold); }

/* Toast */
.nz-toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: #2C2C2C; color: #FFFDF9; padding: 12px 28px; border-radius: 8px;
  font-size: 0.95rem; z-index: 9999; opacity: 0; transition: opacity 0.3s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2); pointer-events: none;
}
.nz-toast.show { opacity: 1; }

/* ========== BACK TO TOP BUTTON ========== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s;
  cursor: pointer;
  border: none;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { background: var(--gold); color: var(--charcoal); }

/* ========== FILTER PANEL ACTIONS (Done / Cancel) ========== */
.filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--cream);
  padding-bottom: 8px;
}
.filter-actions .btn-filter-cancel {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--charcoal);
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}
.filter-actions .btn-filter-cancel:hover {
  border-color: var(--charcoal);
}
.filter-actions .btn-filter-done {
  background: var(--charcoal);
  color: var(--cream);
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}
.filter-actions .btn-filter-done:hover {
  background: var(--gold);
  color: var(--charcoal);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  /* Products: 2 per row on tablet */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .product-detail {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 24px 16px 48px;
  }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .nav { gap: 14px; }
  .nav a { font-size: 0.85rem; }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--cream);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    box-shadow: var(--shadow);
    z-index: 100;
  }
  .nav.active { display: flex; }
  .mobile-toggle { display: block; }

  /* Products stay 2 in a row on mobile */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .footer-inner { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
  .header-inner { height: 64px; }
  .logo img { height: 40px; }
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.1rem; }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }

  .filter-panel {
    width: 100%;
    max-width: 100%;
    right: -100%;
    overscroll-behavior: contain;
  }
  .product-detail {
    padding: 20px 14px 40px;
    gap: 24px;
  }
  .breadcrumb { padding: 14px 14px 0; }
  .thumb { width: 64px; height: 64px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .back-to-top {
    bottom: 20px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .section { padding: 36px 16px; }
  .page-header h1 { font-size: 1.6rem; }
  /* Still 2 product cards per row on small phones */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-info { padding: 10px; }
  .product-info h3 { font-size: 0.85rem; }
  .product-price .current { font-size: 0.9rem; }
  .btn-view { font-size: 0.75rem; padding: 8px; }
  .product-detail { padding: 16px 12px 36px; }
  .breadcrumb { padding: 12px 12px 0; font-size: 0.8rem; }
  .thumb { width: 56px; height: 56px; }
}
/* FAQ */
.faq-item { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; overflow: hidden; }
.faq-question { width: 100%; padding: 16px 20px; background: var(--cream); text-align: left; font-weight: 600; font-size: 1rem; display: flex; justify-content: space-between; align-items: center; }
.faq-answer { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; color: var(--gray); }
.faq-item.active .faq-answer { max-height: 300px; padding: 0 20px 16px; }
