/* Coway Melaka Sales Team: Google Ads landing page, "Peranakan" brand (Abu's pick, 2026-11-03).
   Same page structure as cowaysmalaysia.com (shop + location, profile, customer photos, products)
   but its own identity: deep Peranakan teal, tile coral for promo prices, Red Hat Display for
   headlines and text (Abu picked it from 5 previews). WhatsApp green stays on every chat button so people recognise it. */

@font-face {
  font-family: "Red Hat Display";
  src: url("../assets/fonts/red-hat-display.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  /* Peranakan palette */
  --brand: #0d5c63;          /* deep teal: header, hero, tabs, prices on white (7.4:1 with white text) */
  --brand-deep: #094a50;
  --ink: #0f2a2c;            /* text, closing band, footer */
  --muted: #4a6264;          /* secondary text, 6.4:1 on white */
  --line: #d6e6e4;
  --paper: #f4faf9;
  --pastel: #e4f2ef;         /* product photo ground */
  --accent: #ffb4a2;         /* tile coral: promo prices on teal (6:1) */
  --wa: #25d366;
  --wa-hover: #1ebe5b;
  --on-brand: #dff3f1;       /* secondary text on teal */
  --on-ink: #c9dedd;         /* secondary text on the dark band */

  /* Display type: Red Hat Display 800 in sentence case, sized down from the old condensed scale */
  --d-case: none; --d-weight: 800; --d-scale: 0.84; --d-lh: 1.02; --d-track: -0.02em;

  --display: "Red Hat Display", Arial, sans-serif;
  --body: "Red Hat Display", Arial, sans-serif;

  --t-body: 1.125rem;
  --t-small: 1rem;
  --t-legal: 0.9375rem;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --section: clamp(var(--s-8), 8vw, var(--s-9));
  --radius: 18px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--brand);
  scrollbar-color: var(--brand) var(--paper);
}
::selection { background: var(--accent); color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure, address { margin: 0; }
a { color: var(--brand); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
/* On the dark teal and ink bands the ring switches to coral so it stays visible */
:is(.top, .hero, .close) :focus-visible { outline-color: var(--accent); }

/* Display type: headline role */
h1, h2, .brand__name {
  font-family: var(--display);
  font-weight: var(--d-weight);
  text-transform: var(--d-case);
  letter-spacing: var(--d-track);
  text-wrap: balance;
}
h2 { font-size: calc(clamp(2.5rem, 1.6rem + 3.4vw, 4.25rem) * var(--d-scale)); line-height: var(--d-lh); }

.wrap { width: min(1240px, 100% - 2 * clamp(20px, 4vw, 48px)); margin-inline: auto; }

.skip { position: absolute; left: 16px; top: -80px; z-index: 60; padding: 12px 16px; border-radius: 8px; background: var(--ink); color: #fff; }
.skip:focus, .skip:hover { top: 12px; color: #fff; }

.placeholder {
  display: inline-block; padding: 0 0.45em; border: 1.5px dashed var(--brand); border-radius: 6px;
  background: var(--pastel); color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums;
}
.todo { color: var(--muted); font-style: italic; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 10px 22px;
  border: 2px solid transparent; border-radius: 999px;
  font: inherit; font-size: 1.0625rem; font-weight: 700; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color 150ms, color 150ms, border-color 150ms, transform 150ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--big { min-height: 62px; padding-inline: 32px; font-size: 1.1875rem; }
.btn--wa { background: var(--wa); color: var(--ink); }
.btn--wa:hover { background: var(--wa-hover); color: var(--ink); }
.btn--line { border-color: var(--ink); color: var(--ink); background: #fff; }
.btn--line:hover { background: var(--ink); color: #fff; }
/* Map buttons wear their own app colours so people recognise them at a glance */
.btn--gmaps { background: #1a73e8; color: #fff; }          /* Google Maps blue, white text 4.5:1 */
.btn--gmaps:hover { background: #1765cc; color: #fff; }
.btn--waze { background: #33ccff; color: #08222c; }        /* Waze cyan, dark text 10:1 */
.btn--waze:hover { background: #1fbdf0; color: #08222c; }
.map-icon { width: 22px; height: 22px; flex: none; fill: currentColor; }
.wa-icon { width: 24px; height: 24px; flex: none; fill: currentColor; }

/* ---------- Header (blue, like cowaysmalaysia.com) ---------- */

.top { position: sticky; top: 0; z-index: 40; background: var(--brand); border-bottom: 1px solid rgb(255 255 255 / 0.18); }
.top__inner { display: flex; align-items: center; gap: var(--s-5); min-height: 80px; }
.brand { display: grid; line-height: 1; text-decoration: none; color: #fff; margin-right: auto; }
.brand__name { font-size: 2rem; }
.brand__sub { font-size: var(--t-small); font-weight: 600; color: var(--accent); margin-top: 2px; }
.nav { display: flex; gap: var(--s-6); }
.nav a { color: #fff; font-weight: 600; text-decoration: none; padding-block: 10px; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--accent); }
.lang { display: inline-flex; padding: 4px; border: 1.5px solid rgb(255 255 255 / 0.55); border-radius: 999px; }
.lang button {
  min-width: 46px; min-height: 42px; border: 0; border-radius: 999px;
  background: transparent; color: #fff; font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: #fff; color: var(--brand); }

/* ---------- Hero: the shop + where it is ---------- */

.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(var(--s-7), 6vw, var(--s-8)) clamp(var(--s-8), 8vw, 112px);
  background: var(--brand); color: #fff;
}
.hero__grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(var(--s-6), 5vw, var(--s-8)); align-items: center;
}
h1 { font-size: calc(clamp(3.4rem, 1.8rem + 6vw, 7rem) * var(--d-scale)); line-height: var(--d-lh); }
.hero__lede { margin-top: var(--s-5); font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem); max-width: 34ch; }

.hero__price { margin-top: var(--s-6); }
.hero__rm { font-family: var(--display); font-weight: var(--d-weight); font-size: calc(clamp(4rem, 3rem + 4vw, 6rem) * var(--d-scale)); line-height: 0.9; color: var(--accent); }
.hero__from, .hero__per { font-family: var(--body); font-size: 1.125rem; font-weight: 700; color: #fff; }
.hero__from { margin-right: -2px; }
.hero__note { margin-top: var(--s-2); color: var(--on-brand); }
.hero__ctas { margin-top: var(--s-6); }

.hero__shop { position: relative; padding-bottom: 96px; }
.storefront { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 60px -30px rgb(3 20 60 / 0.7); }
.storefront img { width: 100%; aspect-ratio: 1180 / 941; object-fit: cover; }
.storefront__chip {
  position: absolute; top: 14px; right: 14px; padding: 4px 12px; border-radius: 999px;
  background: rgb(7 30 57 / 0.72); color: #fff; font-size: 0.9375rem; font-weight: 600;
}
.loc {
  position: absolute; left: -28px; bottom: 0; width: min(380px, 92%);
  padding: var(--s-5); border-radius: var(--radius);
  background: #fff; color: var(--ink);
  box-shadow: 0 20px 40px -20px rgb(3 20 60 / 0.55);    /* card sits on the photo */
}
.loc__title { font-family: var(--display); font-weight: var(--d-weight); text-transform: var(--d-case); font-size: 1.75rem; line-height: 1; }
.loc__addr { margin-top: var(--s-2); font-style: normal; line-height: 1.45; }
.loc__near { margin-top: var(--s-1); color: var(--muted); font-weight: 600; }
.loc__btns { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.loc__btns .btn { flex: 1 1 auto; min-height: 48px; padding-inline: 16px; font-size: 1rem; white-space: nowrap; }

/* ---------- Profile ---------- */

.profile { padding-block: var(--section); }
.profile__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(var(--s-6), 5vw, var(--s-8)); align-items: center; }
.profile__lede { margin-top: var(--s-5); font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem); color: var(--muted); max-width: 52ch; }
.facts { list-style: none; padding: 0; margin-top: var(--s-6); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.facts li { display: grid; align-content: start; gap: 4px; padding: var(--s-4) var(--s-5); border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
.facts strong { font-family: var(--display); font-weight: var(--d-weight); font-size: calc(2.25rem * var(--d-scale)); line-height: 1; text-transform: var(--d-case); color: var(--brand); }
.facts span { font-size: var(--t-small); color: var(--ink); }
.profile__cta { margin-top: var(--s-6); }
.map { position: relative; align-self: stretch; min-height: 420px; border-radius: var(--radius); overflow: hidden; background: var(--pastel); border: 1px solid var(--line); }
.map__note { position: absolute; inset: 0; display: grid; place-items: center; padding: var(--s-5); text-align: center; color: var(--muted); }
.map__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Customer photos ---------- */

.reviews { padding-block: var(--section); background: var(--paper); border-block: 1px solid var(--line); }
.reviews__head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-5); }
.reviews__head h2 { color: var(--ink); }
.reviews__head p { margin-top: var(--s-3); color: var(--muted); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); }
.strip-nav { display: flex; gap: var(--s-2); flex: none; }
.round {
  width: 54px; height: 54px; display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer;
}
.round:hover { background: var(--ink); color: #fff; }
.round svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.round:disabled { opacity: 0.35; cursor: default; background: #fff; color: var(--ink); }

.strip {
  list-style: none; margin: var(--s-6) 0 0; padding: 0 max(20px, (100% - 1240px) / 2) var(--s-2);
  display: flex; gap: var(--s-4); overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding-inline: max(20px, (100% - 1240px) / 2); scrollbar-width: thin;
}
.shot { flex: none; scroll-snap-align: start; }
.shot { width: clamp(240px, 21vw, 290px); }
.shot img { display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 16px; }
.shot img { height: auto; object-fit: cover; background: var(--pastel); }
.shot figcaption { margin-top: var(--s-3); font-size: var(--t-small); font-weight: 600; }

/* ---------- Products ---------- */

.products { padding-block: var(--section); }
.products__head { display: grid; gap: var(--s-3); }
.products__head p { color: var(--muted); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); max-width: 40ch; }

.tabs { display: flex; gap: var(--s-2); margin-top: var(--s-6); padding: 6px; border-radius: 999px; background: var(--brand); width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tab {
  flex: none; min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
  background: transparent; color: #fff; font: inherit; font-size: 1.0625rem; font-weight: 700; cursor: pointer;
}
.tab:hover { background: rgb(255 255 255 / 0.14); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--ink); }

.grid-wrap { margin-top: var(--s-6); outline: none; }
.grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: var(--s-5); }
.grid__msg { color: var(--muted); }

.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.card__media { position: relative; height: 260px; padding: var(--s-7) var(--s-5) var(--s-3); background: var(--pastel); display: flex; align-items: flex-end; justify-content: center; }
.card__media img { height: 100%; width: auto; max-width: 90%; object-fit: contain; }
.card__media.is-missing img { visibility: hidden; }
.card__cat { position: absolute; top: 14px; left: 16px; font-size: 0.9375rem; font-weight: 700; color: var(--muted); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: var(--s-5); }
.card__name { font-family: var(--display); font-weight: var(--d-weight); text-transform: var(--d-case); font-size: calc(2.125rem * var(--d-scale)); line-height: 0.95; }
.card__tag { margin-top: var(--s-2); color: var(--muted); font-size: var(--t-small); }
.price { display: flex; justify-content: space-between; align-items: end; gap: var(--s-3); margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.price__rm { font-family: var(--display); font-weight: var(--d-weight); font-size: calc(3rem * var(--d-scale)); line-height: 0.85; color: var(--brand); }
.price__per { font-size: var(--t-small); font-weight: 700; color: var(--brand); }
.price__for { margin-top: 4px; font-size: var(--t-small); color: var(--muted); }
.price__after { text-align: right; }
.price__after small { display: block; font-size: var(--t-small); color: var(--muted); }
.price__after strong { font-size: 1.25rem; font-weight: 700; white-space: nowrap; }
.card__plan { margin: var(--s-3) 0 var(--s-4); font-size: var(--t-small); color: var(--muted); }
.card__ctas { display: flex; gap: var(--s-2); margin-top: auto; }
.card__ctas .btn { flex: 1 1 0; min-height: 50px; padding-inline: 12px; }
.btn--card { width: 100%; }
.tabs { scroll-margin-top: 96px; }

.note { margin-top: var(--s-6); max-width: 75ch; color: var(--muted); font-size: var(--t-small); }

/* ---------- Closing + footer ---------- */

.close { padding-block: var(--section); background: var(--ink); color: #fff; }
.close__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-5) var(--s-7); }
.close h2 { max-width: 16ch; }
.close p { margin-top: var(--s-3); color: var(--on-ink); max-width: 46ch; }
.foot { padding-block: var(--s-6) var(--s-7); background: var(--ink); color: var(--on-ink); border-top: 1px solid rgb(255 255 255 / 0.12); }
.foot .wrap { display: grid; gap: var(--s-2); font-size: var(--t-legal); }

.dock { display: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) { .nav { display: none; } }

@media (max-width: 900px) {
  .hero__grid, .profile__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__shop { padding-bottom: 0; }
  .loc { position: relative; left: auto; bottom: auto; width: auto; margin: -48px 14px 0; }
  .map { min-height: 340px; }
}

@media (max-width: 640px) {
  .top__inner { min-height: 66px; gap: var(--s-3); }
  .brand__name { font-size: 1.625rem; }
  .btn--top { display: none; }
  .hero__ctas .btn { width: 100%; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts li { grid-template-columns: auto 1fr; align-items: baseline; gap: var(--s-3); }
  .reviews__head { flex-direction: column; align-items: start; }
  .strip-nav { display: none; }
  .shot { width: 72vw; }
  .tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; border-radius: 22px; }
  .tab { padding-inline: 8px; }
  /* Two products per row on phones: the list stays short, prices stay big */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
  .card { border-radius: 14px; }
  .card__media { height: 150px; padding: var(--s-4) var(--s-2) var(--s-2); }
  .card__cat { display: none; }                 /* the selected tab already names the category */
  .card__body { padding: var(--s-3); }
  .card__name { font-size: 1.5rem; }
  .card__tag { margin-top: var(--s-1); line-height: 1.35; }
  .price { flex-direction: column; align-items: flex-start; gap: var(--s-2); margin-top: var(--s-3); padding-top: var(--s-3); }
  .price__rm { font-size: 2.5rem; }
  .price__after { text-align: left; }
  .price__after strong { font-size: 1.0625rem; }
  .card__plan { margin: var(--s-2) 0 var(--s-3); line-height: 1.4; }
  .card__ctas { flex-direction: column; }
  .card__ctas .btn { min-height: 46px; padding-inline: 8px; }

  .dock {
    position: fixed; z-index: 50; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    display: flex; min-height: 58px; font-size: 1.125rem;
    box-shadow: 0 10px 28px -10px rgb(3 20 60 / 0.55);
    transition: transform 250ms var(--ease), visibility 0s;
  }
  .dock.is-hidden { transform: translateY(calc(100% + 24px)); visibility: hidden; transition: transform 250ms var(--ease), visibility 0s linear 250ms; }
  .foot { padding-bottom: calc(var(--s-7) + 80px); }
}

/* ===================== Product sheet (impeccable overdrive) ===================== */

html.is-locked { overflow: hidden; }
html.is-locked .dock { visibility: hidden; }   /* the sheet carries its own WhatsApp button */

/* ---------- Product sheet ---------- */

.sheet {
  width: min(980px, 100% - 32px); max-width: none; max-height: calc(100dvh - 48px);
  margin: auto; padding: 0; border: 0; background: transparent; overflow: visible;
}
.sheet::backdrop { background: rgb(15 42 44 / 0.62); backdrop-filter: blur(4px); }   /* the one blur on the page: keeps focus on the sheet */
.sheet__panel {
  position: relative; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  max-height: calc(100dvh - 48px); border-radius: 24px; overflow: hidden; background: #fff; color: var(--ink);
}
.sheet__media { display: grid; place-items: center; padding: var(--s-6); background: var(--pastel); }
.sheet__media img { width: 100%; max-height: 500px; object-fit: contain; }
.sheet__body { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-6); overflow-y: auto; }
.sheet__name { font-family: var(--display); font-weight: var(--d-weight); letter-spacing: var(--d-track); font-size: calc(2.75rem * var(--d-scale)); line-height: 1; padding-right: 56px; }
.sheet__meta { margin-top: calc(var(--s-2) * -1); color: var(--muted); font-weight: 600; }
.sheet__tagline { color: var(--ink); }
.sheet__set { margin: 0; padding: 0; border: 0; min-width: 0; }
.sheet__set legend { padding: 0; margin-bottom: var(--s-2); font-weight: 700; }
.sheet__hint { margin-top: var(--s-2); color: var(--muted); font-size: var(--t-small); }
.pills { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pill { position: relative; }
.pill input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.pill span {
  display: grid; gap: 2px; min-height: 52px; padding: 10px 16px;
  border: 2px solid var(--line); border-radius: 14px; background: #fff;
  transition: border-color 150ms, background-color 150ms;
}
.pill b { font-weight: 700; }
.pill small { font-size: var(--t-small); color: var(--muted); font-variant-numeric: tabular-nums; }
.pill:hover span { border-color: var(--muted); }
.pill input:checked + span { border-color: var(--brand); background: var(--pastel); }
.pill input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.sheet__price { padding: var(--s-4) var(--s-5); border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.sheet__promo { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.sheet__rm { font-family: var(--display); font-weight: var(--d-weight); font-size: calc(3.25rem * var(--d-scale)); line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; }
.sheet__per { color: var(--muted); font-weight: 600; }
.sheet__after { margin-top: var(--s-1); font-size: 1.25rem; font-weight: 700; }
.sheet__after-rm { font-variant-numeric: tabular-nums; }
.sheet__cta { width: 100%; }
.sheet__close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 48px; height: 48px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer;
}
.sheet__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn--plans { border-color: var(--brand); color: var(--brand); }
.btn--plans:hover { background: var(--brand); color: #fff; }
html[data-fx~="sheet"] .card__media { cursor: pointer; }

/* ---------- View Transition timing for the morphs ---------- */

::view-transition-group(pd) { animation-duration: 520ms; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 240ms; }
@media (max-width: 760px) {
  .sheet { width: 100%; margin: auto 0 0; max-height: 92dvh; }
  .sheet__panel { grid-template-columns: minmax(0, 1fr); max-height: 92dvh; overflow-y: auto; border-radius: 24px 24px 0 0; }
  .sheet__media { height: 210px; padding: var(--s-4); }
  .sheet__media img { width: auto; height: 178px; max-height: none; }
  .sheet__body { overflow: visible; padding: var(--s-5) var(--s-4) var(--s-6); }
}

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