﻿/*
 * Samskrita Subhashitam - modern premium site chrome.
 *
 * Shared header and footer for the storefront and every commerce page.
 * Loaded as a plain stylesheet after tailwind-local.css. Everything is scoped
 * with the `sh-` prefix, and anything that has to beat the inline theme block
 * (for example the shared .nav-menu-panel) is targeted through a `.sh-header`
 * descendant so specificity wins regardless of source order.
 *
 * Palette: deep maroon + saffron + gold on warm parchment, with a glass header.
 */

:root {
  --sh-header-h: 60px;
  --sh-maroon: #671414;
  --sh-maroon-2: #84201d;
  --sh-wine: #400b0b;
  --sh-saffron: #e3941d;
  --sh-saffron-2: #f4b942;
  --sh-gold: #d3ac52;
  --sh-gold-soft: #ecd9a6;
  --sh-cream: #fff8ec;
  --sh-ivory: #fdf4e3;
  --sh-ink: #2c1a12;
  --sh-muted: #7c6a58;
  --sh-line: rgba(103, 20, 20, 0.14);
  --sh-shadow-sm: 0 8px 24px rgba(63, 11, 11, 0.10);
  --sh-shadow-lg: 0 26px 60px rgba(63, 11, 11, 0.18);
  --sh-glass: rgba(255, 250, 240, 0.82);
  --sh-glass-line: rgba(211, 172, 82, 0.42);
}

body.dark {
  --sh-cream: #1b1410;
  --sh-ivory: #241a14;
  --sh-ink: #f4e9dc;
  --sh-muted: #c2b09c;
  --sh-line: rgba(211, 172, 82, 0.18);
  --sh-shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.45);
  --sh-shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.55);
  --sh-glass: rgba(28, 20, 16, 0.82);
  --sh-glass-line: rgba(211, 172, 82, 0.30);
}

/* ------------------------------------------------------------------ *
 * Header - mobile-first, thumb-friendly
 * ------------------------------------------------------------------ */

.sh-header {
  position: sticky;
  top: 0;
  z-index: 60;
  isolation: isolate;
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.97), rgba(255, 245, 230, 0.90));
  border-bottom: 1px solid var(--sh-glass-line);
  box-shadow: var(--sh-shadow-sm);
}

body.dark .sh-header {
  background: linear-gradient(180deg, rgba(32, 22, 17, 0.97), rgba(24, 16, 12, 0.90));
}

.sh-header::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sh-maroon), var(--sh-saffron), var(--sh-gold), var(--sh-saffron), var(--sh-maroon));
  opacity: 0.9;
}

.sh-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: min(100% - 1.25rem, 1180px);
  margin-inline: auto;
  min-height: 60px;
  padding-block: 0.4rem;
}

/* Hamburger - keeps [data-menu-toggle] so script.js keeps working */
.sh-header .site-menu { position: relative; margin: 0; }

.sh-menu-btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  border: 1px solid var(--sh-line);
  background: var(--sh-glass);
  color: var(--sh-maroon);
  box-shadow: var(--sh-shadow-sm);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

body.dark .sh-menu-btn { color: var(--sh-saffron-2); }
.sh-menu-btn:hover { transform: translateY(-1px); border-color: var(--sh-gold); }
.sh-menu-btn:focus-visible { outline: 3px solid rgba(227, 148, 29, 0.55); outline-offset: 2px; }

.sh-burger {
  position: relative;
  width: 20px;
  height: 14px;
  display: inline-block;
}

.sh-burger span {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 200ms ease, opacity 200ms ease, top 200ms ease;
}

.sh-burger span:nth-child(1) { top: 0; }
.sh-burger span:nth-child(2) { top: 6px; }
.sh-burger span:nth-child(3) { top: 12px; }
.site-menu.is-open .sh-burger span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.site-menu.is-open .sh-burger span:nth-child(2) { opacity: 0; }
.site-menu.is-open .sh-burger span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Brand */
.sh-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  margin-right: auto;
  text-decoration: none;
}

.sh-logo {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--sh-gold);
  box-shadow: 0 0 0 3px rgba(211, 172, 82, 0.20), var(--sh-shadow-sm);
  background: #fff;
}

.sh-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.12;
}

.sh-brand-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--sh-maroon);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark .sh-brand-name { color: var(--sh-saffron-2); }

