/* ============================================================
   CHIEF COLLECTION — Main Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --clr-bg:         #FFFFFF;
  --clr-surface:    #FFFFFF;
  --clr-ink:        #000000;
  --clr-ink-soft:   #444444;
  --clr-ink-muted:  #888888;
  --clr-border:     #E0E0E0;
  --clr-card-bg:    #F5F5F5;
  --clr-btn:        #000000;
  --clr-btn-text:   #FFFFFF;
  --clr-badge-new:  #000000;
  --clr-badge-sale: #E02020;
  --clr-badge-hot:  #E67E22;

  --ff-body: 'Inter', system-ui, sans-serif;

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-pill: 999px;

  --transition: 0.2s ease;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--clr-bg);
  color: var(--clr-ink);
  font-family: var(--ff-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ── Page wrapper ─────────────────────────────────────────── */
main,
body > h1,
body > .category-pills,
body > .no-results,
body > .product-grid {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
  gap: 12px;
}

/* Logo — prominent */
.logo a {
  font-family: var(--ff-body);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-ink);
  white-space: nowrap;
}

/* Search toggle */
.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--clr-ink);
  display: flex;
  align-items: center;
  padding: 8px;
  margin-left: auto;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  transition: opacity var(--transition);
}
.search-toggle:hover { opacity: 0.5; }

/* Search bar — stays within header, close button always visible */
.search-bar-header {
  display: none;
  align-items: center;
  gap: 8px;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 60px;
  background: var(--clr-surface);
  padding: 0 12px;
  z-index: 10;
  border-bottom: 1px solid var(--clr-border);
  /* Prevent overflow — critical fix */
  overflow: hidden;
  width: 100%;
}
.search-bar-header.open { display: flex; }

/* Close button — left side, always reachable */
.search-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--clr-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  transition: opacity var(--transition);
}
.search-close:hover { opacity: 0.5; }

/* Input wrap fills remaining space */
.search-input-wrap {
  flex: 1;
  min-width: 0; /* prevents overflow */
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--clr-card-bg);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-pill);
  padding: 0 14px;
  height: 38px;
  transition: border-color var(--transition);
  overflow: hidden;
}
.search-input-wrap:focus-within { border-color: var(--clr-ink); }
.search-input-icon { color: var(--clr-ink-muted); flex-shrink: 0; }

#search-input {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--ff-body);
  font-size: 14px;
  color: var(--clr-ink);
  flex: 1;
  min-width: 0;
  width: 100%;
}
#search-input::placeholder { color: var(--clr-ink-muted); }

/* ── Hamburger ────────────────────────────────────────────── */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--clr-ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hamburger Panel ──────────────────────────────────────── */
.hamburger-menu {
  position: fixed;
  top: 60px;
  right: -280px;
  width: 260px;
  height: calc(100vh - 60px);
  background: var(--clr-surface);
  border-left: 1px solid var(--clr-border);
  z-index: 400;
  transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}
.hamburger-menu.open { right: 0; }

.menu-content {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.menu-content h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-ink-muted);
  margin-bottom: 12px;
}
.menu-content a {
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--clr-ink);
  border-bottom: 1px solid var(--clr-border);
  transition: opacity var(--transition);
}
.menu-content a:hover { opacity: 0.5; }

.currency-switcher {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.currency-switcher label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-ink-muted);
}
#currency-select {
  padding: 10px 12px;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  background: var(--clr-bg);
  font-family: var(--ff-body);
  font-size: 14px;
  color: var(--clr-ink);
  cursor: pointer;
  outline: none;
}
#currency-select:focus { border-color: var(--clr-ink); }

/* ============================================================
   INDEX PAGE
   ============================================================ */

/* Tagline — smaller than logo, clearly subordinate */
body > h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 20px;
  margin-bottom: 4px;
  color: var(--clr-ink);
}

body > .search-container { display: none !important; }

