/* ═══════════════════════════════════════════════════════
   KAMSYA GRUHA — Brand-True Luxury Stylesheet v3
   Palette: Deep Crimson · Burnished Gold · Sacred Teal
   Inspired directly by the ಕಾಂಸ್ಯ ಗೃಹ logo
═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,600&display=swap');

/* ══════════════════════════════
   BRAND COLOUR TOKENS
   Extracted from logo:
   • Crimson velvet brocade bg
   • Burnished antique gold trim
   • Sacred teal elephant accent
   • Ivory cream typography
══════════════════════════════ */
:root {
  /* Gold */
  --gold:         #D4A017;
  --gold-l:       #F2CC6B;
  --gold-xl:      #FFE49A;
  --gold-d:       #9A7012;
  --gold-pale:    #FDF5DC;
  --gold-glow:    rgba(212,160,23,0.30);

  /* Crimson — the velvet soul of the brand */
  --crimson:      #3B0A14;
  --crimson-2:    #4E1020;
  --crimson-3:    #6B1828;
  --crimson-4:    #8B2035;
  --crimson-mid:  #5C1222;

  /* Teal — the sacred elephant accent */
  --teal:         #2A7D6E;
  --teal-l:       #3DAAA0;
  --teal-d:       #1A5248;
  --teal-glow:    rgba(42,125,110,0.25);

  /* Text */
  --cream:        #FDF5E6;
  --cream-d:      #EAD9B8;
  --muted:        #B08A5A;
  --muted-l:      #C9A87A;

  /* Utility */
  --wa:           #25D366;
  --wa-d:         #128C7E;
  --danger:       #E05555;

  /* Shadows */
  --shadow-gold:    rgba(212,160,23,0.28);
  --shadow-crimson: rgba(59,10,20,0.7);
  --shadow-deep:    rgba(0,0,0,0.55);
}

/* ══════════════════════════════
   RESET & BASE
══════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--crimson);
  font-family: 'Cormorant Garamond', serif;
  color: var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }

/* ══════════════════════════════
   BROCADE TEXTURE
   Replicates logo background
══════════════════════════════ */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill='%23D4A017'%3E%3Cpath d='M20 2 Q24 10 20 18 Q16 10 20 2z'/%3E%3Cpath d='M20 22 Q24 30 20 38 Q16 30 20 22z'/%3E%3Cpath d='M2 20 Q10 16 18 20 Q10 24 2 20z'/%3E%3Cpath d='M22 20 Q30 16 38 20 Q30 24 22 20z'/%3E%3Ccircle cx='20' cy='20' r='2.5'/%3E%3Ccircle cx='1' cy='1' r='1.2'/%3E%3Ccircle cx='39' cy='1' r='1.2'/%3E%3Ccircle cx='1' cy='39' r='1.2'/%3E%3Ccircle cx='39' cy='39' r='1.2'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 40px 40px;
}

/* Warm radial glow */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 50% at 50% 20%,
    rgba(212,160,23,0.06) 0%, transparent 70%);
}

