/* ============================================================
   Khoopuram Silks — stylesheet
   Palette: temple maroon · antique gold · peacock teal · silk ivory
   Display: Marcellus (inscriptional) · Body: Inter
   Signature: cusped temple-arch frames + double zari-gold rules
   ============================================================ */

:root {
  --maroon:      #5c1a2b;
  --maroon-deep: #43101e;
  --kumkum:      #a8324a;
  --gold:        #c9a14a;
  --gold-soft:   #e3cd93;
  --teal:        #14524e;
  --teal-deep:   #0e3a37;
  --ivory:       #f7f1e6;
  --ivory-warm:  #f1e7d3;
  --ink:         #2b1a1e;
  --muted:       #6f5f5a;
  --line:        rgba(92,26,43,.16);
  --radius:      4px;
  --shadow:      0 18px 50px -28px rgba(67,16,30,.45);
  --maxw:        1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body { overflow-x: hidden; }
@supports (overflow-x: clip) { body { overflow-x: clip; } }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, .display {
  font-family: 'Marcellus', 'Cormorant Garamond', serif;
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1.12;
  margin: 0 0 .4em;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.eyebrow {
  font-size: .72rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 .6rem;
}

/* ---------- Zari rule: the double-gold divider motif ---------- */
.zari {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin: 0 auto;
}
.zari::before, .zari::after {
  content: ""; height: 1px; flex: 1; max-width: 160px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.zari::after { background: linear-gradient(90deg, var(--gold), transparent); }
.zari .diamond {
  width: 9px; height: 9px; transform: rotate(45deg);
  border: 1.5px solid var(--gold);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: inherit; font-size: .82rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .95rem 1.8rem; border-radius: var(--radius);
  border: 1.5px solid var(--maroon); cursor: pointer;
  background: var(--maroon); color: var(--ivory);
  transition: .25s ease;
}
.btn:hover { background: var(--maroon-deep); border-color: var(--maroon-deep); transform: translateY(-2px); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--maroon-deep); }
.btn--gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn--ghost { background: transparent; color: var(--maroon); }
.btn--ghost:hover { background: var(--maroon); color: var(--ivory); }
.btn--wa { background: #1f8a4c; border-color: #1f8a4c; color: #fff; }
.btn--wa:hover { background: #176c3b; border-color: #176c3b; }
.btn--sm { padding: .6rem 1.1rem; font-size: .72rem; }
.btn--block { width: 100%; justify-content: center; }

/* ============================================================
   Header
   ============================================================ */
.topbar {
  background: var(--maroon-deep); color: var(--gold-soft);
  font-size: .78rem; letter-spacing: .04em;
}
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; padding: 8px 22px; }
.topbar a { color: var(--gold-soft); }
.topbar a:hover { color: #fff; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; padding: 14px 22px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark { width: auto; height: 52px; max-width: 150px; object-fit: contain; }
.brand-logo { height: 76px; width: auto; max-width: 300px; object-fit: contain; display: block; }
.brand--plate { background: var(--ivory); padding: 9px 16px; border-radius: 12px; }
.brand--plate .brand-logo { height: 58px; }
.brand .name { font-family: 'Marcellus', serif; font-size: 1.5rem; line-height: 1; color: var(--maroon); }
.brand .name small { display: block; font-family: 'Inter'; font-size: .58rem; letter-spacing: .35em;
  text-transform: uppercase; color: var(--gold); margin-top: 3px; }

.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a {
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 500; color: var(--ink); padding: 6px 0; position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--gold); transition: width .25s;
}
.nav a:hover::after, .nav a.active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.cart-link { position: relative; display: inline-flex; }
.cart-link .count {
  position: absolute; top: -8px; right: -10px; min-width: 18px; height: 18px;
  background: var(--gold); color: var(--maroon-deep); border-radius: 50%;
  font-size: .66rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px;
}
.icon-btn { background: none; border: none; cursor: pointer; color: var(--maroon); padding: 4px; }
.menu-toggle { display: none; }

/* ============================================================
   Hero — the temple-arch thesis
   ============================================================ */
.hero { position: relative; background: var(--ivory-warm); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px; align-items: center;
  padding-top: 64px; padding-bottom: 64px; }
.hero-copy h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); color: var(--maroon); }
.hero-copy p { font-size: 1.08rem; color: var(--muted); max-width: 46ch; margin: 0 0 1.8rem; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Arched image frame = signature */
.arch {
  position: relative; padding: 14px;
  background:
    linear-gradient(var(--ivory), var(--ivory)) padding-box,
    repeating-linear-gradient(45deg, var(--gold) 0 6px, var(--gold-soft) 6px 12px) border-box;
  border: 3px solid transparent;
  border-radius: 50% 50% var(--radius) var(--radius) / 38% 38% var(--radius) var(--radius);
  box-shadow: var(--shadow);
}
.arch .arch-inner {
  border-radius: 50% 50% var(--radius) var(--radius) / 38% 38% var(--radius) var(--radius);
  overflow: hidden; aspect-ratio: 3/4; background: var(--maroon);
}
.arch .arch-inner img { width: 100%; height: 100%; object-fit: cover; }
.hero .arch::after { /* finial dot at apex */
  content: ""; position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; background: var(--gold); border-radius: 50%;
  box-shadow: 0 0 0 4px var(--ivory-warm), 0 0 0 6px var(--gold-soft);
}

/* ============================================================
   Sections
   ============================================================ */
.section { padding: 72px 0; }
.section--tint { background: var(--ivory-warm); }
.section--maroon { background: var(--maroon); color: var(--ivory); }
.section--maroon h2 { color: #fff; }
.section--maroon .eyebrow { color: var(--gold-soft); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); color: var(--maroon); }
.section--maroon .section-head h2 { color: #fff; }
.section-head p { color: var(--muted); margin: .6rem 0 0; }
.section--maroon .section-head p { color: var(--gold-soft); }
.section-head .zari { margin-bottom: 18px; }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cat-card {
  position: relative; display: block; padding: 30px 24px;
  background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius);
  transition: .25s; overflow: hidden;
}
.cat-card::before {
  content: ""; position: absolute; inset: 6px; border: 1px solid var(--gold);
  border-radius: 2px; opacity: .4; pointer-events: none;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); }
.cat-card h3 { font-size: 1.4rem; color: var(--maroon); }
.cat-card p { color: var(--muted); font-size: .9rem; margin: 0; }
.cat-card .go { margin-top: 14px; font-size: .76rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); font-weight: 700; }

