/* ============================================================
   SANATAN BLISS — app.css
   Global design system, shared components, layout primitives
   Loaded on every page via layouts/app.blade.php
   ============================================================ */

/* ── RESET & BOX MODEL ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── DESIGN TOKENS ── */
:root {
  /* Colours */
  --saffron:       #C2600A;
  --saffron-light: #F5A623;
  --saffron-pale:  #FEF3DC;
  --maroon:        #6B1E0F;
  --maroon-mid:    #922B1A;
  --gold:          #D4A017;
  --gold-light:    #F9E8B0;
  --cream:         #FAF6EE;
  --cream-dark:    #F0E9DC;
  --stone:         #3D2E22;
  --stone-mid:     #7A5C47;
  --stone-light:   #B8A090;
  --green:         #1A5C3A;
  --green-light:   #E8F5EE;
  --purple:        #4C1D95;
  --purple-light:  #EDE9FE;
  --blue-light:    #DBEAFE;

  /* Typography */
  --font-display: 'Cormorant Garamond', serif;
  --font-hindi:   'Tiro Devanagari Hindi', serif;
  --font-body:    'DM Sans', sans-serif;

  /* Spacing scale */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  40px;
  --sp-2xl: 64px;
  --sp-3xl: 96px;

  /* Radii */
  --r-sm:  8px;
  --r-md:  16px;
  --r-lg:  24px;
  --r-xl:  32px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(107,30,15,.06);
  --shadow-md: 0 8px 28px rgba(107,30,15,.10);
  --shadow-lg: 0 16px 48px rgba(107,30,15,.14);
}

/* ── BODY ── */
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--stone);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── TYPOGRAPHY UTILITIES ── */
.font-display { font-family: var(--font-display); }
.font-hindi   { font-family: var(--font-hindi); }
.text-maroon  { color: var(--maroon); }
.text-saffron { color: var(--saffron); }
.text-gold    { color: var(--gold); }
.text-muted   { color: var(--stone-mid); }

/* Section label — used across all pages */
.section-label {
  font-size: .64rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--saffron);
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cream-dark);
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--maroon);
  color: white;
  border: none;
  padding: 13px 28px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .25s;
}
.btn-primary:hover { background: var(--maroon-mid); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--maroon);
  border: 2px solid var(--maroon);
  padding: 11px 26px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .25s;
}
.btn-outline:hover { background: var(--maroon); color: white; transform: translateY(-2px); }

.btn-gold {
  background: var(--gold);
  color: var(--stone);
  border: none;
  padding: 13px 28px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .25s;
}
.btn-gold:hover { background: var(--saffron-light); transform: translateY(-2px); }

/* ── FADE-UP ANIMATION ── */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── BREADCRUMB ── */
.breadcrumb {
  background: var(--cream-dark);
  padding: 11px 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .74rem;
  color: var(--stone-mid);
}
.breadcrumb a { color: var(--saffron); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
@media (max-width: 768px) { .breadcrumb { padding: 10px 20px; } }

/* ── TOPBAR ── */
.topbar {
  background: var(--maroon);
  color: rgba(255,255,255,.85);
  font-size: .72rem;
  letter-spacing: .07em;
  padding: 7px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.topbar-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.topbar-right a { color: rgba(255,255,255,.75); text-decoration: none; white-space: nowrap; }
.topbar-right a:hover { color: var(--gold-light); }
.lang-toggle {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: .68rem;
  cursor: pointer;
  color: white;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .topbar { padding: 6px 16px; }
  .topbar-left { display: none; }
  .topbar-right { gap: 10px; }
}

/* ── NAVBAR ── */
#main-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(250,246,238,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cream-dark);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  box-shadow: var(--shadow-sm);
}
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.nav-logo-om {
  width: 38px; height: 38px;
  background: var(--maroon);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--gold-light);
  font-family: var(--font-hindi);
}
.nav-logo-text .brand  { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--maroon); display: block; }
.nav-logo-text .tagline { font-size: .62rem; color: var(--stone-light); letter-spacing: .12em; text-transform: uppercase; display: block; }