/* ── Category Pills ───────────────────────────────────────── */
.category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-top: 14px;
  margin-bottom: 18px;
  scrollbar-width: none;
}
.category-pills::-webkit-scrollbar { display: none; }

.cat-pill {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--clr-border);
  background: var(--clr-surface);
  color: var(--clr-ink-soft);
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}
.cat-pill:hover { border-color: var(--clr-ink); color: var(--clr-ink); }
.cat-pill.active {
  background: var(--clr-ink);
  border-color: var(--clr-ink);
  color: #FFFFFF;
}

/* ── No Results ───────────────────────────────────────────── */
.no-results {
  text-align: center;
  color: var(--clr-ink-muted);
  padding: 60px 0;
  display: none;
}

/* ── Product Grid ─────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 48px;
}

/* ── Product Card ─────────────────────────────────────────── */
.product-card {
  background: var(--clr-surface);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ── Badge ────────────────────────────────────────────────── */
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
}
.badge.new         { background: var(--clr-badge-new); }
.badge.sale        { background: var(--clr-badge-sale); }
.badge.hot         { background: var(--clr-badge-hot); }
.badge.new-arrival { background: var(--clr-badge-new); }
.badge.best-seller { background: var(--clr-badge-new); }

/* ── Product Image
     Fixed aspect ratio so ALL cards are the same height
     regardless of uploaded image dimensions
   ──────────────────────────────────────────────────────────── */
.product-card > a {
  display: block;
  flex-shrink: 0;
}
.product-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  background: var(--clr-card-bg);
  display: block;
}

/* ── Product Info ─────────────────────────────────────────── */
.product-info {
  display: flex;
  flex-direction: column;
  padding: 10px 10px 0;
  flex: 1;
}

/* Name */
.product-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-ink);
  line-height: 1.35;
  margin-bottom: 8px;
}

/* Color swatches */
.color-swatches {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}
.color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  outline: 2px solid var(--clr-border);
  outline-offset: 1px;
  transition: outline-color var(--transition), transform var(--transition);
  flex-shrink: 0;
}
.color-swatch:hover,
.color-swatch.active {
  outline-color: var(--clr-ink);
  transform: scale(1.1);
}

/* Size selector — compact, text centered */
.size-selector {
  display: flex;
  align-items: center;
  margin-bottom: 7px;
}
.size-selector label { display: none; }

.size-selector select {
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-pill);
  background: var(--clr-surface);
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--clr-ink);
  /* Compact height */
  padding: 4px 0;
  height: 30px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
  text-align: center;
  text-align-last: center;
  line-height: 1;
}
.size-selector select:focus { border-color: var(--clr-ink); }

/* Price */
.product-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--clr-ink);
  margin-bottom: 10px;
}

/* Add to Bag button
   Slightly rounded bottom corners to follow card,
   small side margin — does not touch card edges
   sits right at the bottom of the card */
.add-to-cart-btn {
  display: block;
  width: calc(100% + 20px);
  margin: auto -10px 0;
  padding: 11px 0;
  background: var(--clr-btn);
  color: var(--clr-btn-text);
  border: none;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  border-radius: 0 0 10px 10px;
  transition: opacity var(--transition);
  text-align: center;
}
.add-to-cart-btn:hover:not(:disabled) { opacity: 0.75; }
.add-to-cart-btn:disabled {
  background: #CCCCCC;
  color: #888888;
  cursor: not-allowed;
}

/* ============================================================
   PRODUCT DETAIL PAGE
   ============================================================ */

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-top: 32px;
  margin-bottom: 64px;
  padding: 0 16px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 72px;
}

.main-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--clr-card-bg);
  border: 1.5px solid var(--clr-border);
  aspect-ratio: 3 / 4;
}
.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-strip { display: flex; gap: 8px; flex-wrap: wrap; }

.thumb {
  width: 68px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 2px solid var(--clr-border);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity var(--transition), border-color var(--transition);
}
.thumb:hover  { opacity: 1; }
.thumb.active { border-color: var(--clr-ink); opacity: 1; }

