/* Caleb Electronics — storefront styles */

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dmsans.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #0e1726;
  --ink-2: #1b2638;
  --ink-soft: #4a566b;
  --muted: #7b8698;
  --line: #e6e1d8;
  --paper: #faf7f2;
  --card: #ffffff;
  --sand: #f1ece3;
  --accent: #ff6a13;
  --accent-dark: #e25300;
  --accent-soft: #fff0e6;
  --gold: #ffc53d;
  --green: #12805c;
  --green-soft: #e3f4ec;
  --red: #c8321e;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(14, 23, 38, .05), 0 8px 24px -12px rgba(14, 23, 38, .18);
  --shadow-lg: 0 24px 60px -24px rgba(14, 23, 38, .35);
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1240px, 100% - 40px); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1.2; white-space: nowrap;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px rgba(255, 106, 19, .7); }
.btn--primary:hover { background: var(--accent-dark); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-2); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }
.btn--light:hover { background: rgba(255, 255, 255, .18); }
.btn--wa { background: #1faa59; color: #fff; }
.btn--wa:hover { background: #17924b; }
.btn--block { width: 100%; }
.btn--lg { padding: 16px 28px; font-size: 16px; }
.btn--sm { padding: 9px 14px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--sand); }
.icon-btn:hover { background: var(--line); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

.link { color: var(--accent-dark); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* -------------------------------------------------------------- header */
.topbar { background: var(--ink); color: #c9d1de; font-size: 13.5px; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 38px; }
.topbar__msg { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 4px rgba(61, 220, 151, .2); }
.topbar__links { display: flex; gap: 20px; }
.topbar__links a:hover { color: #fff; }

.header { position: sticky; top: 0; z-index: 30; background: rgba(250, 247, 242, .92); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; gap: 24px; padding-block: 14px; }

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); flex-shrink: 0; }
.logo__mark { width: 40px; height: 40px; }
.logo__text { display: flex; flex-direction: column; font-family: var(--display); line-height: .95; }
.logo__text b { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.logo__text span { font-size: 11.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }
.logo--light { color: #fff; }
.logo--light .logo__mark { color: #1f2c42; }
.logo--light .logo__text span { color: #9aa6b8; }

.search { flex: 1; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 5px 5px 18px; transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(14, 23, 38, .06); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 8px 0; }
.search input::-webkit-search-cancel-button { display: none; }
.search button { border: 0; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; padding: 10px 20px; border-radius: 999px; }
.search button:hover { background: var(--ink-2); }

.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--card); padding: 11px 18px; border-radius: 999px; font-weight: 600; flex-shrink: 0; }
.cart-btn:hover { border-color: var(--ink); }
.cart-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cart-btn__count { min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700; }
.cart-btn.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.1); } }

.catnav { border-top: 1px solid var(--line); }
.catnav__inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-block: 6px; }
.catnav__inner::-webkit-scrollbar { display: none; }
.catnav a { padding: 8px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.catnav a:hover { background: var(--sand); color: var(--ink); }
.catnav a.active { background: var(--ink); color: #fff; }
.catnav a.deal { color: var(--accent-dark); font-weight: 600; }
.catnav a.deal.active { color: #fff; }

/* ---------------------------------------------------------------- main */
main { min-height: 60vh; outline: 0; }
.loading { padding: 120px 0; text-align: center; color: var(--muted); }
.spinner { width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.section { padding-block: 56px; }
.section--tight { padding-block: 36px; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section__head h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 700; }
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: 10px; }

/* ---------------------------------------------------------------- hero */
.hero { padding-top: 28px; }
.hero__card {
  position: relative; overflow: hidden; border-radius: 32px; color: #fff;
  background:
    radial-gradient(900px 500px at 88% -10%, rgba(255, 106, 19, .38), transparent 60%),
    radial-gradient(600px 400px at 0% 110%, rgba(255, 197, 61, .16), transparent 60%),
    var(--ink);
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 24px;
  padding: clamp(28px, 5vw, 64px);
}
.hero__card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: linear-gradient(120deg, #000 10%, transparent 70%);
}
.hero__copy { position: relative; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { font-size: clamp(38px, 6vw, 76px); font-weight: 800; letter-spacing: -.035em; line-height: .98; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__lead { margin-top: 20px; font-size: clamp(16px, 1.5vw, 19px); color: #c5cedb; max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 38px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .14); }
.hero__stats b { display: block; font-family: var(--display); font-size: 28px; font-weight: 700; }
.hero__stats span { font-size: 13.5px; color: #9aa6b8; }

.hero__visual { position: relative; min-height: 380px; }
.hero__img { position: absolute; inset: 0; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); transform: rotate(2deg); }
.hero__img img { width: 100%; height: 100%; object-fit: cover; }
.hero__chip {
  position: absolute; display: flex; align-items: center; gap: 12px; background: #fff; color: var(--ink);
  padding: 10px 16px 10px 10px; border-radius: 18px; box-shadow: var(--shadow-lg); max-width: 250px;
  animation: float 6s ease-in-out infinite;
}
.hero__chip:hover { transform: translateY(-3px); }
.hero__chip img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.hero__chip small { display: block; font-size: 12px; color: var(--muted); }
.hero__chip b { display: block; font-size: 14px; line-height: 1.25; }
.hero__chip i { font-style: normal; font-weight: 700; font-size: 14px; color: var(--accent-dark); }
.hero__chip--a { left: -26px; bottom: 34px; }
.hero__chip--b { right: -10px; top: 26px; animation-delay: -3s; }
@keyframes float { 50% { translate: 0 -8px; } }

/* --------------------------------------------------------------- trust */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.trust__item { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.trust__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; flex-shrink: 0; }
.trust__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.trust__item b { display: block; font-size: 15px; line-height: 1.25; }
.trust__item span { font-size: 13.5px; color: var(--muted); }

/* ---------------------------------------------------------- categories */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--ink); color: #fff; }
.cat img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: transform .5s ease, opacity .3s; }
.cat::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(14, 23, 38, .88)); }
.cat:hover img { transform: scale(1.06); opacity: .95; }
.cat__text { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.cat__text b { font-family: var(--display); font-size: 20px; font-weight: 700; line-height: 1.1; }
.cat__text span { font-size: 13px; color: #c5cedb; white-space: nowrap; }

/* ------------------------------------------------------------ products */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card__media { position: relative; display: block; aspect-ratio: 1; background: var(--sand); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.card__brand { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card__name { font-family: var(--display); font-size: 17px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.card__name a::after { content: ''; position: absolute; inset: 0; }
.card__foot { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.price { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.price--call { font-size: 15px; color: var(--ink-soft); }
.price__old { display: block; font-family: var(--body); font-size: 13px; font-weight: 400; color: var(--muted); text-decoration: line-through; letter-spacing: 0; }
.add-btn { position: relative; z-index: 1; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; flex-shrink: 0; transition: background .15s, transform .15s; }
.add-btn:hover { background: var(--accent); transform: scale(1.06); }
.add-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.add-btn[disabled] { background: var(--line); color: var(--muted); cursor: not-allowed; transform: none; }

.badges { position: absolute; top: 12px; left: 12px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 1; }
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.badge--new { background: var(--ink); color: #fff; }
.badge--tokunbo { background: var(--gold); color: #3d2c00; }
.badge--sale { background: var(--red); color: #fff; }
.badge--out { background: #fff; color: var(--ink-soft); border: 1px solid var(--line); }

/* -------------------------------------------------------------- promos */
.promos { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.promo { position: relative; overflow: hidden; border-radius: 26px; padding: 36px; min-height: 250px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px; }
.promo h3 { font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; max-width: 12ch; }
.promo p { max-width: 24ch; font-size: 15px; }
.promo img { position: absolute; right: -30px; bottom: -30px; width: 54%; aspect-ratio: 1; object-fit: cover; border-radius: 28px; transform: rotate(-6deg); box-shadow: var(--shadow-lg); transition: transform .4s ease; }
.promo:hover img { transform: rotate(-3deg) scale(1.03); }
.promo > * { position: relative; z-index: 1; }
.promo > img { z-index: 0; }
.promo--new { background: var(--ink); color: #fff; }
.promo--new p { color: #c5cedb; }
.promo--tk { background: var(--gold); color: #2b1f00; }

.visit { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: clamp(24px, 4vw, 44px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; }
.visit h2 { font-size: clamp(24px, 3vw, 34px); }
.visit p { color: var(--ink-soft); margin-top: 10px; max-width: 52ch; }
.visit__list { display: grid; gap: 12px; }
.visit__list li { display: flex; gap: 12px; align-items: flex-start; }
.visit__list svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; fill: none; stroke: var(--accent-dark); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.visit__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* ---------------------------------------------------------------- shop */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); padding-top: 26px; }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-current] { color: var(--ink); }

.shop { display: grid; grid-template-columns: 250px 1fr; gap: 34px; padding-block: 22px 64px; align-items: start; }
.shop__title { font-size: clamp(28px, 3.6vw, 44px); font-weight: 700; margin-top: 10px; }
.filters { position: sticky; top: 138px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px 18px; }
.filters summary { display: none; }
.filter { padding-block: 16px; border-bottom: 1px solid var(--line); }
.filter:last-of-type { border-bottom: 0; }
.filter h3 { font-family: var(--body); font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.filter__opts { display: grid; gap: 2px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; margin-inline: -10px; border-radius: 10px; font-size: 15px; cursor: pointer; }
.opt:hover { background: var(--sand); }
.opt.active { background: var(--ink); color: #fff; font-weight: 600; }
.opt small { font-size: 12.5px; opacity: .6; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; font-size: 14px; font-weight: 500; }
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar__count { color: var(--ink-soft); font-size: 15px; }
.select { appearance: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 38px 9px 16px; font-size: 14.5px; font-weight: 500; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e1726' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 14px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 13.5px; font-weight: 600; border: 0; }
.pill:hover { background: #ffe1cc; }

.empty { text-align: center; padding: 70px 20px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty h3 { font-size: 22px; margin-bottom: 8px; }
.empty p { color: var(--ink-soft); margin-bottom: 18px; }

/* ------------------------------------------------------------- product */
.pdp { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px); padding-block: 22px 40px; align-items: start; }
.pdp__media { position: sticky; top: 138px; border-radius: 26px; overflow: hidden; background: var(--sand); border: 1px solid var(--line); aspect-ratio: 1; }
.pdp__media img { width: 100%; height: 100%; object-fit: cover; }
.pdp__brand { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pdp h1 { font-size: clamp(30px, 3.8vw, 46px); font-weight: 700; margin-top: 8px; }
.pdp__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pdp__tags .badge { padding: 6px 12px; font-size: 12px; }
.stock { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--green); }
.stock::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.stock--out { color: var(--red); }
.pdp__price { display: flex; align-items: baseline; gap: 12px; margin-top: 22px; }
.pdp__price .price { font-size: 38px; }
.pdp__price .price__old { font-size: 17px; display: inline; }
.pdp__desc { margin-top: 18px; color: var(--ink-soft); font-size: 16.5px; white-space: pre-line; }
.features { margin-top: 20px; display: grid; gap: 10px; }
.features li { display: flex; gap: 10px; align-items: flex-start; font-size: 15.5px; }
.features svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.buy { margin-top: 28px; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 14px; }
.buy__row { display: flex; gap: 12px; flex-wrap: wrap; }
.buy__row .btn { flex: 1; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); }
.qty button { width: 40px; height: 44px; border: 0; background: transparent; font-size: 20px; font-weight: 500; border-radius: 999px; }
.qty button:hover { background: var(--sand); }
.qty output, .qty span { min-width: 30px; text-align: center; font-weight: 600; }
.qty--sm button { width: 30px; height: 32px; font-size: 17px; }
.qty--sm span { min-width: 24px; font-size: 14.5px; }
.assure { display: grid; gap: 8px; font-size: 14.5px; color: var(--ink-soft); }
.assure li { display: flex; gap: 10px; align-items: center; }
.assure svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--accent-dark); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* -------------------------------------------------------------- drawer */
.overlay { position: fixed; inset: 0; background: rgba(14, 23, 38, .5); z-index: 40; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--paper); z-index: 50; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-lg); }
.drawer.open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 22px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 22px; }
.drawer__foot { padding: 18px 22px 22px; border-top: 1px solid var(--line); background: var(--card); display: grid; gap: 12px; }
.drawer__foot:empty { display: none; }

.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding-block: 16px; border-bottom: 1px solid var(--line); align-items: center; }
.line:last-child { border-bottom: 0; }
.line img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--sand); }
.line__name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.line__meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.line__price { font-family: var(--display); font-weight: 700; text-align: right; white-space: nowrap; }
.line__remove { display: block; margin-top: 8px; margin-left: auto; border: 0; background: none; font-size: 13px; color: var(--muted); text-decoration: underline; padding: 0; }
.line__remove:hover { color: var(--red); }
.line--warn .line__name { color: var(--red); }

.totals { display: grid; gap: 8px; font-size: 15px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals .muted { color: var(--ink-soft); }
.totals .grand { font-family: var(--display); font-size: 22px; font-weight: 700; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px; }
.note { font-size: 13.5px; color: var(--muted); }

/* ------------------------------------------------------------ checkout */
.checkout { display: grid; grid-template-columns: 1.35fr 1fr; gap: 34px; padding-block: 22px 64px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 21px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.step { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--body); font-size: 14px; font-weight: 700; letter-spacing: 0; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label, .field .label { font-size: 14px; font-weight: 600; }
.field label small { font-weight: 400; color: var(--muted); }
.input { width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(14, 23, 38, .06); }
textarea.input { resize: vertical; min-height: 84px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice label { position: relative; display: flex; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .15s, background .15s; }
.choice input { accent-color: var(--accent); margin-top: 4px; }
.choice label:has(input:checked) { border-color: var(--ink); background: var(--paper); }
.choice label:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.choice b { display: block; font-size: 15px; }
.choice span span { font-size: 13.5px; color: var(--muted); }
.summary { position: sticky; top: 138px; }
.summary .line { grid-template-columns: 56px 1fr auto; padding-block: 12px; }
.summary .line img { width: 56px; height: 56px; }
.form-error { background: #fdecea; color: var(--red); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14.5px; font-weight: 500; }

/* ---------------------------------------------------- order + tracking */
.done { max-width: 720px; margin-inline: auto; padding-block: 48px 72px; }
.done__head { text-align: center; margin-bottom: 28px; }
.done__tick { width: 76px; height: 76px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin: 0 auto 18px; animation: pop .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.done__tick svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.done h1 { font-size: clamp(30px, 4vw, 42px); }
.done__head p { color: var(--ink-soft); margin-top: 10px; }
.ref { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 18px; background: var(--ink); color: #fff; border-radius: 999px; font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: .04em; }
.ref small { font-family: var(--body); font-weight: 500; font-size: 13px; color: #9aa6b8; letter-spacing: 0; }
.bank { background: var(--accent-soft); border: 1px solid #ffd7bd; border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.bank h3 { font-size: 18px; margin-bottom: 10px; }
.bank dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 15.5px; }
.bank dt { color: var(--ink-soft); }
.bank dd { margin: 0; font-weight: 700; }
.done__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }

.track { max-width: 560px; margin-inline: auto; padding-block: 48px 72px; }
.track h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 8px; }
.track > p { color: var(--ink-soft); margin-bottom: 22px; }
.timeline { display: grid; gap: 0; margin: 6px 0 18px; }
.timeline li { position: relative; padding: 0 0 20px 34px; color: var(--muted); font-weight: 500; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.timeline li::after { content: ''; position: absolute; left: 12px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li.done-step { color: var(--ink); }
.timeline li.done-step::before { background: var(--green); }
.timeline li.done-step::after { background: var(--green); }
.timeline li.current { color: var(--ink); font-weight: 700; }
.timeline li.current::before { background: var(--accent); box-shadow: 0 0 0 5px rgba(255, 106, 19, .2); }
.status-cancelled { color: var(--red); font-weight: 700; }

.credits { max-width: 860px; margin-inline: auto; padding-block: 40px 72px; }
.credits h1 { font-size: 36px; margin-bottom: 10px; }
.credits > p { color: var(--ink-soft); margin-bottom: 24px; }
.credits li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; padding-block: 10px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.credits li img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.credits li span { color: var(--ink-soft); }

/* -------------------------------------------------------------- footer */
.footer { background: var(--ink); color: #b4bfce; margin-top: 40px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding-block: 56px 36px; }
.footer__brand p { margin-top: 16px; max-width: 34ch; font-size: 15px; }
.footer h3 { font-family: var(--body); font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.footer li { margin-bottom: 9px; font-size: 15px; }
.footer a:hover { color: #fff; }
.footer__base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-block: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13.5px; color: #7f8ba0; }

.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 20; display: inline-flex; align-items: center; gap: 8px; background: #1faa59; color: #fff; padding: 12px 18px 12px 14px; border-radius: 999px; font-weight: 600; font-size: 14.5px; box-shadow: 0 12px 30px -10px rgba(31, 170, 89, .8); transition: transform .15s; }
.wa-float:hover { transform: translateY(-2px); }
.wa-float svg { width: 24px; height: 24px; }

.toast { position: fixed; left: 50%; bottom: 28px; translate: -50% 20px; z-index: 60; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14.5px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .25s, translate .25s; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; translate: -50% 0; }

.reveal { animation: rise .5s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .hero__chip--a { left: -8px; }
}
@media (max-width: 900px) {
  .hero__card { grid-template-columns: 1fr; }
  .hero__visual { min-height: 280px; margin-top: 10px; }
  .hero__img { transform: none; }
  .hero__chip--a { left: 12px; bottom: -14px; }
  .hero__chip--b { right: 12px; top: -14px; }
  .shop { grid-template-columns: 1fr; gap: 16px; }
  .filters { position: static; padding: 0 18px; }
  .filters summary { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; font-weight: 600; cursor: pointer; list-style: none; }
  .filters summary::-webkit-details-marker { display: none; }
  .filters summary::after { content: '+'; font-size: 22px; line-height: 1; }
  .filters[open] summary::after { content: '–'; }
  .filters[open] { padding-bottom: 12px; }
  .pdp, .checkout, .visit { grid-template-columns: 1fr; }
  .pdp__media, .summary { position: static; }
  .promos { grid-template-columns: 1fr; }
  .cats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .wrap { width: min(1240px, 100% - 28px); }
  .topbar__msg { font-size: 12.5px; }
  .header__inner { flex-wrap: wrap; gap: 12px; padding-block: 12px; }
  .search { order: 3; flex-basis: 100%; }
  .cart-btn { margin-left: auto; padding: 10px 14px; }
  .cart-btn__label { display: none; }
  .section { padding-block: 40px; }
  .grid, .grid--3 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card__body { padding: 12px; }
  .card__name { font-size: 15px; }
  .price { font-size: 17px; }
  .add-btn { width: 36px; height: 36px; }
  .badges { top: 8px; left: 8px; }
  .trust { grid-template-columns: 1fr; }
  .fields, .choice { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 26px; padding-block: 40px 24px; }
  .promo { padding: 26px; min-height: 220px; }
  .promo img { width: 48%; right: -20px; bottom: -24px; }
  .hero__card { border-radius: 24px; }
  .hero__stats { gap: 20px; }
  .wa-float span { display: none; }
  .wa-float { padding: 14px; }
  .pdp__price .price { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