/* Nav links */
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links > a,
.nav-dropdown-trigger {
  font-size: .82rem; font-weight: 500; color: var(--stone);
  text-decoration: none; padding: 6px 12px; border-radius: 6px;
  transition: all .2s; cursor: pointer; background: none; border: none;
  font-family: var(--font-body);
}
.nav-links > a:hover, .nav-dropdown-trigger:hover,
.nav-links > a.active, .nav-dropdown-trigger.active {
  color: var(--maroon); background: var(--saffron-pale);
}

/* Mega menu */
.nav-dropdown { position: relative; }
.mega-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: -12px;
  background: white;
  border: 1px solid var(--cream-dark);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 20px;
  min-width: 480px;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  z-index: 300;
}
.nav-dropdown:hover .mega-menu { display: grid; }
.mega-col { padding: 0 16px; }
.mega-col:not(:last-child) { border-right: 1px solid var(--cream-dark); }
.mega-head { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--saffron); font-weight: 700; margin-bottom: 10px; }
.mega-menu a { display: block; font-size: .82rem; color: var(--stone-mid); text-decoration: none; padding: 5px 0; transition: color .15s; }
.mega-menu a:hover { color: var(--maroon); }

/* Nav actions */
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-icon-btn {
  width: 36px; height: 36px;
  border: none; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; color: var(--stone-mid);
  transition: all .2s; font-size: 1rem; text-decoration: none; position: relative;
}
.nav-icon-btn:hover { background: var(--saffron-pale); color: var(--maroon); }
.cart-count {
  position: absolute; top: 2px; right: 2px;
  background: var(--maroon); color: white;
  font-size: .55rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.nav-shop-btn {
  background: var(--maroon); color: white; border: none; border-radius: 8px;
  padding: 8px 18px; font-size: .8rem; font-family: var(--font-body);
  font-weight: 500; cursor: pointer; transition: all .25s;
  text-decoration: none; display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.nav-shop-btn:hover { background: var(--maroon-mid); transform: translateY(-1px); }

/* Hamburger */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px; width: 36px;
}
.nav-hamburger span { display: block; height: 2px; background: var(--stone); border-radius: 2px; transition: all .3s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── FOOTER — DESKTOP ── */
footer { background: var(--stone); color: rgba(255,255,255,.65); padding: 64px 40px 0; }
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr;
  gap: 36px; padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 14px; }
.footer-logo-om {
  width: 36px; height: 36px; background: var(--maroon); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--gold-light); font-family: var(--font-hindi); flex-shrink: 0;
}
.footer-brand-name   { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: white; display: block; }
.footer-brand-tagline { font-size: .65rem; color: rgba(255,255,255,.4); font-style: italic; display: block; }
.footer-brand-desc   { font-size: .79rem; line-height: 1.7; margin-bottom: 16px; color: rgba(255,255,255,.55); }
.footer-socials      { display: flex; gap: 8px; margin-bottom: 18px; }
.social-btn {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.08); border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.55); font-size: .85rem;
  text-decoration: none; transition: all .2s;
}
.social-btn:hover { background: var(--maroon); color: white; border-color: var(--maroon); }

.footer-newsletter {}
.footer-nl-label { font-size: .72rem; color: rgba(255,255,255,.45); margin-bottom: 8px; }
.footer-nl-form { display: flex; gap: 6px; }
.footer-nl-form input {
  flex: 1; padding: 8px 12px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.07);
  color: white; font-family: var(--font-body); font-size: .8rem; outline: none; min-width: 0;
}
.footer-nl-form input:focus { border-color: var(--gold); background: rgba(255,255,255,.1); }
.footer-nl-form input::placeholder { color: rgba(255,255,255,.3); }
.footer-nl-form button {
  padding: 8px 14px; background: var(--gold); color: var(--stone);
  border: none; border-radius: 8px; font-family: var(--font-body);
  font-size: .78rem; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .2s;
}
.footer-nl-form button:hover { background: var(--saffron-light); }