.sh-brand-tag {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--sh-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Actions */
.sh-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.sh-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--sh-line);
  background: var(--sh-glass);
  color: var(--sh-maroon);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--sh-shadow-sm);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background 120ms ease;
}

body.dark .sh-pill { color: var(--sh-saffron-2); }

.sh-pill:hover {
  transform: translateY(-1px);
  border-color: var(--sh-gold);
  box-shadow: var(--sh-shadow-lg);
}

.sh-icon { width: 44px; padding: 0; font-size: 1.15rem; }

/* Cart button + live badge */
.sh-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 0;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  text-decoration: none;
  background: linear-gradient(135deg, var(--sh-maroon), var(--sh-saffron));
  box-shadow: 0 10px 24px rgba(103, 20, 20, 0.28);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.sh-cart:hover { transform: translateY(-1px); box-shadow: var(--sh-shadow-lg); }
.sh-cart-icon { font-size: 1.05rem; line-height: 1; }

.sh-cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: #fff;
  color: var(--sh-maroon);
  font-size: 0.72rem;
  font-weight: 900;
}
.sh-cart-badge[hidden] { display: none; }

/* ---- Menu panel: full-width sheet under the header ---- */
.sh-header .nav-menu-panel {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--sh-header-h);
  bottom: 0;
  z-index: 55;
  display: block;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem clamp(1rem, 4vw, 2.5rem) 2rem;
  border: 0;
  border-top: 1px solid var(--sh-glass-line);
  background: rgba(255, 250, 240, 0.985);
  box-shadow: var(--sh-shadow-lg);
  transform: translateY(-0.5rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

body.dark .sh-header .nav-menu-panel {
  background: rgba(30, 21, 16, 0.985);
}

.sh-header .site-menu.is-open .nav-menu-panel,
.sh-header .site-menu[open] .nav-menu-panel {
  display: block;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  animation: none;
}

.sh-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.sh-panel-title {
  font-family: "Tiro Devanagari Sanskrit", "Noto Serif Devanagari", serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sh-maroon);
}

body.dark .sh-panel-title { color: var(--sh-saffron-2); }

.sh-panel-close {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--sh-line);
  background: var(--sh-glass);
  color: var(--sh-maroon);
  font-size: 1.1rem;
  cursor: pointer;
}

body.dark .sh-panel-close { color: var(--sh-saffron-2); }

.sh-nav-group + .sh-nav-group { margin-top: 1rem; }

.sh-nav-group-title {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sh-muted);
}

.sh-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.6rem;
}

@media (max-width: 560px) {
  .sh-nav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.sh-header .nav-menu-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 58px;
  text-align: left;
  border: 1px solid var(--sh-line);
  border-radius: 15px;
  background: var(--sh-glass);
  color: var(--sh-ink);
  font-weight: 700;
  font-size: 0.98rem;
  font-family: inherit;
  padding: 0.8rem 1rem;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.15;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.sh-header .nav-menu-item:hover,
.sh-header .nav-menu-item.active {
  border-color: var(--sh-gold);
  background: linear-gradient(90deg, rgba(227, 148, 29, 0.18), rgba(211, 172, 82, 0.06));
  color: var(--sh-maroon);
  transform: translateY(-1px);
}

body.dark .sh-header .nav-menu-item { color: var(--sh-ink); }
body.dark .sh-header .nav-menu-item:hover,
body.dark .sh-header .nav-menu-item.active { color: var(--sh-saffron-2); }

.sh-panel-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.sh-panel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 56px;
  border-radius: 15px;
  border: 1px solid var(--sh-line);
  background: var(--sh-glass);
  color: var(--sh-maroon);
  font-weight: 800;
  font-size: 0.98rem;
  text-decoration: none;
}

body.dark .sh-panel-btn { color: var(--sh-saffron-2); }

.sh-panel-btn-primary {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--sh-maroon), var(--sh-saffron));
  box-shadow: 0 10px 24px rgba(103, 20, 20, 0.28);
}

/* Dim the page behind an open menu (harmless elsewhere) */
.sh-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(28, 16, 10, 0.42);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

body:has(.site-menu.is-open) .sh-menu-backdrop {
  opacity: 1;
  visibility: visible;
}

.sh-hide-sm { display: inline; }