/* ══════════════════════════════
   SCROLLBAR
══════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--crimson); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-l), var(--gold-d));
  border-radius: 3px;
}

/* ══════════════════════════════
   NAVIGATION
══════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 200; height: 74px;
  background: linear-gradient(180deg, rgba(59,10,20,0.98), rgba(59,10,20,0.95));
  border-bottom: 1px solid rgba(212,160,23,0.35);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 32px rgba(0,0,0,0.55), 0 1px 0 rgba(212,160,23,0.12) inset;
}
.nav::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg,
    transparent 0%, var(--gold-d) 15%, var(--gold-l) 40%,
    var(--gold-xl) 50%, var(--gold-l) 60%, var(--gold-d) 85%, transparent 100%);
}
.nav-brand { display: flex; align-items: center; gap: 14px; }
.nav-logo {
  width: 50px; height: 50px; border-radius: 50%;
  border: 2px solid var(--gold); object-fit: cover;
  box-shadow: 0 0 20px var(--gold-glow), 0 0 0 4px rgba(212,160,23,0.08);
}
.nav-title { display: flex; flex-direction: column; }
.nav-title .n-main {
  font-family: 'Cinzel Decorative', serif; font-size: 1rem;
  color: var(--gold-l); letter-spacing: 0.06em; line-height: 1;
  text-shadow: 0 0 20px var(--gold-glow);
}
.nav-title .n-sub {
  font-size: 0.6rem; color: var(--muted); letter-spacing: 0.14em;
  margin-top: 3px; font-family: 'Cinzel', serif; text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a {
  font-family: 'Cinzel', serif; font-size: 0.78rem;
  letter-spacing: 0.14em; color: var(--cream-d);
  text-transform: uppercase; transition: color 0.2s;
  position: relative; padding-bottom: 4px;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, var(--teal-l), var(--gold-l));
  transform: scaleX(0); transition: transform 0.28s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-xl); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.cart-pill {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid rgba(212,160,23,0.38);
  border-radius: 3px; padding: 9px 20px;
  font-family: 'Cinzel', serif; font-size: 0.7rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-l); font-weight: 600;
  transition: all 0.25s; position: relative;
  background: rgba(212,160,23,0.04);
}
.cart-pill svg { opacity: 0.65; transition: opacity 0.25s; flex-shrink: 0; }
.cart-pill:hover {
  background: rgba(212,160,23,0.09);
  border-color: var(--gold-l);
  color: var(--gold-xl);
  box-shadow: 0 0 20px rgba(212,160,23,0.12);
}
.cart-pill:hover svg { opacity: 1; }
.cart-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--crimson-3); color: var(--gold-xl);
  border: 1.5px solid var(--gold); border-radius: 50%;
  width: 20px; height: 20px; font-size: 0.65rem;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', serif; font-weight: 700;
}
.cart-badge.bump { animation: badgeBump 0.3s ease; }
@keyframes badgeBump { 0%,100%{transform:scale(1)} 50%{transform:scale(1.45)} }

/* ══════════════════════════════
   ORNAMENTAL DIVIDERS
══════════════════════════════ */
.ornament-divider {
  display: flex; align-items: center; gap: 20px; width: 100%;
}
.ornament-divider::before, .ornament-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-d), var(--gold), var(--gold-d), transparent);
}
.ornament-divider span {
  color: var(--gold-l); font-size: 1.1rem; white-space: nowrap;
  text-shadow: 0 0 12px var(--gold-glow);
}

.section-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem); color: var(--gold-l);
  letter-spacing: 0.06em; text-align: center;
  text-shadow: 0 2px 20px var(--gold-glow), 0 0 60px rgba(212,160,23,0.15);
}
.section-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem); color: var(--muted-l);
  text-align: center; font-style: italic; margin-top: 8px; letter-spacing: 0.04em;
}

/* ══════════════════════════════
   BUTTONS
══════════════════════════════ */
.btn-gold {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--gold-d) 0%, var(--gold) 50%, var(--gold-l) 100%);
  background-size: 200% 100%;
  color: var(--crimson); font-family: 'Cinzel', serif;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; border-radius: 3px; padding: 14px 34px; border: none;
  transition: all 0.3s;
  box-shadow: 0 4px 24px var(--gold-glow), 0 1px 0 rgba(255,228,154,0.3) inset;
  cursor: pointer;
}
.btn-gold:hover {
  background-position: 100% 0; transform: translateY(-2px);
  box-shadow: 0 10px 36px var(--gold-glow);
}
.btn-outline {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(212,160,23,0.06); color: var(--gold-l);
  font-family: 'Cinzel', serif; font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; border-radius: 3px;
  padding: 13px 30px; border: 1.5px solid rgba(212,160,23,0.5);
  transition: all 0.25s; cursor: pointer;
}
.btn-outline:hover {
  background: rgba(212,160,23,0.14); color: var(--gold-xl);
  border-color: var(--gold-l); transform: translateY(-1px);
}
.btn-wa {
  display: inline-flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, var(--wa-d), var(--wa));
  color: #fff; font-family: 'Cinzel', serif; font-size: 0.9rem;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 50px; padding: 16px 40px; border: none;
  transition: all 0.25s; box-shadow: 0 8px 32px rgba(37,211,102,0.3); cursor: pointer;
}
.btn-wa:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 14px 44px rgba(37,211,102,0.5); }
.btn-wa svg { width: 22px; height: 22px; flex-shrink: 0; }

/* ══════════════════════════════
   PRODUCT CARD
══════════════════════════════ */
.product-card {
  background: linear-gradient(160deg, var(--crimson-3) 0%, var(--crimson-2) 100%);
  border: 1px solid rgba(212,160,23,0.18);
  border-radius: 6px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: all 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.product-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(42,125,110,0.05) 0%, rgba(212,160,23,0.05) 100%);
  opacity: 0; transition: opacity 0.32s; pointer-events: none;
}
.product-card:hover {
  border-color: var(--gold); transform: translateY(-7px);
  box-shadow: 0 24px 60px var(--shadow-crimson), 0 0 0 1px var(--gold), 0 0 40px var(--gold-glow);
}
.product-card:hover::before { opacity: 1; }