.footer-col h4 { font-size: .65rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-light); font-weight: 600; margin-bottom: 14px; }
.footer-col ul  { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { font-size: .8rem; color: rgba(255,255,255,.55); text-decoration: none; transition: color .2s; }
.footer-col ul li a:hover { color: white; }

/* Mobile brand (above accordion, hidden on desktop) */
.footer-mobile-brand    { display: none; }
.footer-mobile-socials  { display: none; }
.footer-mobile-accordion { display: none; }

/* Footer bottom */
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; padding: 20px 0 24px;
  font-size: .72rem; color: rgba(255,255,255,.3);
}
.footer-om { color: var(--saffron-light); font-family: var(--font-hindi); font-size: 1rem; }
.footer-bottom-links { display: flex; gap: 14px; }
.footer-bottom-links a { color: rgba(255,255,255,.3); text-decoration: none; transition: color .2s; }
.footer-bottom-links a:hover { color: white; }

/* ── FOOTER — MOBILE (<768px) ── */
@media (max-width: 768px) {
  footer { padding: 32px 20px 0; }

  /* Hide desktop grid on mobile */
  .footer-inner { display: none !important; }

  /* Show mobile-only elements */
  .footer-mobile-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 4px;
  }
  .footer-mobile-brand .fmb-om {
    width: 44px; height: 44px;
    background: var(--maroon); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: var(--gold-light);
    font-family: var(--font-hindi); flex-shrink: 0;
  }
  .footer-mobile-brand .fmb-name {
    font-family: var(--font-display); font-size: 1.2rem;
    font-weight: 700; color: white; display: block; line-height: 1.2;
  }
  .footer-mobile-brand .fmb-tag {
    font-size: .7rem; color: rgba(255,255,255,.45);
    font-style: italic; display: block; margin-top: 2px;
  }

  .footer-mobile-socials {
    display: flex;
    gap: 10px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .footer-mobile-socials .social-btn {
    width: 40px; height: 40px;
    background: rgba(255,255,255,.1);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.7); font-size: .9rem;
    text-decoration: none; transition: all .2s;
  }
  .footer-mobile-socials .social-btn:hover { background: var(--maroon); color: white; }

  /* Accordion */
  .footer-mobile-accordion {
    display: block;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .footer-acc {
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .footer-acc summary {
    list-style: none;
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 0;
    font-size: .9rem; font-weight: 600;
    color: rgba(255,255,255,.8);
    cursor: pointer; user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .footer-acc summary::-webkit-details-marker { display: none; }
  .footer-acc summary::after {
    content: '›';
    font-size: 1.2rem;
    color: rgba(255,255,255,.35);
    transition: transform .25s ease;
  }
  .footer-acc[open] summary { color: white; }
  .footer-acc[open] summary::after { transform: rotate(90deg); color: var(--gold-light); }

  .footer-acc-body {
    display: flex; flex-direction: column;
    padding-bottom: 8px;
  }
  .footer-acc-body a {
    font-size: .88rem;
    color: rgba(255,255,255,.55);
    text-decoration: none;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
    transition: color .15s;
    /* Minimum 44px touch target */
    min-height: 44px;
    display: flex; align-items: center;
  }
  .footer-acc-body a:last-child { border-bottom: none; }
  .footer-acc-body a:hover, .footer-acc-body a:active { color: white; }

  /* Footer bottom */
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 20px 0 28px;
  }
  .footer-om { font-size: 1.1rem; }
  .footer-bottom-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }
  .footer-bottom-links a { font-size: .78rem; }
}

/* ── MOBILE NAV ── */
@media (max-width: 1024px) {
  #main-nav { padding: 0 20px; }
  .nav-links {
    display: none; position: fixed; inset: 0; top: 68px;
    background: white; flex-direction: column; align-items: flex-start;
    gap: 0; padding: 20px; overflow-y: auto; z-index: 199;
    border-top: 1px solid var(--cream-dark);
  }
  .nav-links.open { display: flex; }
  .nav-links > a, .nav-dropdown-trigger { width: 100%; padding: 14px 16px; border-radius: 10px; font-size: .95rem; }
  .nav-dropdown { width: 100%; }
  .mega-menu {
    position: static; display: none; grid-template-columns: 1fr;
    box-shadow: none; border: none; padding: 0 12px; min-width: 0; border-radius: 0;
  }
  .nav-dropdown.open .mega-menu { display: grid; }
  .mega-col { padding: 8px 0; border-right: none !important; border-bottom: 1px solid var(--cream-dark); }
  .mega-menu a { padding: 8px 0; font-size: .88rem; }
  .nav-hamburger { display: flex; }
  .nav-shop-btn { padding: 7px 14px; font-size: .75rem; }
}

