/* =====================================================================
   Venkateshwara and Company — styles
   Brand colours are at the top. Everything else uses these tokens.
   ===================================================================== */
:root {
  --bg: #ffffff;
  --soft: #f6f5f3;
  --soft-2: #eeece8;
  --ink: #141414;
  --ink-2: #3d3d3d;
  --muted: #6f6f6f;
  --line: #e7e5e1;

  --brand: #a3191f;        /* deep red, from the shop's name board */
  --brand-dark: #82121a;
  --brand-soft: #fbeceb;
  --gold: #f0b429;
  --up: #b42318;           /* price went up */
  --down: #0f7a3d;         /* price went down */
  --wa: #128c4a;
  --wa-dark: #0d6e39;
  --open: #14843b;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --shadow: 0 1px 2px rgba(20, 20, 20, 0.05), 0 6px 20px -8px rgba(20, 20, 20, 0.12);
  --shadow-lg: 0 24px 60px -24px rgba(20, 20, 20, 0.35);

  --font: "Geist", "Anek Telugu", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font-te: "Anek Telugu", "Geist", ui-sans-serif, system-ui, sans-serif;
  --header-h: 68px;
  --sticky-top: 68px; /* replaced from JS with the real header height */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--sticky-top) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.lang-te { font-family: var(--font-te); font-size: 17px; }
body.drawer-open, body.modal-open { overflow: hidden; }