/* ---------- Product grid + card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.product-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .25s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--gold-soft); }
.card .media { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--ivory-warm); }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .media img { transform: scale(1.05); }
.card .badge {
  position: absolute; top: 12px; left: 12px; background: var(--gold); color: var(--maroon-deep);
  font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 2px;
}
.card .badge--sale { background: var(--kumkum); color: #fff; }
.card .body { padding: 16px 16px 20px; display: flex; flex-direction: column; flex: 1; }
.card .cat { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.card h3 { font-size: 1.12rem; margin: 6px 0 4px; color: var(--ink); }
.card .meta { font-size: .82rem; color: var(--muted); margin-bottom: 12px; }
.card .price { margin-top: auto; display: flex; align-items: baseline; gap: 8px; }
.card .price .now { font-family: 'Marcellus', serif; font-size: 1.25rem; color: var(--maroon); }
.card .price .was { font-size: .9rem; color: var(--muted); text-decoration: line-through; }
.card .actions { margin-top: 14px; display: flex; gap: 8px; }

/* ---------- Promise / values strip ---------- */
.promise { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; text-align: center; }
.promise .item .ic { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--gold); }
.promise .item h3 { font-size: 1.05rem; color: #fff; }
.promise .item p { font-size: .86rem; color: var(--gold-soft); margin: 0; }

/* ============================================================
   Shop / listing layout
   ============================================================ */
.shop-layout { display: grid; grid-template-columns: 240px 1fr; gap: 36px; }
.filter-card { background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.filter-card h4 { font-family: 'Inter'; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 14px; }
.filter-list { list-style: none; margin: 0 0 24px; padding: 0; }
.filter-list li { margin-bottom: 6px; }
.filter-list a { display: block; padding: 7px 10px; border-radius: 3px; font-size: .92rem; color: var(--ink); }
.filter-list a:hover, .filter-list a.active { background: var(--maroon); color: var(--ivory); }
.shop-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.shop-head h1 { font-size: 2rem; color: var(--maroon); margin: 0; }
.searchbar { display: flex; gap: 8px; }
.searchbar input { padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: inherit; min-width: 220px; background: #fff; }
.searchbar input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

/* ============================================================
   Product detail
   ============================================================ */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.pdp .gallery .arch { max-width: 460px; }
.pdp h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); color: var(--maroon); }
.pdp .cat { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.pdp .price-row { display: flex; align-items: baseline; gap: 14px; margin: 14px 0; }
.pdp .price-row .now { font-family: 'Marcellus', serif; font-size: 2rem; color: var(--maroon); }
.pdp .price-row .was { font-size: 1.1rem; color: var(--muted); text-decoration: line-through; }
.pdp .spec { width: 100%; border-collapse: collapse; margin: 22px 0; }
.pdp .spec th, .pdp .spec td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.pdp .spec th { width: 38%; color: var(--muted); font-weight: 600; }
.pdp .qty { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); width: fit-content; }
.pdp .qty button { background: none; border: none; width: 40px; height: 40px; font-size: 1.2rem; cursor: pointer; color: var(--maroon); }
.pdp .qty input { width: 48px; text-align: center; border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line); height: 40px; font-family: inherit; }
.pdp .buy-row { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* ============================================================
   Cart / checkout
   ============================================================ */
.panel { background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); padding: 12px; border-bottom: 1px solid var(--line); }
.cart-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-prod { display: flex; gap: 14px; align-items: center; }
.cart-prod img { width: 64px; height: 80px; object-fit: cover; border-radius: 3px; }
.cart-prod strong { display: block; font-weight: 600; }
.cart-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; align-items: start; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: .95rem; }
.summary-row.total { border-top: 2px solid var(--gold); margin-top: 10px; padding-top: 14px;
  font-family: 'Marcellus', serif; font-size: 1.35rem; color: var(--maroon); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: inherit; font-size: .95rem; background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.radio-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin-bottom: 10px; cursor: pointer; }