/* ── Detail Info ──────────────────────────────────────────── */
.product-info-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 1. Name + Stock on same line with space between */
.product-info-detail h1 {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.stock-status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  background: #E8F8EE;
  color: #1A7A3C;
  border: 1px solid #B8E8CB;
  flex-shrink: 0;
}

.product-info-detail .badge {
  position: static;
  display: inline-block;
  width: fit-content;
}

/* 2. Color swatches */
.product-info-detail .color-swatches { gap: 10px; }
.product-info-detail .color-swatch   { width: 24px; height: 24px; }

/* 3. Size selector */
.product-info-detail .size-selector {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.product-info-detail .size-selector label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-ink-muted);
}
.product-info-detail .size-selector select {
  width: 100%;
  max-width: 200px;
  padding: 10px 14px;
  height: auto;
  font-size: 14px;
  border-radius: var(--radius-md);
  text-align: left;
  text-align-last: left;
}

/* 4. Price */
.product-info-detail .product-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--clr-ink);
}

/* 5. Quantity stepper */
.detail-qty-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.detail-qty-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-ink-muted);
}
.detail-qty-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  width: fit-content;
}
.detail-qty-stepper button {
  width: 40px;
  height: 40px;
  background: var(--clr-card-bg);
  border: none;
  font-size: 18px;
  font-weight: 700;
  color: var(--clr-ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  line-height: 1;
}
.detail-qty-stepper button:hover { background: #E8E8E8; }
#detail-qty-value {
  width: 48px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--clr-ink);
  border-left: 1px solid var(--clr-border);
  border-right: 1px solid var(--clr-border);
  line-height: 40px;
  display: inline-block;
  user-select: none;
}

/* 6. Action buttons */
.product-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.product-actions .add-to-cart-btn {
  width: 100%;
  margin: 0;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  letter-spacing: 0.04em;
}
.buy-now-btn {
  padding: 14px 0;
  width: 100%;
  background: #25D366;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition);
}
.buy-now-btn:hover:not(:disabled) { opacity: 0.85; }
.buy-now-btn:disabled { background: #CCCCCC; color: #888; cursor: not-allowed; }

.share-btn {
  padding: 12px 0;
  width: 100%;
  background: transparent;
  color: var(--clr-ink);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition);
}
.share-btn:hover { border-color: var(--clr-ink); }

/* 7. Description — last */
.product-description {
  font-size: 14px;
  color: var(--clr-ink-soft);
  line-height: 1.7;
  padding-top: 16px;
  border-top: 1px solid var(--clr-border);
}
.product-description p            { margin-bottom: 10px; }
.product-description p:last-child { margin-bottom: 0; }

/* ── Related Products ─────────────────────────────────────── */
.related-products {
  padding: 0 16px 64px;
  max-width: 1100px;
  margin: 0 auto;
}
.related-products h2 {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 800;
  margin-bottom: 20px;
}
.related-products .product-grid { margin-bottom: 0; }

/* ============================================================
   CART / BAG
   ============================================================ */

/* Fly-to-bag animation */
@keyframes bagBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.3); }
  50%  { transform: scale(0.9); }
  70%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
#cart-icon.bag-bounce { animation: bagBounce 0.5s ease forwards; }

/* Floating Bag Icon */
#cart-icon {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 52px;
  height: 52px;
  background: var(--clr-ink);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 1000;
  transition: opacity var(--transition), transform var(--transition);
}
#cart-icon:hover { opacity: 0.85; transform: scale(1.06); }

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #E02020;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Bag Slide-out */
.cart-slideout {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  max-width: 100vw;
  height: 100vh;
  background: var(--clr-surface);
  border-left: 1px solid var(--clr-border);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: right 0.32s cubic-bezier(0.4,0,0.2,1);
}
.cart-slideout.open { right: 0; }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--clr-border);
  flex-shrink: 0;
}
.cart-header h3 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
#close-cart {
  background: none;
  border: 1.5px solid var(--clr-border);
  font-size: 13px;
  cursor: pointer;
  color: var(--clr-ink);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: background var(--transition);
  line-height: 1.4;
}
#close-cart:hover { background: var(--clr-card-bg); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
}

