/* ============================================================
   Woodari Store - Home Page Styles
   Depends on: woodari-common.css
   ============================================================ */

/* --- HERO --- */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}
.hero-left {
  background: var(--walnut-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 8vw 80px 5vw;
  position: relative;
  overflow: hidden;
}
.hero-left::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(184,146,74,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-left::after {
  content: 'W';
  position: absolute;
  bottom: -60px; left: -20px;
  font-family: 'Playfair Display', serif;
  font-size: 300px;
  color: rgba(255,255,255,0.03);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(184,146,74,0.15);
  border: 1px solid rgba(184,146,74,0.3);
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 7px 16px;
  border-radius: 30px;
  margin-bottom: 28px;
  width: fit-content;
  animation: fadeUp 0.8s ease both;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 4vw, 58px);
  font-weight: 700;
  color: var(--cream);
  line-height: 1.2;
  margin-bottom: 10px;
  animation: fadeUp 0.8s 0.15s ease both;
}
.hero-title em { font-style: italic; color: var(--gold); }
.hero-title-ar {
  font-family: 'Tajawal', sans-serif;
  font-size: clamp(28px, 3vw, 46px);
  font-weight: 900;
  color: var(--cream);
  line-height: 1.3;
  margin-bottom: 24px;
  animation: fadeUp 0.8s 0.25s ease both;
}
.hero-desc {
  font-size: 15px;
  color: rgba(247,243,236,0.6);
  line-height: 1.8;
  max-width: 380px;
  margin-bottom: 40px;
  font-weight: 300;
  animation: fadeUp 0.8s 0.35s ease both;
}
.hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  animation: fadeUp 0.8s 0.45s ease both;
}
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
  animation: fadeUp 0.8s 0.55s ease both;
}
.stat-item { text-align: center; }
.stat-num { font-size: 28px; font-weight: 900; color: var(--gold); display: block; line-height: 1; }
.stat-lbl { font-size: 11px; color: rgba(247,243,236,0.4); margin-top: 4px; letter-spacing: 1px; display: block; }

/* HERO RIGHT */
.hero-right { position: relative; overflow: hidden; background: var(--warm); }
.hero-img-main { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(160deg, #E8DDD0 0%, #D4C4B0 40%, #C4B099 100%);
  display: flex; align-items: center; justify-content: center;
}
.hero-img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(58,35,24,0.1) 0%, transparent 60%);
}
.hero-floating-card {
  position: absolute;
  bottom: 40px; right: 30px;
  background: rgba(247,243,236,0.95);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 200px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: fadeUp 1s 0.7s ease both;
}
.fc-label { font-size: 10px; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 4px; }
.fc-product { font-size: 14px; font-weight: 700; color: var(--walnut-dark); margin-bottom: 2px; }
.fc-price { font-size: 22px; font-weight: 900; color: var(--gold); }
.fc-price span { font-size: 12px; color: var(--muted); text-decoration: line-through; margin-left: 6px; }
.fc-stars { color: #F4A923; font-size: 13px; margin-top: 4px; }
.fc-cta {
  margin-top: 10px;
  background: var(--walnut);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  width: 100%;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  display: block;
  text-align: center;
}
.fc-cta:hover { background: var(--walnut-dark); color: white; }
.hero-badge-top {
  position: absolute;
  top: 30px; left: 30px;
  width: 80px; height: 80px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; color: var(--walnut-dark);
  text-align: center; line-height: 1.3;
  box-shadow: 0 8px 24px rgba(184,146,74,0.4);
  animation: spin-slow 20s linear infinite;
}
@keyframes spin-slow { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
.hero-badge-top span { animation: spin-slow 20s linear infinite reverse; display: block; }

/* --- PRODUCTS --- */
section { padding: 100px 5vw; }
.products-section { background: var(--white); }
.products-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 56px;
  flex-wrap: wrap;
  gap: 20px;
}
.view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  transition: gap 0.2s;
  letter-spacing: 0.5px;
}
.view-all:hover { gap: 12px; }
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
/* Product card styles are now in woodari-common.css */