/* ── MODAL SYSTEM ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 400; backdrop-filter: blur(4px);
}
.modal-overlay.open { display: block; }
.modal {
  display: none; position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(.96);
  z-index: 401; background: white; border-radius: 24px;
  padding: 36px 32px; max-width: 480px; width: calc(100% - 40px);
  box-shadow: 0 24px 80px rgba(107,30,15,.2);
  animation: modalIn .25s ease both;
}
.modal.open { display: block; }
@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%,-50%) scale(.92); }
  to   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}
.modal-sm     { max-width: 360px; }
.modal-search { max-width: 600px; padding: 28px; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: var(--cream-dark); border: none; border-radius: 50%;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .8rem; color: var(--stone-mid); transition: all .2s;
}
.modal-close:hover { background: var(--cream); color: var(--maroon); }
.modal-icon   { font-size: 2.2rem; margin-bottom: 12px; }
.modal-title  { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--maroon); margin-bottom: 8px; }
.modal-desc   { font-size: .84rem; color: var(--stone-mid); line-height: 1.7; margin-bottom: 20px; }
.modal-form   { display: flex; flex-direction: column; gap: 10px; }
.modal-form input,
.modal-form select,
.modal-form textarea {
  padding: 11px 14px; border: 1.5px solid var(--cream-dark); border-radius: 10px;
  font-family: var(--font-body); font-size: .85rem; color: var(--stone);
  outline: none; transition: border .2s; background: var(--cream);
}
.modal-form input:focus,
.modal-form select:focus,
.modal-form textarea:focus { border-color: var(--maroon); background: white; }
.modal-form textarea { resize: vertical; min-height: 80px; }
.modal-submit {
  background: var(--maroon); color: white; border: none; border-radius: 10px;
  padding: 12px; font-family: var(--font-body); font-size: .88rem; font-weight: 700;
  cursor: pointer; transition: all .2s; margin-top: 4px;
}
.modal-submit:hover { background: var(--maroon-mid); transform: translateY(-1px); }
.modal-fine { font-size: .72rem; color: var(--stone-light); text-align: center; margin-top: 10px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.modal-btn-primary {
  flex: 1; background: var(--maroon); color: white; border: none; border-radius: 10px;
  padding: 11px 16px; font-family: var(--font-body); font-size: .84rem; font-weight: 700;
  cursor: pointer; text-decoration: none; text-align: center; transition: background .2s;
}
.modal-btn-primary:hover { background: var(--maroon-mid); }
.modal-btn-secondary {
  flex: 1; background: var(--cream); color: var(--stone-mid);
  border: 1.5px solid var(--cream-dark); border-radius: 10px;
  padding: 11px 16px; font-family: var(--font-body); font-size: .84rem;
  cursor: pointer; transition: all .2s;
}
.modal-btn-secondary:hover { border-color: var(--maroon); color: var(--maroon); }

/* Search modal */
.search-modal-form {
  display: flex; align-items: center; gap: 10px;
  background: var(--cream); border-radius: 50px;
  padding: 10px 16px; border: 2px solid var(--cream-dark); margin-bottom: 18px;
}
.search-modal-form:focus-within { border-color: var(--maroon); }
.search-modal-icon { font-size: 1rem; color: var(--stone-light); }
.search-modal-form input { flex: 1; border: none; background: transparent; font-family: var(--font-body); font-size: .95rem; color: var(--stone); outline: none; }
.search-modal-form button { background: var(--maroon); color: white; border: none; border-radius: 20px; padding: 7px 18px; font-family: var(--font-body); font-size: .82rem; font-weight: 600; cursor: pointer; }
.search-quick-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sql-label { font-size: .72rem; color: var(--stone-light); font-weight: 600; }
.search-quick-links a { font-size: .78rem; color: var(--saffron); text-decoration: none; background: var(--saffron-pale); padding: 4px 10px; border-radius: 20px; transition: all .2s; }
.search-quick-links a:hover { background: var(--saffron); color: white; }

@media (max-width: 500px) {
  .modal { padding: 28px 20px; border-radius: 18px; }
  .modal-title { font-size: 1.3rem; }
}