.cart-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--clr-border);
}
.cart-item:last-child { border-bottom: none; }

.cart-item-img {
  width: 72px;
  height: 86px;
  object-fit: cover;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  background: var(--clr-card-bg);
  border: 1px solid var(--clr-border);
}

.cart-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cart-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--clr-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-meta {
  font-size: 12px;
  color: var(--clr-ink-muted);
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-btn {
  width: 28px;
  height: 28px;
  background: var(--clr-card-bg);
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--clr-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  line-height: 1;
}
.qty-btn:hover { background: #E0E0E0; }

.qty-value {
  width: 30px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--clr-ink);
  border-left: 1px solid var(--clr-border);
  border-right: 1px solid var(--clr-border);
  line-height: 28px;
  display: inline-block;
  user-select: none;
}

.cart-item-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--clr-ink);
  margin-left: auto;
}

.cart-item-remove {
  background: none;
  border: 1.5px solid #DDDDDD;
  color: #CC0000;
  font-family: var(--ff-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  margin-top: 6px;
  width: fit-content;
  transition: background var(--transition), border-color var(--transition);
}
.cart-item-remove:hover {
  background: #FFF0F0;
  border-color: #CC0000;
}

.cart-footer {
  padding: 18px 20px;
  border-top: 1px solid var(--clr-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}
.cart-total {
  font-size: 1.1rem;
  font-weight: 800;
  text-align: right;
  color: var(--clr-ink);
}
#whatsapp-order-btn {
  width: 100%;
  padding: 14px 0;
  background: #25D366;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition);
}
#whatsapp-order-btn:hover { opacity: 0.85; }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--clr-ink);
  color: #FFFFFF;
  padding: 36px 20px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 40px;
}

.footer-links {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  color: #AAAAAA;
  font-size: 13px;
  font-weight: 500;
  transition: color var(--transition);
}
.footer-links a:hover { color: #FFFFFF; }
.separator { color: #444444; font-size: 13px; }

.footer-social { display: flex; gap: 12px; align-items: center; justify-content: center; }
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid #333333;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), background var(--transition);
}
.footer-social a:hover { border-color: #FFFFFF; background: rgba(255,255,255,0.1); }
.footer-social a svg { display: none; }
.footer-social a::after {
  content: '';
  width: 18px;
  height: 18px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: block;
}
.footer-social a[aria-label="Facebook"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z'/%3E%3C/svg%3E");
}
.footer-social a[aria-label="Instagram"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='2' width='20' height='20' rx='5' ry='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.5' cy='6.5' r='1' fill='white' stroke='none'/%3E%3C/svg%3E");
}
.footer-social a[aria-label="Twitter"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.747l7.73-8.835L1.254 2.25H8.08l4.253 5.622zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E");
}
.footer-social a[aria-label="Whatsapp"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 0 1 2.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 0 0 5.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 0 0-3.48-8.413z'/%3E%3C/svg%3E");
}
.footer-social a[aria-label="Tiktok"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-2.88 2.5 2.89 2.89 0 0 1-2.89-2.89 2.89 2.89 0 0 1 2.89-2.89c.28 0 .54.04.79.1V9.01a6.33 6.33 0 0 0-.79-.05 6.34 6.34 0 0 0-6.34 6.34 6.34 6.34 0 0 0 6.34 6.34 6.34 6.34 0 0 0 6.33-6.34V8.69a8.18 8.18 0 0 0 4.78 1.52V6.75a4.85 4.85 0 0 1-1.01-.06z'/%3E%3C/svg%3E");
}

.copyright { font-size: 12px; color: #666; }

/* ============================================================
   CONTACT & PRIVACY — Static Pages
   ============================================================ */

.static-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

/* Hero */
.static-hero {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--clr-border);
  margin-bottom: 40px;
}
.static-hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--clr-ink);
}
.static-hero p {
  font-size: 15px;
  color: var(--clr-ink-soft);
  line-height: 1.6;
}