/* --- SPLIT SECTION --- */
.split-section {
  background: var(--warm);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
  padding: 0;
  overflow: hidden;
}
.split-visual {
  background: linear-gradient(160deg, #2A1A10, #4A3020);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}
.split-visual::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(184,146,74,0.15) 0%, transparent 65%);
}
.split-visual img {
  animation: float 6s ease-in-out infinite;
}
.split-content {
  padding: 80px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--cream);
}
.split-features {
  list-style: none;
  margin: 36px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.split-features li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.feat-icon {
  width: 40px; height: 40px;
  background: var(--warm);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.feat-title { font-weight: 700; color: var(--walnut-dark); display: block; margin-bottom: 2px; }

/* --- TESTIMONIALS --- */
.testimonials-section { background: var(--walnut-dark); padding: 100px 5vw; }
.testimonials-section .section-label { color: var(--gold); }
.testimonials-section .section-title { color: var(--cream); }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.testi-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(184,146,74,0.12);
  border-radius: 12px;
  padding: 28px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.testi-card::before {
  content: '"';
  position: absolute;
  top: -10px; right: 20px;
  font-family: 'Playfair Display', serif;
  font-size: 120px;
  color: rgba(184,146,74,0.08);
  line-height: 1;
  pointer-events: none;
}
.testi-card:hover { background: rgba(255,255,255,0.07); border-color: rgba(184,146,74,0.25); transform: translateY(-3px); }
.testi-stars { color: #F4A923; font-size: 14px; margin-bottom: 14px; letter-spacing: 2px; }
.testi-text { font-size: 14px; color: rgba(247,243,236,0.7); line-height: 1.7; margin-bottom: 20px; font-weight: 300; }
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--walnut-dark);
  flex-shrink: 0;
}
.testi-name { font-size: 14px; font-weight: 700; color: var(--cream); }
.testi-city { font-size: 11px; color: rgba(247,243,236,0.4); margin-top: 1px; letter-spacing: 0.5px; }
.testi-product { margin-top: 6px; font-size: 11px; color: var(--gold); opacity: 0.7; }

/* --- COD SECTION --- */
.cod-section {
  background: var(--gold);
  padding: 64px 5vw;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cod-section::before {
  content: '';
  position: absolute;
  top: -50%; left: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
}
.cod-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 700;
  color: var(--walnut-dark);
  margin-bottom: 12px;
}
.cod-sub { font-size: 16px; color: rgba(58,35,24,0.7); margin-bottom: 40px; max-width: 500px; margin-left: auto; margin-right: auto; }
.cod-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.cod-badge {
  background: rgba(58,35,24,0.1);
  border: 1px solid rgba(58,35,24,0.15);
  border-radius: 8px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--walnut-dark);
}
.cod-badge .icon { font-size: 22px; }
.cod-btn {
  background: var(--walnut-dark);
  color: var(--cream);
  padding: 16px 48px;
  border-radius: 4px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
  font-family: 'Tajawal', sans-serif;
}
.cod-btn:hover { background: var(--walnut); transform: translateY(-3px); box-shadow: 0 12px 40px rgba(58,35,24,0.3); }

/* --- MOBILE --- */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; }
  .hero-right { height: auto; min-height: 300px; position: relative; }
  .hero-img-main { width: 100%; height: 300px; object-fit: cover; }
  .hero-left { padding: 100px 6vw 60px; }
  .hero-stats { gap: 20px; }
  .hero-floating-card {
    position: relative;
    bottom: auto; right: auto;
    margin: -60px 16px 16px;
    min-width: unset;
    z-index: 2;
  }
  .hero-badge-top { width: 60px; height: 60px; font-size: 9px; top: 16px; left: 16px; }
  .products-grid { grid-template-columns: 1fr 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .split-section { grid-template-columns: 1fr; }
  .split-visual { min-height: 300px; padding: 40px; }
  .split-content { padding: 50px 6vw; }
  .cod-badges { gap: 10px; }
  .cod-badge { padding: 10px 14px; font-size: 12px; }
}

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