@media (max-width: 560px) {
  .sh-brand-tag { display: none; }
  .sh-cart-label { display: none; }
  .sh-hide-sm { display: none; }
  .sh-logo { width: 38px; height: 38px; }
  .sh-brand-name { font-size: 0.95rem; }
  .sh-cart { padding: 0.5rem 0.7rem; }
}

/* ------------------------------------------------------------------ *
 * Footer
 * ------------------------------------------------------------------ */

.sh-footer {
  position: relative;
  margin-top: 4rem;
  padding: 3.25rem 0 1.5rem;
  color: #f6ead6;
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(227, 148, 29, 0.20), transparent 55%),
    radial-gradient(120% 140% at 90% 10%, rgba(211, 172, 82, 0.14), transparent 50%),
    linear-gradient(160deg, var(--sh-wine), #2a0808 70%);
  overflow: hidden;
}

.sh-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sh-saffron), var(--sh-gold), var(--sh-saffron));
}

.sh-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 2rem 1.5rem;
}

.sh-footer-brand { max-width: 22rem; }

.sh-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
}

.sh-footer-logo img {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  object-fit: cover;
  border: 1px solid var(--sh-gold);
}

.sh-footer-logo span {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.sh-footer-tagline {
  margin: 1rem 0 0.4rem;
  font-size: 1rem;
  color: var(--sh-gold-soft);
}

.sh-footer-note {
  margin: 0 0 1.1rem;
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(246, 234, 214, 0.72);
}

.sh-vc {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(211, 172, 82, 0.4);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  color: var(--sh-gold-soft);
}

.sh-footer-col h2 {
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sh-gold);
}

.sh-footer-col nav,
.sh-footer-col ul {
  display: grid;
  gap: 0.55rem;
}

.sh-footer-col a {
  color: rgba(246, 234, 214, 0.82);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 120ms ease, padding 120ms ease;
}

.sh-footer-col a:hover { color: #fff; padding-left: 0.3rem; }

.sh-footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(211, 172, 82, 0.22);
  font-size: 0.82rem;
  color: rgba(246, 234, 214, 0.68);
}

.sh-footer-bar a { color: var(--sh-gold-soft); text-decoration: none; }
.sh-footer-bar a:hover { color: #fff; }

@media (max-width: 900px) {
  .sh-footer-grid { grid-template-columns: 1fr 1fr; }
  .sh-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .sh-footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* â”€â”€ Cookie-consent banner (AdSense-ready) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sh-consent {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
  max-width: 840px;
  margin-inline: auto;
  padding: 0.9rem 1.15rem;
  border: 1px solid color-mix(in srgb, var(--sh-maroon, #0f766e) 30%, transparent);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
  font-size: 0.82rem;
  color: #1f2937;
}
[data-sh-theme="dark"] .sh-consent,
body.dark .sh-consent {
  background: #141b26;
  color: #e5e7eb;
}
.sh-consent[hidden] { display: none; }
.sh-consent p { margin: 0; line-height: 1.55; }
.sh-consent a { color: var(--sh-maroon, #0f766e); font-weight: 700; }
[data-sh-theme="dark"] .sh-consent a, body.dark .sh-consent a { color: var(--sh-gold-soft, #e0c27a); }
.sh-consent-actions { display: flex; gap: 0.45rem; }
.sh-consent-btn {
  border: 0;
  border-radius: 11px;
  padding: 0.6rem 1.15rem;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
}
.sh-consent-accept { background: var(--sh-maroon, #0f766e); color: #fff; }
.sh-consent-decline { background: color-mix(in srgb, var(--sh-maroon, #0f766e) 12%, transparent); color: var(--sh-maroon, #0f766e); }
[data-sh-theme="dark"] .sh-consent-decline, body.dark .sh-consent-decline { color: var(--sh-gold-soft, #e0c27a); }
@media (max-width: 640px) {
  .sh-consent { left: 0.6rem; right: 0.6rem; bottom: 0.6rem; padding: 0.8rem 0.95rem; }
}
@media print { .sh-consent { display: none !important; } }

/* â”€â”€ Mobile UX / accessibility â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
body { -webkit-tap-highlight-color: rgba(15, 118, 110, 0.14); }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px; }
:focus-visible { outline: 2px solid var(--sh-saffron-2, #f0a500); outline-offset: 2px; }