.product-img-wrap {
  position: relative; overflow: hidden; aspect-ratio: 1 / 1;
  background: var(--crimson);
}
.product-img-wrap::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 52%, rgba(59,10,20,0.5) 100%);
  pointer-events: none; z-index: 1;
}
.product-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover .product-img-wrap img { transform: scale(1.09); }

.product-tag-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: linear-gradient(135deg, var(--gold-d), var(--gold));
  color: var(--crimson); font-family: 'Cinzel', serif; font-size: 0.6rem;
  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 2px; box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.product-info { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-meta {
  font-size: 0.68rem; color: var(--teal-l); letter-spacing: 0.16em;
  text-transform: uppercase; margin-bottom: 6px; font-family: 'Cinzel', serif;
}
.product-name {
  font-family: 'Cinzel', serif; font-size: 1.02rem; color: var(--gold-pale);
  font-weight: 600; line-height: 1.3; margin-bottom: 8px;
}
.product-desc {
  font-size: 0.9rem; color: var(--muted); line-height: 1.65; flex: 1; font-style: italic;
}
.product-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid rgba(212,160,23,0.12);
}
.product-price {
  font-family: 'Cinzel', serif; font-size: 1.1rem; color: var(--gold-l);
  font-weight: 600; text-shadow: 0 0 16px var(--gold-glow);
}
.product-price span { font-size: 0.72rem; color: var(--muted); font-style: italic; }
.add-cart-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-d), var(--gold));
  color: var(--crimson); font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; transition: all 0.22s;
  box-shadow: 0 4px 14px var(--gold-glow);
}
.add-cart-btn:hover {
  background: linear-gradient(135deg, var(--teal-d), var(--teal));
  color: #fff; transform: scale(1.18) rotate(8deg);
  box-shadow: 0 6px 20px var(--teal-glow);
}
.add-cart-btn.added { background: linear-gradient(135deg, var(--teal-d), var(--teal-l)); color: #fff; }

/* ══════════════════════════════
   SIDEBAR
══════════════════════════════ */
.sidebar {
  position: sticky; top: 94px;
  background: linear-gradient(160deg, var(--crimson-3), var(--crimson-2));
  border: 1px solid rgba(212,160,23,0.18);
  border-radius: 6px; overflow: hidden;
}
.sidebar-header {
  background: linear-gradient(135deg, var(--crimson-4), var(--crimson-3));
  border-bottom: 1px solid rgba(212,160,23,0.2);
  padding: 18px 24px; font-family: 'Cinzel', serif; font-size: 0.7rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-l);
}
.sidebar-section { padding: 22px 24px; border-bottom: 1px solid rgba(212,160,23,0.08); }
.sidebar-section:last-child { border-bottom: none; }
.sidebar-section-title {
  font-family: 'Cinzel', serif; font-size: 0.62rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--teal-l); margin-bottom: 14px;
}
.sidebar-list { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.sidebar-list li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: 4px;
  font-family: 'Cormorant Garamond', serif; font-size: 1rem;
  color: var(--muted); transition: all 0.2s; cursor: pointer;
}
.sidebar-list li a:hover, .sidebar-list li a.active {
  background: rgba(212,160,23,0.1); color: var(--gold-l);
}
.count {
  font-family: 'Cinzel', serif; font-size: 0.6rem;
  color: var(--gold); background: rgba(212,160,23,0.1); border-radius: 50px; padding: 2px 8px;
}
.sub-list { margin-top: 3px; margin-left: 12px; border-left: 1px solid rgba(212,160,23,0.2); display: none; }
.sub-list.open { display: block; }
.sub-list li a { font-size: 0.9rem; padding: 7px 12px 7px 16px; color: var(--muted); }
.sub-list li a:hover, .sub-list li a.active { color: var(--teal-l); background: rgba(42,125,110,0.08); }