/* ── Contact Layout ───────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-form-wrap h2,
.contact-info-wrap h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clr-ink);
  margin-bottom: 6px;
}

.contact-sub {
  font-size: 13px;
  color: var(--clr-ink-muted);
  margin-bottom: 20px;
}

/* Form fields */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clr-ink-soft);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  background: var(--clr-bg);
  font-family: var(--ff-body);
  font-size: 14px;
  color: var(--clr-ink);
  outline: none;
  transition: border-color var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--clr-ink); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--clr-ink-muted); }

.contact-submit-btn {
  padding: 13px 0;
  width: 100%;
  background: #25D366;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: opacity var(--transition);
  margin-top: 4px;
}
.contact-submit-btn:hover { opacity: 0.75; }

/* Contact info items */
.contact-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 32px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.contact-info-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-info-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-ink-muted);
  margin-bottom: 4px;
}
.contact-info-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--clr-ink);
  text-decoration: none;
  line-height: 1.5;
}
a.contact-info-value:hover { text-decoration: underline; }

/* Social links on contact page */
.contact-social { display: flex; flex-direction: column; gap: 10px; }
.contact-social-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.contact-social-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--clr-ink-soft);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  transition: border-color var(--transition), color var(--transition);
}
.contact-social-link:hover {
  border-color: var(--clr-ink);
  color: var(--clr-ink);
}

/* ── Privacy Layout ───────────────────────────────────────── */
.privacy-content {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.privacy-section h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--clr-ink);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.privacy-section p {
  font-size: 14px;
  color: var(--clr-ink-soft);
  line-height: 1.75;
  margin-bottom: 10px;
}
.privacy-section p:last-child { margin-bottom: 0; }
.privacy-section ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
}
.privacy-section ul li {
  font-size: 14px;
  color: var(--clr-ink-soft);
  line-height: 1.65;
}
.privacy-section a {
  color: var(--clr-ink);
  text-decoration: underline;
  font-weight: 500;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  /* Product detail */
  .product-detail { grid-template-columns: 1fr; gap: 24px; margin-top: 20px; }
  .product-gallery { position: static; }
  .product-info-detail h1 { font-size: 1.2rem; }

  /* Contact */
  .contact-layout { grid-template-columns: 1fr; gap: 32px; }
  .contact-info-wrap { padding-top: 0; }
}

@media (max-width: 480px) {
  .product-grid  { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-name  { font-size: 12px; }
  .product-price { font-size: 13px; }
  .cart-slideout { width: 100vw; }
  .static-hero   { padding: 28px 0 24px; }
}

@media (max-width: 320px) {
  .product-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration:  0.01ms !important;
  }
}

/* ============================================================
   LOCALE SWITCHER — Language & Currency
   ============================================================ */

.menu-divider {
  border: none;
  border-top: 1px solid var(--clr-border);
  margin: 16px 0;
}

.locale-switcher {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.locale-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-ink-muted);
}

.locale-select-wrap {
  position: relative;
}

.locale-select {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  background: var(--clr-bg);
  font-family: var(--ff-body);
  font-size: 14px;
  color: var(--clr-ink);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color var(--transition);
}
.locale-select:focus { border-color: var(--clr-ink); }

/* ============================================================
   RTL SUPPORT — Arabic and other RTL languages
   ============================================================ */

[dir="rtl"] .site-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .search-toggle {
  margin-left: 0;
  margin-right: auto;
}