.radio-card:hover { border-color: var(--gold); }
.radio-card input { margin-top: 4px; }

/* ---------- Alerts / empty ---------- */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: .92rem; }
.alert--ok { background: #e7f4ec; color: #1f6b3b; border: 1px solid #bfe3cd; }
.alert--err { background: #fbe9ec; color: #9c2538; border: 1px solid #f1c4cd; }
.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty .mark { width: 70px; margin: 0 auto 18px; opacity: .5; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--maroon-deep); color: var(--gold-soft); padding: 60px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.site-footer h4 { font-family: 'Inter'; font-size: .76rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 16px; }
.site-footer a { color: var(--gold-soft); display: block; padding: 4px 0; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.site-footer .brand .name { color: var(--ivory); }
.site-footer .lede { font-size: .92rem; line-height: 1.7; max-width: 34ch; }
.footer-bottom { border-top: 1px solid rgba(227,205,147,.2); margin-top: 40px; padding-top: 20px;
  display: flex; justify-content: space-between; font-size: .8rem; flex-wrap: wrap; gap: 8px; }

/* ---------- WhatsApp float ---------- */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 80; width: 56px; height: 56px;
  background: #1f8a4c; border-radius: 50%; display: grid; place-items: center; color: #fff;
  box-shadow: 0 12px 30px -8px rgba(31,138,76,.6); transition: .25s; }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero .gallery { order: -1; max-width: 360px; margin: 0 auto; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pdp { grid-template-columns: 1fr; }
  .shop-layout { grid-template-columns: 1fr; }
  .cart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav { position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px); z-index: 60;
    background: var(--ivory); flex-direction: column; padding: 90px 28px; gap: 4px;
    overflow-y: auto; transform: translateX(100%); transition: transform .3s; box-shadow: var(--shadow); }
  .nav.open { transform: translateX(0); }
  .nav a { padding: 12px 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .menu-toggle { display: inline-flex; margin-left: auto; position: relative; z-index: 70; }
  .cat-grid, .product-grid, .product-grid.cols-3, .promise { grid-template-columns: 1fr 1fr; }
  .promise { gap: 30px 18px; }
  .topbar .wrap { font-size: .68rem; }
  .brand-logo { height: 62px; }
  .brand--plate .brand-logo { height: 50px; }
}
@media (max-width: 460px) {
  .product-grid, .cat-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* Reveal on scroll — only hides when JS is active (graceful fallback) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Mobile cart — stack the table into cards (fixes column overlap)
   ============================================================ */
@media (max-width: 640px) {
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
  .cart-table tr { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
  .cart-table td { border: none; padding: 7px 0; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
  .cart-table td[data-label]::before {
    content: attr(data-label); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
    color: var(--muted); font-weight: 600; flex: 0 0 auto;
  }
  .cart-table td.cart-prod-cell { padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
  .cart-prod img { width: 56px; height: 70px; }
  .cart-table td.cart-remove-cell { justify-content: flex-end; }
}

/* ============================================================
   Share-this-saree buttons (product page)
   ============================================================ */
.share-row { display: flex; align-items: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.share-row .lbl { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.share-btn { display: inline-flex; align-items: center; gap: 7px; padding: .55rem .95rem; border-radius: var(--radius);
  font-size: .8rem; font-weight: 600; color: #fff; transition: transform .2s, opacity .2s; }
.share-btn svg { width: 16px; height: 16px; }
.share-btn:hover { transform: translateY(-2px); opacity: .92; }
.share-wa { background: #1f8a4c; }
.share-fb { background: #1877f2; }