h1, h2, h3, h4 { margin: 0 0 0.4em; line-height: 1.12; color: var(--ink); font-weight: 650; letter-spacing: -0.022em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.1rem; letter-spacing: -0.01em; }
.lang-te h1, .lang-te h2, .lang-te h3 { letter-spacing: 0; line-height: 1.3; }
.lang-te h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
p { margin: 0 0 0.8em; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; color: inherit; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 28px; } }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 15px; height: 15px; }
.loading { color: var(--muted); padding: 20px 0; }
.load-error { background: var(--brand-soft); color: var(--up); padding: 12px 16px; margin-top: 16px; border-radius: var(--r-sm); }
.tag { display: inline-block; font-size: 0.68rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: #fff4d6; color: #7a5300; vertical-align: 1px; letter-spacing: 0; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn-lg { height: 52px; padding: 0 24px; font-size: 1rem; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.88rem; }
.btn-block { width: 100%; }
.btn-dark, .btn-primary { background: var(--ink); color: #fff; }
.btn-dark:hover, .btn-primary:hover { background: #000; }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-dark); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-dark); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--soft); }
.btn-outline, .btn-ghost-dark { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover, .btn-ghost-dark:hover { border-color: var(--ink); }
.btn-ghost { background: none; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }
.btn-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; }
.btn-icon:hover { border-color: var(--ink); }
.btn-xs { width: 30px; height: 30px; }
.btn-xs .icon { width: 14px; height: 14px; }
.text-link { display: inline-block; margin-top: 18px; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line); }
.text-link:hover { text-decoration-color: var(--ink); }

/* ---------------- header ---------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.sample-bar { background: #fff8e1; color: #6b4e00; font-size: 0.78rem; text-align: center; padding: 5px 16px; border-bottom: 1px solid #f3e3b0; }
.announce-bar { background: var(--brand); color: #fff; font-size: 0.86rem; font-weight: 600; text-align: center; padding: 7px 16px; }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }

.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.wm-mark { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.15rem; }
.wm-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.wm-main { font-weight: 650; font-size: 1.02rem; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-sub { font-size: 0.76rem; color: var(--muted); }
.wm-short { display: none; }
@media (max-width: 640px) { .wm-full { display: none; } .wm-short { display: inline; } }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav-link { padding: 8px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav-link:hover { background: var(--soft); color: var(--ink); }
.nav-link.active { color: var(--ink); background: var(--soft); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); }
.lang-switch button { border: 0; background: none; padding: 5px 11px; border-radius: 999px; font-size: 0.84rem; font-weight: 600; color: var(--muted); line-height: 1.2; }
.lang-switch button[lang="te"] { font-family: var(--font-te); font-size: 0.9rem; }
.lang-switch button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }

.list-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; font-size: 0.9rem; }
.list-btn:hover { border-color: var(--ink); }
.badge { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 0.7rem; font-weight: 700; display: grid; place-items: center; }
.badge[hidden] { display: none; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; margin-right: -8px; }

@media (max-width: 960px) {
  .menu-toggle { display: inline-grid; }
  .header-actions { margin-left: auto; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; padding: 8px 16px 16px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav-link { padding: 12px; border-radius: var(--r-sm); }
}
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .header-inner { gap: 10px; }
  .list-btn { display: none; } /* the bottom action bar has it */
  .wm-mark { width: 32px; height: 32px; font-size: 1rem; }
  .wm-main { font-size: 0.95rem; }
  .sample-bar { font-size: 0.7rem; padding: 4px 12px; }
  .lang-switch button { padding: 4px 10px; }
  .ls-full { display: none; }
}
.ls-short { display: none; }
@media (max-width: 640px) { .ls-short { display: inline; } }
@media (max-width: 360px) { .wm-sub { display: none; } }

/* ---------------- sections ---------------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-tight { padding: 24px 0 64px; }
.section-soft { background: var(--soft); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { margin: 0 0 4px; }
.section-head p { margin: 0; }

/* ---------------- hero ---------------- */
.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-sub { display: block; color: var(--brand); font-size: 0.5em; letter-spacing: -0.02em; margin-top: 12px; font-weight: 600; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-media { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 5 / 4; background: var(--soft-2); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-rate {
  position: absolute; left: 16px; bottom: 16px;
  display: grid; gap: 2px; text-align: left;
  padding: 12px 16px; border: 0; border-radius: var(--r);
  background: rgba(255, 255, 255, 0.96); box-shadow: var(--shadow-lg);
  font-variant-numeric: tabular-nums;
}
.hr-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.hr-name { font-weight: 600; font-size: 0.95rem; }
.hr-price { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 6px; }
.hr-price small { font-size: 0.8rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; margin-bottom: 18px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.is-open { background: #e7f6ec; color: var(--open); }
.status.is-open i { box-shadow: 0 0 0 4px rgba(20, 132, 59, 0.18); }
.status.is-closed { background: var(--soft); color: var(--ink-2); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 16 / 11; }
}

/* ---------------- today's rates ---------------- */
.rate-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rate-card {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rate-card:hover { border-color: #cfccc6; box-shadow: var(--shadow); }
.rc-cat { font-size: 0.78rem; color: var(--muted); }
.rc-name { font-weight: 600; line-height: 1.3; min-height: 2.6em; }
.rc-price { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; margin-top: 4px; }
.rc-price small { font-size: 0.82rem; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.rc-foot { display: flex; justify-content: space-between; align-items: end; gap: 8px; margin-top: 6px; }
@media (max-width: 960px) { .rate-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .rate-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
  .rate-cards::-webkit-scrollbar { display: none; }
  .rate-card { flex: 0 0 72%; scroll-snap-align: start; }
}

.rates-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rates-actions [hidden] { display: none; }
.stock { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; vertical-align: 1px; letter-spacing: 0; }
.stock::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.stock-in { color: var(--open); background: #e7f6ec; }
.stock-low { color: #8a5a00; background: #fff4d6; }
.stock-order, .stock-out { color: var(--ink-2); background: var(--soft-2); }
.rate-card .stock { align-self: flex-start; }
.trend { display: inline-flex; align-items: center; gap: 2px; font-size: 0.78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; letter-spacing: 0; }
.trend-up { color: var(--up); background: #fdecea; }
.trend-down { color: var(--down); background: #e6f4ec; }
.trend-flat { color: var(--muted); background: var(--soft); font-weight: 500; }
.spark { flex: none; }
.spark path { fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linejoin: round; }

/* ---------------- category tiles ---------------- */
.cat-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cat-tile { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--soft-2); color: #fff; text-decoration: none; isolation: isolate; }
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; z-index: -2; }
.cat-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.05) 60%); }
.cat-tile:hover img { transform: scale(1.04); }
.ct-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px; display: flex; flex-direction: column; }
.ct-body strong { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em; }
.ct-body span { font-size: 0.82rem; opacity: 0.88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-tile.no-img { color: var(--ink); }
.cat-tile.no-img::after { display: none; }
.ct-icon { position: absolute; top: 16px; left: 16px; color: var(--brand); }
@media (max-width: 760px) { .cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .ct-body { padding: 12px; } .ct-body strong { font-size: 1rem; } }

/* ---------------- estimator band ---------------- */
.est-band { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: end; padding: clamp(28px, 5vw, 48px); border-radius: var(--r-lg); background: var(--ink); color: #d9d9d9; }
.est-band h2 { color: #fff; }
.est-band p { margin: 0; max-width: 480px; }
.est-mini { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.est-mini label { flex: 1; min-width: 180px; }
.est-mini label > span { color: #bdbdbd; }
@media (max-width: 760px) { .est-band { grid-template-columns: 1fr; gap: 20px; } }

label > span { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
input[type="number"], input[type="search"], select {
  width: 100%; height: 46px; font: inherit; color: var(--ink);
  padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff;
}
input:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 20, 20, 0.08); }
select { padding-right: 36px; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6f6f' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; text-overflow: ellipsis; }

/* ---------------- stages ---------------- */
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.stages li { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.st-num { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 0.82rem; }
.stages strong { display: block; line-height: 1.3; }
.stages p { margin: 6px 0 0; font-size: 0.86rem; line-height: 1.6; }
.stages a { color: var(--ink-2); }
@media (max-width: 1080px) { .stages { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .stages { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
  .stages::-webkit-scrollbar { display: none; }
  .stages li { flex: 0 0 62%; scroll-snap-align: start; }
}

/* ---------------- gallery ---------------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }
.gallery figcaption { font-size: 0.86rem; color: var(--muted); padding: 8px 2px; }

/* ---------------- about ---------------- */
.about { display: grid; grid-template-columns: 120px 1fr; gap: 28px; align-items: start; max-width: 860px; }
.about-photo { width: 120px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 2.2rem; font-weight: 700; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
blockquote { margin: 0 0 16px; font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.5; color: var(--ink); letter-spacing: -0.01em; }
.about-sign { font-weight: 650; margin: 0; }
.about-sign span { display: block; font-weight: 400; font-size: 0.9rem; color: var(--muted); }
.facts { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { padding: 6px 12px; border-radius: 999px; background: var(--soft); font-size: 0.88rem; }
@media (max-width: 600px) { .about { grid-template-columns: 1fr; gap: 16px; } .about-photo { width: 84px; font-size: 1.5rem; } }

/* ---------------- contact ---------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; }
.contact-card { padding: clamp(20px, 3vw, 32px); border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); }
.contact-list { display: grid; grid-template-columns: auto 1fr; gap: 12px 24px; margin: 20px 0 24px; }
.contact-list dt { font-size: 0.85rem; color: var(--muted); padding-top: 1px; }
.contact-list dd { margin: 0; font-weight: 500; }
.contact-list a { color: var(--ink); }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.map-wrap { border-radius: var(--r-lg); overflow: hidden; min-height: 340px; background: var(--soft-2); border: 1px solid var(--line); }
.map-wrap iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------------- footer ---------------- */
.site-footer { background: var(--ink); color: #a9a9a9; padding: 48px 0 24px; font-size: 0.9rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { margin: 0 0 6px; }
.footer-name { color: #fff; font-weight: 650; font-size: 1.05rem; margin-bottom: 12px !important; line-height: 1.4; }
.footer-name span { color: var(--gold); font-weight: 500; font-family: var(--font-te); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.footer-links { list-style: none; margin: 0; padding: 0; columns: 2; }
.footer-links li { margin-bottom: 8px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 32px; padding-top: 18px; border-top: 1px solid #2c2c2c; font-size: 0.8rem; }
@media (max-width: 680px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------------- inner page head ---------------- */
.page-head { padding: clamp(28px, 5vw, 56px) 0 24px; }
.page-head p { max-width: 620px; color: var(--ink-2); font-size: 1.05rem; }
.search-box { display: flex; align-items: center; gap: 10px; max-width: 560px; margin-top: 18px; padding: 0 16px; height: 52px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--muted); }
.search-box:focus-within { background: #fff; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 20, 20, 0.08); }
.search-box input { height: 100%; border: 0; padding: 0; background: transparent; box-shadow: none !important; }

/* ---------------- price list ---------------- */
.tabs-wrap { position: sticky; top: var(--sticky-top); z-index: 20; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 500; font-size: 0.9rem; color: var(--ink-2); white-space: nowrap; }
.tab span { color: var(--muted); font-size: 0.78rem; margin-left: 2px; }
.tab:hover { border-color: var(--ink); }
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab.active span { color: #bdbdbd; }

.list-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.list-tools-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.list-tools-right select { width: auto; height: 38px; font-size: 0.88rem; border-radius: 999px; }
.brand-filter { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.bf-label { font-size: 0.85rem; color: var(--muted); margin-right: 4px; }
.chip { height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 0.85rem; }
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }

.group-title { margin: 32px 0 8px; font-size: 1.15rem; }
.group-title:first-child { margin-top: 0; }
.price-rows .prow-group { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }

.prow {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1fr) 170px 40px;
  gap: 16px; align-items: center;
  padding: 14px 18px; background: #fff;
  border: 1px solid var(--line); border-top: 0;
  font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background-color 0.12s;
}
.prow-head { cursor: default; background: var(--soft); border-top: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; padding: 10px 18px; font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.prow:not(.prow-head):hover { background: #fafaf9; }
.prow:last-child, .prow:has(+ .group-title) { border-radius: 0 0 var(--r) var(--r); }
.pr-name { display: flex; flex-direction: column; min-width: 0; }
.pr-name strong { font-weight: 600; }
.pr-name > span { font-size: 0.84rem; color: var(--muted); }
.pr-size { font-size: 0.9rem; color: var(--ink-2); }
.pr-price strong { font-size: 1.08rem; font-weight: 650; }
.pr-price span { font-size: 0.8rem; color: var(--muted); margin-left: 3px; }
.pr-trend { display: flex; align-items: center; gap: 10px; }
.pr-add { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); display: grid; place-items: center; transition: all 0.12s; }
.pr-add:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.pr-add .icon { width: 16px; height: 16px; }

@media (max-width: 760px) {
  /* row 1: name + add button · row 2: size, price, 30-day change */
  .prow { grid-template-columns: auto auto 1fr 36px; gap: 6px 12px; padding: 14px; }
  .prow-head { display: none; }
  .prow-head + .prow { border-top: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; }
  .pr-name { grid-column: 1 / 4; grid-row: 1; }
  .pr-add { grid-column: 4; grid-row: 1 / 3; }
  .pr-size { grid-column: 1; grid-row: 2; }
  .pr-price { grid-column: 2; grid-row: 2; }
  .pr-trend { grid-column: 3; grid-row: 2; justify-content: flex-end; }
  .spark { display: none; }
}
.empty { text-align: center; padding: 40px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); }
.empty .btn { margin-top: 8px; }

/* ---------------- product modal ---------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; visibility: hidden; }
.modal.open { visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 10, 10, 0.45); opacity: 0; transition: opacity 0.2s; }
.modal.open .modal-backdrop { opacity: 1; }
.modal-card {
  position: relative; width: 100%; max-width: 680px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: #fff; border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-lg);
  transform: translateY(12px); opacity: 0; transition: transform 0.22s ease-out, opacity 0.22s;
}
.modal.open .modal-card { transform: none; opacity: 1; }
.modal-close { position: absolute; top: 16px; right: 16px; }
.kicker { font-size: 0.84rem; color: var(--muted); margin-bottom: 6px; }
.modal-card h2 { padding-right: 48px; margin-bottom: 4px; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.detail-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.detail-price .label { font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.detail-price strong { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.detail-price .trend { margin-left: 4px; font-size: 0.84rem; }
.detail-img { border-radius: var(--r); margin-bottom: 12px; }
.specs { margin: 0 0 12px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.specs li { padding: 5px 11px; border-radius: 999px; background: var(--soft); font-size: 0.85rem; }

.history { margin: 20px 0; padding: 18px; border-radius: var(--r); border: 1px solid var(--line); }
.history h3 { font-size: 1rem; margin-bottom: 12px; }
.hist-stats { display: flex; gap: 28px; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.hist-stats span { display: block; font-size: 0.76rem; color: var(--muted); }
.hist-stats strong { font-weight: 650; }
.chart { position: relative; }
.chart svg { display: block; overflow: visible; touch-action: pan-y; }
.c-grid { stroke: var(--line); stroke-width: 1; }
.c-ylab, .c-xlab { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.c-ylab { text-anchor: end; }
.c-line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; }
.c-dot { fill: var(--brand); stroke: #fff; stroke-width: 2; }
.c-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.c-hover { fill: #fff; stroke: var(--brand); stroke-width: 2.5; }
.c-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 0.8rem; white-space: nowrap; display: flex; gap: 8px; }
.c-tip[hidden] { display: none; }
.hist-table summary { cursor: pointer; font-size: 0.88rem; color: var(--ink-2); margin-top: 10px; }
.hist-table table { border-collapse: collapse; margin-top: 8px; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.hist-table td, .hist-table th { padding: 5px 20px 5px 0; text-align: left; border-bottom: 1px solid var(--line); }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.modal-related { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.modal-related h4 { font-size: 0.9rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.related { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 0; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; font-variant-numeric: tabular-nums; }
.related:last-child { border-bottom: 0; }
.related:hover span:first-child { text-decoration: underline; }
@media (max-width: 640px) {
  .modal { padding: 0; align-items: end; }
  .modal-card { max-height: 92vh; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 24px 16px 28px; transform: translateY(40px); }
  .modal-actions .btn { flex: 1; }
  .history { padding: 14px; }
}

/* ---------------- estimator page ---------------- */
.est-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 28px; align-items: start; }
.est-form { display: grid; gap: 14px; padding: 20px; border-radius: var(--r-lg); background: var(--soft); position: sticky; top: calc(var(--sticky-top) + 72px); }
.est-form .hint { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.dims { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dims-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dims label > span { font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assumptions { border-top: 1px solid var(--line); padding-top: 10px; }
.assumptions summary { cursor: pointer; font-size: 0.88rem; font-weight: 600; color: var(--ink-2); }
.assumption-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.est-empty { padding: 48px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r-lg); }
.est-total-area { font-size: 1.02rem; margin-bottom: 12px; color: var(--ink-2); }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.tile { padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; gap: 2px; min-width: 0; font-variant-numeric: tabular-nums; }
.tile > span { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.tile strong { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.tile strong em { font-style: normal; font-size: 0.9rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.tile small { font-size: 0.8rem; color: var(--ink-2); }
.tile:first-child { background: var(--ink); border-color: var(--ink); }
.tile:first-child > span, .tile:first-child strong em { color: #b5b5b5; }
.tile:first-child strong, .tile:first-child small { color: #fff; }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.est-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 520px; }
.est-table th, .est-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.est-table th { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--soft); }
.est-table td:nth-child(n + 2), .est-table th:nth-child(n + 2) { text-align: right; white-space: nowrap; }
.est-table tbody tr:last-child td { border-bottom: 0; }
.est-table tfoot td { font-weight: 700; background: var(--soft); border-top: 1px solid var(--line); border-bottom: 0; }
.row-note { display: block; color: var(--muted); font-size: 0.78rem; }

.est-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.est-sections section, .est-others { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; min-width: 0; }
.est-others { margin-top: 16px; }
.est-sections h3, .est-others h3 { font-size: 1rem; margin-bottom: 10px; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.mini-table th { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); text-align: left; padding: 0 8px 6px 0; }
.mini-table td { padding: 7px 8px 7px 0; border-top: 1px solid var(--line); }
.mini-table td:nth-child(3), .mini-table th:nth-child(3), .mini-table td:nth-child(4), .mini-table th:nth-child(4) { text-align: right; }
.est-others .mini-table td:nth-child(2) { text-align: right; }
.est-others .mini-table td:nth-child(3) { text-align: right; }
.bar-cell { width: 28%; }
.bar { display: block; height: 8px; border-radius: 4px; background: var(--brand); opacity: 0.85; }
.grade { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.grade-opc { background: var(--ink); color: #fff; }
.grade-ppc { background: var(--soft-2); color: var(--ink); }
.est-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 14px; }
.disclaimer { font-size: 0.86rem; color: var(--muted); padding: 12px 14px; border-radius: var(--r-sm); background: #fff8e1; }

@media (max-width: 960px) { .est-sections { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .est-layout { grid-template-columns: 1fr; }
  .est-form { position: static; }
}
@media (max-width: 560px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .tiles .tile:first-child { grid-column: 1 / -1; }
  .est-table th, .est-table td { padding: 10px 10px; font-size: 0.86rem; }
}

/* ---------------- enquiry drawer ---------------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(10, 10, 10, 0.4); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 91;
  width: min(420px, 100%); display: flex; flex-direction: column;
  background: #fff; box-shadow: var(--shadow-lg);
  transform: translateX(105%); transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.drawer-open .drawer { transform: none; }
.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 20px; }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.drawer-foot:empty { display: none; }
.drawer-foot p { margin: 0; }
.drawer .empty { border: 0; }
.enq-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.enq-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qty { display: flex; align-items: center; gap: 6px; }
.qty span { min-width: 28px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.enq-total { display: flex; justify-content: space-between; align-items: baseline; }
.enq-total strong { font-size: 1.4rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------------- toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 120;
  display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px);
  padding: 12px 16px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 0.9rem; box-shadow: var(--shadow-lg);
  transform: translate(-50%, 160%); transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.toast.show { transform: translate(-50%, 0); }
.toast span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast-link { flex: none; border: 0; background: none; color: var(--gold); font-weight: 600; padding: 0; }

/* ---------------- bottom action bar (phones) ---------------- */
.action-bar { display: none; }
@media (max-width: 640px) {
  .action-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid; grid-template-columns: repeat(3, 1fr);
    background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .action-bar a, .action-bar button {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 4px; border: 0; background: none; border-radius: var(--r-sm);
    color: var(--ink); text-decoration: none; font-size: 0.74rem; font-weight: 600;
  }
  .action-bar .ab-wa { color: var(--wa); }
  .action-bar .badge { top: 0; right: calc(50% - 22px); }
  body { padding-bottom: 68px; }
  .toast { bottom: 84px; }
  .drawer-open .action-bar, .modal-open .action-bar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