[dir="rtl"] .search-bar-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .hamburger-menu {
  right: auto;
  left: -280px;
  border-left: none;
  border-right: 1px solid var(--clr-border);
}

[dir="rtl"] .hamburger-menu.open {
  left: 0;
  right: auto;
}

[dir="rtl"] .product-info {
  text-align: right;
}

[dir="rtl"] .color-swatches {
  flex-direction: row-reverse;
}

[dir="rtl"] .cart-slideout {
  right: auto;
  left: -420px;
  border-left: none;
  border-right: 1px solid var(--clr-border);
}

[dir="rtl"] .cart-slideout.open {
  left: 0;
  right: auto;
}

[dir="rtl"] .cart-item {
  flex-direction: row-reverse;
}

[dir="rtl"] .cart-item-price {
  margin-left: 0;
  margin-right: auto;
}

[dir="rtl"] .cart-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .cart-total {
  text-align: left;
}

[dir="rtl"] #cart-icon {
  right: auto;
  left: 20px;
}

[dir="rtl"] .product-detail {
  direction: rtl;
}

[dir="rtl"] .product-info-detail h1 {
  flex-direction: row-reverse;
}

[dir="rtl"] .footer-links {
  flex-direction: row-reverse;
}

[dir="rtl"] .contact-layout {
  direction: rtl;
}

[dir="rtl"] .form-group label {
  text-align: right;
}

[dir="rtl"] .locale-select {
  background-position: left 12px center;
  padding: 10px 12px 10px 36px;
  text-align: right;
}

/* ============================================================
   FIX: Search bar should never distort page layout on close
   ============================================================ */
html, body {
  overflow-x: hidden;
  width: 100%;
}

/* ============================================================
   BAG ICON COUNT — changed from red to light blue
   ============================================================ */
.cart-count {
  background: #4FA8E0 !important;
}

/* ============================================================
   HOMEPAGE Add to Bag button — GREEN (matches WhatsApp button)
   Product detail page button is NOT affected — uses its own
   higher-specificity rule further down (.product-actions .add-to-cart-btn)
   ============================================================ */
.product-card .add-to-cart-btn {
  background: #25D366;
  color: #FFFFFF;
}
.product-card .add-to-cart-btn:hover:not(:disabled) {
  opacity: 0.85;
  background: #25D366;
}
.product-card .add-to-cart-btn:disabled {
  background: #CCCCCC;
  color: #888888;
}

/* ============================================================
   THEME TOGGLE SWITCH
   ============================================================ */
.theme-switcher {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.theme-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-icon {
  font-size: 15px;
  line-height: 1;
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.theme-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  border-radius: 999px;
  transition: background-color 0.25s ease;
}
.theme-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.25s ease;
}
.theme-switch input:checked + .theme-slider {
  background-color: #000;
}
.theme-switch input:checked + .theme-slider::before {
  transform: translateX(20px);
}

/* ============================================================
   DARK MODE — applied via [data-theme="dark"] on <html>
   ============================================================ */

[data-theme="dark"] {
  --clr-bg:         #121212;
  --clr-surface:    #1A1A1A;
  --clr-ink:        #F5F5F5;
  --clr-ink-soft:   #C2C2C2;
  --clr-ink-muted:  #8A8A8A;
  --clr-border:     #2E2E2E;
  --clr-card-bg:    #1F1F1F;
  --clr-btn:        #F5F5F5;
  --clr-btn-text:   #111111;
}

[data-theme="dark"] body {
  background-color: var(--clr-bg);
  color: var(--clr-ink);
}

/* Header / footer in dark mode */
[data-theme="dark"] .site-header,
[data-theme="dark"] .search-bar-header,
[data-theme="dark"] .hamburger-menu,
[data-theme="dark"] .cart-slideout {
  background: var(--clr-surface);
  border-color: var(--clr-border);
}

[data-theme="dark"] .logo a {
  color: var(--clr-ink);
}

