/* ============================================================
   Woodari Store - Common Shared Styles
   Shared between: home page, boutique page
   ============================================================ */

:root {
  --ink: #0D0A06;
  --cream: #F7F3EC;
  --warm: #EDE5D8;
  --gold: #B8924A;
  --gold-light: #D4AA6A;
  --walnut: #5C3D2E;
  --walnut-dark: #3A2318;
  --sand: #C4A882;
  --muted: #8B7B6A;
  --white: #FFFFFF;
  --green: #2D6A4F;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.woodari-home,
body.woodari-boutique {
  font-family: 'Tajawal', sans-serif;
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--sand); border-radius: 2px; }

/* --- GRAIN OVERLAY --- */
body.woodari-home::before,
body.woodari-boutique::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.4;
}

/* --- NAV --- */
nav#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 0 5vw;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.4s ease;
}
nav#navbar.scrolled {
  background: rgba(247,243,236,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(184,146,74,0.15);
  height: 60px;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--walnut-dark);
  letter-spacing: 2px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo-icon {
  width: 32px; height: 32px;
  background: var(--walnut);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-logo-icon { color: var(--gold); font-size: 15px; font-weight: 700; letter-spacing: 0; line-height: 1; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: right;
}
.nav-links a:hover { color: var(--walnut); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-links a.active-link { color: var(--walnut); font-weight: 700; }
.nav-links a.active-link::after { transform: scaleX(1); }
.nav-cta {
  background: var(--walnut);
  color: var(--cream) !important;
  padding: 9px 22px !important;
  border-radius: 30px;
  font-weight: 700 !important;
  font-size: 13px !important;
  transition: all 0.3s ease !important;
}
.nav-cta:hover { background: var(--walnut-dark) !important; transform: translateY(-1px); }
.nav-cta::after { display: none !important; }
.nav-lang-btn {
  background: rgba(0,0,0,0.06) !important;
  padding: 6px 14px !important;
  border-radius: 20px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--walnut) !important;
  transition: all 0.2s !important;
}
.nav-lang-btn:hover { background: rgba(0,0,0,0.1) !important; }
.nav-lang-btn::after { display: none !important; }
.nav-badge {
  background: var(--gold);
  color: white;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 20px;
  margin-left: 6px;
  animation: pulse-badge 2s ease-in-out infinite;
}

/* --- TICKER --- */
.ticker-wrap {
  background: var(--walnut);
  padding: 12px 0;
  overflow: hidden;
  position: relative;
}
.ticker-wrap::before, .ticker-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
}
.ticker-wrap::before { left: 0; background: linear-gradient(90deg, var(--walnut), transparent); }
.ticker-wrap::after { right: 0; background: linear-gradient(-90deg, var(--walnut), transparent); }
.ticker-inner {
  display: flex;
  gap: 0;
  animation: ticker 25s linear infinite;
  white-space: nowrap;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 0 30px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(247,243,236,0.8);
  letter-spacing: 1px;
}
.ticker-dot { color: var(--gold); font-size: 18px; }

/* --- SECTION COMMON --- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 16px;
}
.section-label::before { content: ''; width: 24px; height: 1px; background: var(--gold); display: block; }
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 700;
  color: var(--walnut-dark);
  line-height: 1.2;
  margin-bottom: 12px;
}
.section-title em { font-style: italic; color: var(--gold); }
.section-subtitle {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 500px;
}

/* --- BUTTONS --- */
.btn-primary {
  background: var(--gold);
  color: var(--walnut-dark);
  padding: 14px 32px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
  font-family: 'Tajawal', sans-serif;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(184,146,74,0.35); }
.btn-secondary {
  color: rgba(247,243,236,0.7);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
  letter-spacing: 0.3px;
}
.btn-secondary:hover { color: var(--gold); }
.btn-secondary svg { width: 20px; height: 20px; }