/* ================================================
   CATEGORY STORIES (Instagram-style circles)
   ================================================ */
.cat-stories {
  padding: 28px 0 12px;
  background: var(--woodari-white, #fff);
  display: flex;
  justify-content: center;
}
.cat-stories__scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 8px;
  padding-inline: 20px;
  scroll-snap-type: x proximity;
  /* Cap so it never spans the whole row; scrolls only when items exceed viewport */
  max-width: 100%;
}
/* Fade edges applied ONLY when scrollable (JS adds .is-scrollable) */
.cat-stories__scroll.is-scrollable {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
}
.cat-stories__scroll::-webkit-scrollbar { display: none; }
/* Flex spacers preserve breathing room at both edges when overflowing */
.cat-stories__scroll.is-scrollable::before,
.cat-stories__scroll.is-scrollable::after {
  content: "";
  flex: 0 0 24px;
}

.cat-story {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 82px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform .15s ease;
  position: relative;
}
.cat-story:hover { transform: translateY(-2px); }
.cat-story:hover .cat-story__ring { filter: brightness(1.08); }

/* Gradient ring — walnut + terracotta (33 Bois brand) */
.cat-story__ring {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: conic-gradient(
    from 220deg,
    #B85632 0deg,
    #C89B6C 90deg,
    #6B4222 180deg,
    #C89B6C 270deg,
    #B85632 360deg
  );
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px -8px rgba(107, 66, 34, 0.5);
  transition: filter .15s ease;
}

/* Inner cream ring separator (like Instagram's white ring) */
.cat-story__bubble {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--woodari-white, #fff);
  padding: 3px;
  display: block;
  overflow: hidden;
  position: relative;
}
.cat-story__bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.cat-story__fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--woodari-cream, #f1ebdc);
  color: var(--woodari-walnut, #6b4222);
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.03em;
}

.cat-story__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--woodari-ink, #1a1613);
  max-width: 96px;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-story__count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--woodari-muted, #7a6f63);
  letter-spacing: .05em;
  margin-top: -2px;
}

/* Mobile — a bit smaller */
@media (max-width: 720px) {
  .cat-stories { padding: 20px 0 8px; }
  .cat-stories__scroll { gap: 14px; }
  .cat-stories__scroll::before,
  .cat-stories__scroll::after { flex-basis: 16px; }
  .cat-story__ring { width: 68px; height: 68px; }
  .cat-story__name { font-size: 12px; }
  .cat-story__count { font-size: 10px; }
}

/* ================================================
   CATEGORY STORY VIEWER (Instagram-style)
   ================================================ */
.cat-story { cursor: pointer; }