[data-theme="dark"] .hamburger span {
  background: var(--clr-ink);
}

[data-theme="dark"] .search-toggle,
[data-theme="dark"] .search-close {
  color: var(--clr-ink);
}

[data-theme="dark"] .search-input-wrap {
  background: var(--clr-card-bg);
  border-color: var(--clr-border);
}
[data-theme="dark"] #search-input {
  color: var(--clr-ink);
}

[data-theme="dark"] .menu-content a {
  color: var(--clr-ink);
  border-color: var(--clr-border);
}

[data-theme="dark"] .locale-select,
[data-theme="dark"] #currency-select {
  background-color: var(--clr-bg);
  color: var(--clr-ink);
  border-color: var(--clr-border);
}

[data-theme="dark"] .cat-pill {
  background: var(--clr-surface);
  border-color: var(--clr-border);
  color: var(--clr-ink-soft);
}
[data-theme="dark"] .cat-pill.active {
  background: var(--clr-ink);
  color: var(--clr-bg);
}

[data-theme="dark"] .product-card {
  background: var(--clr-surface);
  border-color: var(--clr-border);
}

[data-theme="dark"] .product-img,
[data-theme="dark"] .main-image,
[data-theme="dark"] .cart-item-img,
[data-theme="dark"] .thumb {
  background: var(--clr-card-bg);
}

[data-theme="dark"] .size-selector select {
  background: var(--clr-surface);
  border-color: var(--clr-border);
  color: var(--clr-ink);
}

/* Keep green Add to Bag visible in dark mode too (homepage) */
[data-theme="dark"] .product-card .add-to-cart-btn {
  background: #25D366;
  color: #FFFFFF;
}

/* Product detail page action buttons stay consistent in dark mode */
[data-theme="dark"] .product-actions .add-to-cart-btn {
  background: var(--clr-btn);
  color: var(--clr-btn-text);
}

[data-theme="dark"] .share-btn {
  border-color: var(--clr-border);
  color: var(--clr-ink);
}

[data-theme="dark"] .stock-status {
  background: #16321F;
  color: #6FCF8F;
  border-color: #2A5A38;
}

[data-theme="dark"] .cart-item {
  border-color: var(--clr-border);
}
[data-theme="dark"] .cart-item-qty,
[data-theme="dark"] .qty-btn {
  background: var(--clr-card-bg);
  border-color: var(--clr-border);
  color: var(--clr-ink);
}
[data-theme="dark"] .qty-value {
  color: var(--clr-ink);
  border-color: var(--clr-border);
}

[data-theme="dark"] .cart-item-remove {
  background: transparent;
  border-color: #5A3030;
  color: #E07A7A;
}
[data-theme="dark"] .cart-item-remove:hover {
  background: #2A1515;
}

[data-theme="dark"] .site-footer {
  background: #0A0A0A;
}

[data-theme="dark"] .product-description,
[data-theme="dark"] .privacy-section p,
[data-theme="dark"] .privacy-section ul li {
  color: var(--clr-ink-soft);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
  background: var(--clr-card-bg);
  border-color: var(--clr-border);
  color: var(--clr-ink);
}

[data-theme="dark"] .static-hero {
  border-color: var(--clr-border);
}

[data-theme="dark"] .contact-submit-btn {
  background: #25D366;
  color: #FFFFFF;
}

[data-theme="dark"] .contact-info-value,
[data-theme="dark"] .contact-info-label,
[data-theme="dark"] .static-hero h1,
[data-theme="dark"] .static-hero p,
[data-theme="dark"] .contact-form-wrap h2,
[data-theme="dark"] .contact-info-wrap h2 {
  color: var(--clr-ink);
}

[data-theme="dark"] .contact-social-link {
  border-color: var(--clr-border);
  color: var(--clr-ink-soft);
}
[data-theme="dark"] .contact-social-link:hover {
  border-color: var(--clr-ink);
  color: var(--clr-ink);
}