/* --- FOOTER --- */
footer {
  background: var(--ink);
  padding: 80px 5vw 40px;
  color: rgba(247,243,236,0.5);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 32px;
}
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: var(--cream);
  letter-spacing: 2px;
  margin-bottom: 16px;
  display: block;
}
.footer-desc { font-size: 13px; line-height: 1.8; max-width: 260px; margin-bottom: 24px; }
.footer-socials { display: flex; gap: 10px; }
.social-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: rgba(247,243,236,0.5);
}
.social-btn:hover { background: rgba(184,146,74,0.2); }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--cream); letter-spacing: 1px; margin-bottom: 20px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13px; color: rgba(247,243,236,0.4); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 12px; flex-wrap: wrap; gap: 10px; }
.footer-bottom a { color: rgba(247,243,236,0.4); text-decoration: none; }
.footer-bottom a:hover { color: var(--gold); }

/* --- ANIMATIONS --- */
@keyframes pulse-badge { 0%,100%{opacity:1} 50%{opacity:0.7} }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes ticker { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* --- PRODUCT CARDS (shared between home & boutique) --- */
.product-card { position: relative; }
.product-img-wrap {
  aspect-ratio: 4/3;
  background: var(--warm);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
}
.product-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.34,1.2,0.64,1), opacity 0.25s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.06); }
.prod-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.prod-p1 { background: linear-gradient(135deg, #E8DDD0, #D0C4B4); }
.prod-p2 { background: linear-gradient(135deg, #DDD5C8, #C8BCAA); }
.prod-p3 { background: linear-gradient(135deg, #F0EAE0, #E0D8CC); }
.product-tag-badge {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--walnut);
  color: var(--cream);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.product-tag-badge.gold { background: var(--gold); color: var(--walnut-dark); }
.product-tag-badge.green { background: var(--green); }
.product-actions {
  position: absolute;
  bottom: 14px; left: 14px; right: 14px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s ease;
}
.product-card:hover .product-actions { opacity: 1; transform: translateY(0); }
.pa-btn {
  flex: 1;
  background: rgba(247,243,236,0.95);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 6px;
  padding: 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Tajawal', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--walnut-dark);
  text-decoration: none;
  text-align: center;
  display: block;
}
.pa-btn.main { background: var(--walnut); color: var(--cream); }
.pa-btn:hover { transform: translateY(-1px); }
.pa-btn.main:hover { background: var(--walnut-dark); }
.product-info { padding: 0 4px; }
.product-name-link { text-decoration: none; color: inherit; }
.product-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--walnut-dark);
  margin-bottom: 6px;
  line-height: 1.3;
}
.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.product-colors { display: flex; gap: 6px; align-items: center; }
.color-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.08);
  cursor: pointer;
  background-size: cover;
  background-position: center;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold);
}
.product-sizes { font-size: 11px; color: var(--muted); font-weight: 500; }
.product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.price-current { font-size: 20px; font-weight: 900; color: var(--walnut); }
.price-old { font-size: 14px; color: var(--muted); text-decoration: line-through; }
.price-save { font-size: 11px; color: var(--green); font-weight: 700; background: #E8F5E9; padding: 2px 7px; border-radius: 10px; }
.product-rating { display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.stars { color: #F4A923; font-size: 12px; }
.rating-count { font-size: 11px; color: var(--muted); }

/* --- REVEAL --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible,
.reveal.vis {
  opacity: 1;
  transform: translateY(0);
}

/* --- HAMBURGER BUTTON --- */
.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  z-index: 601;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--walnut-dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.active span:nth-child(2) { opacity: 0; }
.nav-burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- MOBILE --- */
@media (max-width: 768px) {
  .nav-burger { display: flex; }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    inset-inline-end: 0;
    width: 280px;
    height: 100vh;
    background: var(--cream);
    padding: 80px 24px 32px;
    gap: 0;
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 600;
    overflow-y: auto;
  }
  [dir="rtl"] .nav-links { transform: translateX(-100%); }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links li {
    border-bottom: 1px solid rgba(184,146,74,0.12);
  }
  .nav-links li:last-child { border-bottom: none; }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--walnut-dark);
  }
  .nav-links a::after { display: none; }
  .nav-links a.active-link { color: var(--gold); }

  .nav-links .nav-lang-btn {
    display: inline-block;
    margin-top: 4px;
  }

  .nav-links .nav-cta {
    display: block;
    text-align: center;
    margin-top: 8px;
    padding: 14px 22px !important;
  }

  /* Overlay behind menu */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 599;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .nav-overlay.visible {
    opacity: 1;
    pointer-events: auto;
  }

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