.csv {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(12, 8, 5, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.csv.open { opacity: 1; pointer-events: auto; }
body.csv-lock { overflow: hidden; }

.csv__stage {
  position: relative;
  width: min(420px, 100vw);
  height: min(760px, 100dvh);
  background: var(--walnut-dark, #2B1A0E);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8);
  user-select: none;
  -webkit-user-select: none;
  transform: scale(.96);
  transition: transform .2s ease;
}
.csv.open .csv__stage { transform: scale(1); }
@media (max-width: 480px) {
  .csv__stage { width: 100vw; height: 100dvh; border-radius: 0; }
}

/* Progress bars */
.csv__bars {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; gap: 4px; z-index: 5;
  direction: ltr;
}
.csv__bar {
  flex: 1; height: 3px; border-radius: 3px;
  background: rgba(255,255,255,.28); overflow: hidden;
}
.csv__bar > i {
  display: block; height: 100%; width: 0;
  background: var(--gold, #C89B6C);
  transition: none;
}
.csv__bar.done > i { width: 100%; }
.csv__bar.active > i { animation: csvFill var(--csv-dur, 5s) linear forwards; }
.csv.paused .csv__bar.active > i { animation-play-state: paused; }
@keyframes csvFill { from { width: 0 } to { width: 100% } }

/* Header */
.csv__head {
  position: absolute; top: 22px; left: 12px; right: 12px;
  display: flex; align-items: center; gap: 10px; z-index: 5;
  color: #fff;
}
.csv__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: conic-gradient(from 220deg, #B85632, #C89B6C, #6B4222, #C89B6C, #B85632);
  padding: 2px;
}
.csv__avatar span {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--walnut-dark, #2B1A0E);
  color: var(--gold, #C89B6C);
  font-family: 'Playfair Display', serif; font-weight: 700; font-size: 13px;
}
.csv__title { font-weight: 700; font-size: 14px; line-height: 1.1; }
.csv__sub { font-size: 11px; opacity: .7; }
.csv__close {
  margin-inline-start: auto;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.14); color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer;
}
.csv__close:hover { background: rgba(255,255,255,.26); }

/* Media */
.csv__media {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, rgba(184,146,74,.16), transparent 65%), var(--walnut-dark, #2B1A0E);
}
.csv__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  animation: csvKen var(--csv-dur, 5s) ease-out forwards;
}
.csv.paused .csv__media img { animation-play-state: paused; }
@keyframes csvKen { from { transform: scale(1) } to { transform: scale(1.06) } }
.csv__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.45) 0%, transparent 22%, transparent 55%, rgba(0,0,0,.75) 100%);
  pointer-events: none;
}

/* Tap zones */
.csv__prev, .csv__next {
  position: absolute; top: 90px; bottom: 150px; width: 40%;
  z-index: 4; background: transparent; border: 0; cursor: pointer;
}
.csv__prev { left: 0; }
.csv__next { right: 0; width: 60%; }

/* Caption */
.csv__caption {
  position: absolute; left: 16px; right: 16px; bottom: 18px;
  z-index: 5; color: #fff; display: grid; gap: 10px;
}
.csv__badge {
  justify-self: start;
  background: var(--gold, #C89B6C); color: var(--walnut-dark, #2B1A0E);
  font-size: 11px; font-weight: 800; letter-spacing: .5px;
  padding: 4px 10px; border-radius: 999px;
}
.csv__name {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700; line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.csv__price { display: flex; gap: 10px; align-items: baseline; }
.csv__price b { font-size: 20px; font-weight: 900; color: var(--gold, #C89B6C); }
.csv__price s { font-size: 13px; opacity: .65; }
.csv__actions { display: flex; gap: 8px; margin-top: 4px; }
.csv__cta {
  flex: 1; text-align: center; text-decoration: none;
  background: var(--gold, #C89B6C); color: var(--walnut-dark, #2B1A0E);
  font-weight: 800; font-size: 14px; padding: 12px 16px; border-radius: 10px;
  font-family: 'Tajawal', sans-serif;
}
.csv__cta:hover { filter: brightness(1.06); color: var(--walnut-dark, #2B1A0E); }
.csv__all {
  text-decoration: none; color: #fff; font-size: 13px; font-weight: 600;
  padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.35);
  white-space: nowrap;
}
.csv__all:hover { background: rgba(255,255,255,.12); color: #fff; }

/* Desktop side arrows */
.csv__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.12); color: #fff;
  font-size: 22px; cursor: pointer; display: none;
}
.csv__arrow:hover { background: rgba(255,255,255,.24); }
.csv__arrow--prev { left: calc(50% - 210px - 64px); }
.csv__arrow--next { right: calc(50% - 210px - 64px); }
@media (min-width: 640px) { .csv__arrow { display: inline-flex; align-items: center; justify-content: center; } }
.csv__arrow svg { display: block; }

@media (prefers-reduced-motion: reduce) {
  .csv__media img { animation: none; }
}