/* ══════════════════════════════
   CART ITEMS
══════════════════════════════ */
.cart-item {
  display: grid; grid-template-columns: 80px 1fr auto;
  gap: 20px; align-items: center; padding: 20px 0;
  border-bottom: 1px solid rgba(212,160,23,0.1);
  animation: slideIn 0.32s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.cart-item-img {
  width: 80px; height: 80px; border-radius: 4px; object-fit: cover;
  border: 1px solid rgba(212,160,23,0.3); box-shadow: 0 4px 14px var(--shadow-crimson);
}
.cart-item-name { font-family: 'Cinzel', serif; font-size: 0.95rem; color: var(--gold-pale); margin-bottom: 4px; }
.cart-item-meta { font-size: 0.82rem; color: var(--muted); font-style: italic; }
.qty-control { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.qty-btn {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid rgba(212,160,23,0.4); background: rgba(212,160,23,0.06);
  color: var(--gold-l); font-size: 1rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s;
}
.qty-btn:hover { background: var(--gold); color: var(--crimson); border-color: var(--gold); }
.qty-num { font-family: 'Cinzel', serif; font-size: 0.9rem; color: var(--gold-l); min-width: 20px; text-align: center; }
.cart-item-price { font-family: 'Cinzel', serif; font-size: 1.05rem; color: var(--gold-l); font-weight: 600; text-align: right; }
.remove-btn { background: none; border: none; color: rgba(212,160,23,0.3); font-size: 1rem; cursor: pointer; margin-top: 8px; display: block; margin-left: auto; transition: color 0.2s; }
.remove-btn:hover { color: var(--danger); }

/* ══════════════════════════════
   PANELS (cart page)
══════════════════════════════ */
.cart-panel, .summary-panel {
  background: linear-gradient(160deg, var(--crimson-3), var(--crimson-2));
  border: 1px solid rgba(212,160,23,0.16); border-radius: 6px; overflow: hidden;
}
.panel-header {
  background: linear-gradient(135deg, var(--crimson-4), var(--crimson-3));
  border-bottom: 1px solid rgba(212,160,23,0.18);
  padding: 18px 28px; display: flex; align-items: center; justify-content: space-between;
}
.panel-title {
  font-family: 'Cinzel', serif; font-size: 0.72rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-l);
}

/* ══════════════════════════════
   TOAST
══════════════════════════════ */
#toast {
  position: fixed; bottom: 32px; right: 32px; z-index: 9999;
  background: linear-gradient(135deg, var(--crimson-3), var(--crimson-2));
  border: 1px solid var(--gold); border-radius: 6px; padding: 14px 24px;
  font-family: 'Cinzel', serif; font-size: 0.8rem; color: var(--gold-l); letter-spacing: 0.08em;
  box-shadow: 0 8px 40px var(--shadow-crimson), 0 0 20px var(--gold-glow);
  transform: translateY(80px); opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); pointer-events: none;
}
#toast.show { transform: translateY(0); opacity: 1; }

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
footer {
  background: var(--crimson); border-top: 1px solid rgba(212,160,23,0.15);
  padding: 48px 40px; text-align: center; position: relative;
}
footer::before {
  content: ''; position: absolute; top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-d), var(--gold-l), var(--gold-d), transparent);
}
.footer-brand {
  font-family: 'Cinzel Decorative', serif; font-size: 1.15rem; color: var(--gold-l);
  margin-bottom: 8px; text-shadow: 0 0 24px var(--gold-glow);
}
.footer-sub { font-size: 0.85rem; color: var(--muted-l); font-style: italic; letter-spacing: 0.06em; }
.footer-links { display: flex; justify-content: center; gap: 32px; margin-top: 24px; }
.footer-links a {
  font-family: 'Cinzel', serif; font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold-l); }
.footer-copy { margin-top: 24px; font-size: 0.76rem; color: rgba(176,138,90,0.45); }

/* ══════════════════════════════
   EMPTY STATE
══════════════════════════════ */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-icon { font-size: 4rem; margin-bottom: 20px; opacity: 0.35; }
.empty-title { font-family: 'Cinzel', serif; font-size: 1.3rem; color: var(--gold); margin-bottom: 10px; }
.empty-sub { color: var(--muted); font-style: italic; }

/* ══════════════════════════════
   CAT CHIP
══════════════════════════════ */
.cat-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px; border-radius: 50px;
  border: 1.5px solid rgba(212,160,23,0.25);
  background: rgba(212,160,23,0.04);
  font-family: 'Cinzel', serif; font-size: 0.78rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); cursor: pointer; transition: all 0.22s; white-space: nowrap;
}
.cat-chip:hover, .cat-chip.active {
  border-color: var(--gold); background: rgba(212,160,23,0.1);
  color: var(--gold-l); box-shadow: 0 0 20px var(--gold-glow);
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 74px; left: 0; right: 0;
    background: var(--crimson-2); border-bottom: 1px solid rgba(212,160,23,0.3);
    padding: 20px; gap: 20px; box-shadow: 0 8px 32px var(--shadow-crimson);
  }
}
