/* ==========================================================================
   Storefront
   ========================================================================== */

/* ---------- header ---------- */
.offline-bar {
  background: var(--amber-soft);
  color: #6d4c0c;
  text-align: center;
  font-size: 13px;
  font-weight: 550;
  padding: 8px 16px;
  border-bottom: 1px solid #ecd9a5;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  min-height: 72px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand-logo {
  width: 44px;
  height: 44px;
  flex: none;
  filter: drop-shadow(0 4px 8px rgba(10, 132, 227, 0.2));
}
.brand-logo--lg { width: 58px; height: 58px; }
.brand-text { display: grid; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.brand-name em { font-style: normal; color: var(--green); }
.brand-tag {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-top: 3px;
}

.search {
  position: relative;
  flex: 1 1 auto;
  max-width: 460px;
  display: flex;
  align-items: center;
}
.search input {
  width: 100%;
  height: 46px;
  padding: 0 40px 0 44px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(10, 132, 227, 0.16);
}
.search input::-webkit-search-cancel-button { display: none; }
.search-icon {
  position: absolute;
  left: 16px;
  width: 18px; height: 18px;
  color: var(--muted);
  pointer-events: none;
}
.search-icon svg { width: 18px; height: 18px; }
.search-clear {
  position: absolute;
  right: 8px;
  width: 30px; height: 30px;
  border: 0; border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}
.search-clear:hover { background: var(--cream); color: var(--ink); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex: none;
}
.navlink {
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 550;
  color: var(--ink-2);
}
.navlink:hover { background: rgba(10, 26, 51, 0.05); }
.cart-btn {
  position: relative;
  border: 2px solid #0a84e3;
  background: #eef7ff;
  color: #0a6fca;
}
.cart-btn:hover {
  border-color: #0869b8;
  background: #0a84e3;
  color: #fff;
}
.cart-btn svg { width: 20px; height: 20px; }
.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--clay);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}
/* ---------- layout ---------- */
.view { display: block; min-height: 62vh; padding-bottom: 40px; }
.page { padding-top: clamp(18px, 3vw, 30px); }
.page-loading {
  display: grid;
  place-items: center;
  min-height: 50vh;
}
.spinner {
  width: 30px; height: 30px;
  border-radius: 999px;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }

.section { margin-top: clamp(30px, 5vw, 52px); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-head h2 { font-size: clamp(22px, 3vw, 30px); }
.section-head p { font-size: 14px; color: var(--muted); margin-top: 3px; }
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  white-space: nowrap;
}
.section-link svg { width: 15px; height: 15px; }
.section-link:hover { color: var(--green-700); }

.page-head { padding: clamp(20px, 4vw, 34px) 0 clamp(12px, 2vw, 20px); }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 60ch; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  padding-top: 18px;
}
.breadcrumb a:hover { color: var(--green); }
.breadcrumb svg { width: 12px; height: 12px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
  margin-top: clamp(16px, 3vw, 26px);
  padding: clamp(26px, 4vw, 52px);
  border-radius: 28px;
  background:
    radial-gradient(100% 130% at 88% 0%, #0f7ad4 0%, transparent 58%),
    radial-gradient(70% 90% at 0% 100%, #0e3a6b 0%, transparent 60%),
    linear-gradient(140deg, #071426 0%, #0a2142 58%, #0b2e5c 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
}
.hero > * { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8fd0ff;
}
.hero-eyebrow svg { width: 15px; height: 15px; }
.hero h1 {
  margin-top: 12px;
  font-size: clamp(34px, 5.4vw, 60px);
  color: #fff;
}
.hero h1 em { font-style: normal; color: #8fd0ff; }
.hero p {
  margin-top: 14px;
  max-width: 46ch;
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(14.5px, 1.5vw, 17px);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.hero-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 24px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
}
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note svg { width: 15px; height: 15px; color: #8fd0ff; }
.hero-art { display: grid; place-items: center; }
.hero-art svg { width: 100%; max-width: 420px; height: auto; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.22)); }

/* ---------- category rail ---------- */
.cat-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(128px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.cat-rail::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
  .cat-rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    overflow: visible;
  }
}
.cat-card {
  scroll-snap-align: start;
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.cat-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.cat-emoji {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 22px;
  background: var(--lime-soft);
}
.cat-card .cat-name { font-size: 13px; font-weight: 600; line-height: 1.25; white-space: nowrap; }
.cat-card .cat-count { font-size: 11.5px; color: var(--muted); }
.cat-card.is-active { border-color: var(--green); box-shadow: 0 0 0 3px rgba(10, 132, 227, 0.14); }

/* ---------- product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 12px;
}
@media (min-width: 720px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(206px, 1fr)); gap: 18px; }
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid #dae6f3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(9, 32, 62, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  animation: card-rise 0.46s cubic-bezier(0.22, 0.75, 0.3, 1) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
/* Category colour strip — reads like the shelf label above each item. */
.product::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent, var(--green));
  opacity: 0.85;
  z-index: 2;
}
.product[data-tint="amber"] { --accent: #e0a02a; }
.product[data-tint="sand"] { --accent: #b98a3e; }
.product[data-tint="clay"] { --accent: #e06a44; }
.product[data-tint="blue"] { --accent: #2f8fe0; }
.product[data-tint="rose"] { --accent: #d2698d; }
.product[data-tint="gold"] { --accent: #cfa42a; }
.product[data-tint="gray"] { --accent: #8595a9; }
.product[data-tint="green"] { --accent: #65a03a; }

.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 36px -24px rgba(8, 30, 60, 0.5), 0 4px 10px rgba(8, 30, 60, 0.05);
  border-color: #bcd9f5;
}
.product:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(10, 132, 227, 0.14);
}
.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 9px;
  background: #fff;
  overflow: hidden;
  border-bottom: 1px solid #eef3f9;
}
/* Soft shimmer while the product photo loads. */
.product-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, #f4f8fd 22%, #e9f2fb 42%, #f4f8fd 62%);
  background-size: 240% 100%;
  animation: media-shimmer 1.1s ease-in-out 2;
  opacity: 1;
  transition: opacity 0.28s ease;
  pointer-events: none;
}
.product-media.is-loaded::after { opacity: 0; }
.product-media-link {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.product:hover .product-media img { transform: scale(1.045); }
.product-emoji {
  font-size: clamp(40px, 5vw, 56px);
  line-height: 1;
  filter: drop-shadow(0 8px 12px rgba(10, 26, 51, 0.14));
  transition: transform 0.25s ease;
}
.product:hover .product-emoji { transform: translateY(-3px) rotate(-2deg); }
.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(8, 30, 60, 0.12);
}
.product-badge--low { background: #fff4dd; color: #8a5200; }
.product-badge--out { background: #26374d; color: #fff; }
.product-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 12px;
  flex: 1;
}
.product-eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #6b7d94;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-name {
  font-size: 13.8px;
  font-weight: 600;
  line-height: 1.32;
  color: #0b2135;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.64em;
}
.product-name:hover { color: var(--green); }
.product-meta {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px dashed #e6eef8;
}
.product-foot .price {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #0b2135;
  white-space: nowrap;
}
.add-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 12.5px;
  font-weight: 650;
  transition: background 0.15s ease, transform 0.12s ease;
}
.add-btn svg { width: 15px; height: 15px; }
.add-btn:hover { background: var(--green-700); }
.add-btn:active { transform: scale(0.96); }
.add-btn.is-added {
  background: #0f9d58;
  pointer-events: none;
}
.add-btn.is-added svg { width: 14px; height: 14px; }
.add-btn[disabled] {
  background: #eef2f7;
  color: #8394a9;
  cursor: not-allowed;
}
.add-btn[disabled] svg { width: 13px; height: 13px; }
.product.is-out .product-media img { filter: grayscale(0.35); opacity: 0.7; }
.product.is-out .product-emoji { filter: grayscale(0.6); }

@media (max-width: 380px) {
  .add-btn span { display: none; }
  .add-btn { width: 34px; padding: 0; justify-content: center; }
}
/* Very narrow phones: keep the shelf two-across instead of one huge tile. */
@media (max-width: 359px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-body { padding-left: 10px; padding-right: 10px; }
  .product-name { font-size: 13px; }
  .product-foot .price { font-size: 14.5px; }
}

/* ---------- product photo placeholder ---------- */
.media-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eef7ff, #dbeafe);
  color: #5b7fa6;
  text-align: center;
  padding: 10px;
}
.media-placeholder .ph-logo { width: 36%; max-width: 92px; opacity: .55; }
.media-placeholder .ph-label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.product-media .media-placeholder img { width: 36%; max-width: 92px; height: auto; object-fit: contain; }
.pdp-media .media-placeholder img { width: 30%; max-width: 160px; height: auto; object-fit: contain; }
.cart-thumb .media-placeholder { gap: 0; }
.cart-thumb .media-placeholder img { width: 60%; max-width: 44px; height: auto; object-fit: contain; }
.cart-thumb .media-placeholder .ph-label { display: none; }
.product:hover .product-media .media-placeholder img { transform: none; }
.product.is-out .media-placeholder { opacity: .85; }

.tint-green { background: linear-gradient(135deg, #ecf4e2, #d9e9c4); }
.tint-amber { background: linear-gradient(135deg, #fdf4de, #f6e2b6); }
.tint-sand { background: linear-gradient(135deg, #f8f0de, #ecdcb9); }
.tint-clay { background: linear-gradient(135deg, #fceae1, #f6d3c1); }
.tint-blue { background: linear-gradient(135deg, #eaf2f6, #d3e4ec); }
.tint-rose { background: linear-gradient(135deg, #fcedee, #f6d8da); }
.tint-gold { background: linear-gradient(135deg, #fcf3d7, #f4e2ab); }
.tint-gray { background: linear-gradient(135deg, #f1f2ee, #e3e6df); }

/* ---------- offer strip ---------- */
.offers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.offer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(120deg, #eaf5ff, #f4faff);
  border: 1px solid #cfe7fb;
}
.offer-ico {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 13px;
  background: var(--paper);
  color: var(--green);
  flex: none;
}
.offer-ico svg { width: 20px; height: 20px; }
.offer strong { display: block; font-size: 14px; }
.offer .small { color: #33587d; }
.offer-code {
  margin-left: auto;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px dashed #9ecdf5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--green-700);
}

/* ---------- steps / info ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.step {
  padding: 20px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.step-num {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-700);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}
.step h3 { font-size: 15.5px; }
.step p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }

.info-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: clamp(20px, 3vw, 30px);
  border-radius: 22px;
  background: var(--green-soft);
  border: 1px solid #cfe5f9;
}
.info-panel h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.info-panel h3 svg { width: 18px; height: 18px; color: var(--green); }
.info-panel p { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.info-panel .tiny { color: var(--muted); margin-top: 8px; display: block; }

/* ---------- shop toolbar ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 0 18px;
}
.toolbar .chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  flex: 1 1 auto;
  scrollbar-width: none;
}
.toolbar .chips::-webkit-scrollbar { display: none; }
.toolbar .select { width: auto; min-width: 160px; min-height: 40px; padding-top: 7px; padding-bottom: 7px; }
.result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 14px;
}

/* ---------- product detail ---------- */
.pdp {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
}
@media (max-width: 820px) { .pdp { grid-template-columns: 1fr; } }
.pdp-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  padding: 22px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.pdp-media img { width: 100%; height: 100%; object-fit: contain; }
.pdp-media .product-emoji { font-size: clamp(96px, 16vw, 150px); }
.pdp-flag { position: absolute; top: 16px; left: 16px; }
.pdp-info { display: grid; gap: 14px; align-content: start; }
.pdp-info h1 { font-size: clamp(26px, 3.6vw, 38px); }
.pdp-brand { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pdp-price { display: flex; align-items: baseline; gap: 10px; }
.pdp-price .price { font-size: clamp(24px, 3vw, 32px); }
.pdp-unit { color: var(--muted); font-size: 14px; }
.pdp-desc { color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.pdp-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  overflow: hidden;
}
.stepper button {
  display: grid;
  place-items: center;
  width: 40px; height: 42px;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.stepper button:hover { background: var(--cream); }
.stepper button[disabled] { color: var(--line-strong); cursor: not-allowed; }
.stepper button svg { width: 16px; height: 16px; }
.stepper .qty {
  min-width: 36px;
  text-align: center;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.pdp-meta {
  display: grid;
  gap: 10px;
  font-size: 13.5px;
  color: var(--muted);
}
.pdp-meta div { display: flex; gap: 8px; align-items: flex-start; }
.pdp-meta svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--green); }
.pdp-note { font-size: 12.5px; color: var(--muted); }
.stock-line { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; }
.stock-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--green); }
.stock-line.low .stock-dot { background: var(--amber); }
.stock-line.out .stock-dot { background: var(--danger); }
.stock-line.low { color: #8a6414; }
.stock-line.out { color: var(--danger); }

/* ---------- cart / checkout ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: clamp(18px, 3vw, 32px);
  align-items: start;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.summary {
  position: sticky;
  top: 92px;
  border-color: #b8dbfa;
  box-shadow: 0 14px 34px -30px rgba(10, 111, 202, 0.6);
}
@media (max-width: 900px) { .summary { position: static; order: 2; } }
.summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.summary-head h2 { font-size: 19px; }
.summary-rows { display: grid; gap: 9px; font-size: 14px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); }
.summary-row .price { font-weight: 600; }
.summary-row.muted { color: var(--muted); }
.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.summary-total span { font-weight: 600; }
.summary-total strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.summary-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--lime-soft);
  font-size: 12.5px;
  line-height: 1.5;
  color: #1c4f7a;
}
.summary .btn-block { margin-top: 16px; }

.promo-form { display: flex; gap: 8px; margin-top: 14px; }
.promo-form .input { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.promo-form .btn { min-height: 40px; }
.promo-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--green-soft);
  font-size: 13px;
  color: var(--green-700);
}
.promo-applied button {
  border: 0; background: transparent; color: var(--green-700);
  text-decoration: underline; font-size: 12px;
}

.cart-list { display: grid; gap: 10px; }
.cart-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #cfe6fb;
  background: var(--paper);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.cart-item:hover {
  border-color: #9dcff8;
  box-shadow: 0 10px 24px -22px rgba(10, 111, 202, 0.55);
}
.cart-thumb {
  width: 74px; height: 74px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 30px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #cfe6fb;
  padding: 5px;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart-item-main { min-width: 0; display: grid; gap: 2px; }
.cart-item-main .name { font-size: 14.5px; font-weight: 600; }
.cart-item-main .meta { font-size: 12px; color: var(--muted); }
.cart-item-side { display: grid; justify-items: end; gap: 8px; }
.cart-item-side .price { font-size: 15px; }
.cart-remove {
  border: 0; background: transparent; color: var(--muted);
  font-size: 12px; text-decoration: underline; padding: 2px 0;
}
.cart-remove:hover { color: var(--danger); }

.checkout-section { padding: clamp(16px, 2.5vw, 22px); margin-bottom: 14px; }
.checkout-section > h2 {
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.checkout-section > h2 .step-num { margin: 0; width: 28px; height: 28px; font-size: 14px; }

.radio-stack { display: grid; gap: 10px; }
.radio-card {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.radio-card:hover { border-color: var(--green); }
.radio-card:has(input:checked) {
  border-color: var(--green);
  background: #f4f9ff;
  box-shadow: 0 0 0 3px rgba(10, 132, 227, 0.13);
}
.radio-card input { margin-top: 3px; accent-color: var(--green); width: 17px; height: 17px; flex: none; }
.radio-card-body { display: grid; gap: 2px; }
.radio-card-body strong { font-size: 14.5px; font-weight: 600; }
.radio-card-body span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.radio-card .badge { margin-left: auto; align-self: center; }

.form-error {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-soft);
  border: 1px solid #f3c6c2;
  color: #8d2f28;
  font-size: 13.5px;
}
.form-error.is-on { display: block; }

.confirm-wrap { max-width: 660px; margin: 0 auto; padding-top: clamp(24px, 5vw, 48px); }
.confirm-mark {
  display: grid;
  place-items: center;
  width: 74px; height: 74px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
}
.confirm-mark svg { width: 36px; height: 36px; }
.confirm-wrap h1 { text-align: center; font-size: clamp(26px, 4vw, 36px); }
.confirm-sub { text-align: center; color: var(--muted); margin-top: 8px; }
.confirm-card { margin-top: 24px; padding: clamp(18px, 3vw, 26px); }
.ref-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--cream);
  border: 1px dashed var(--line-strong);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.confirm-actions .btn { flex: 1 1 180px; }

/* ---------- timeline ---------- */
.timeline { display: grid; gap: 0; margin-top: 8px; }
.tl-step {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  padding-bottom: 20px;
}
.tl-step:last-child { padding-bottom: 0; }
.tl-step::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 26px;
  bottom: -2px;
  width: 2px;
  background: var(--line);
}
.tl-step:last-child::before { display: none; }
.tl-dot {
  position: relative;
  z-index: 1;
  width: 30px; height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--cream);
  border: 2px solid var(--line-strong);
  color: var(--muted-2);
}
.tl-dot svg { width: 14px; height: 14px; }
.tl-step.done .tl-dot { background: var(--green); border-color: var(--green); color: #fff; }
.tl-step.done::before { background: var(--green); }
.tl-step.now .tl-dot { background: var(--lime); border-color: var(--green); color: var(--green-900); box-shadow: 0 0 0 4px rgba(217, 238, 155, 0.4); }
.tl-body { padding-top: 3px; }
.tl-body strong { font-size: 14.5px; display: block; }
.tl-body span { font-size: 12.5px; color: var(--muted); }
.tl-step:not(.done):not(.now) .tl-body strong { color: var(--muted-2); font-weight: 550; }

/* ---------- orders list ---------- */
.order-list { display: grid; gap: 12px; }
.order-card { padding: 16px 18px; display: grid; gap: 10px; }
.order-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.order-ref { font-weight: 700; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; }
.order-card-meta { font-size: 12.5px; color: var(--muted); }
.order-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.order-items-preview { font-size: 13px; color: var(--ink-2); }
.order-visual { display: flex; gap: 6px; }
.order-thumb {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 16px;
  overflow: hidden;
}
.order-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-thumb.more { background: var(--cream); font-size: 11px; font-weight: 650; color: var(--muted); }

/* ---------- account / install ---------- */
.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(16px, 3vw, 24px);
  align-items: start;
}
@media (max-width: 860px) { .account-grid { grid-template-columns: 1fr; } }
.account-card { padding: clamp(18px, 3vw, 24px); }
.account-card h2 { font-size: 18px; margin-bottom: 4px; }
.account-card > p { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.install-card {
  padding: clamp(20px, 3vw, 26px);
  border-radius: 22px;
  background: linear-gradient(150deg, var(--green-900), #0d3a70);
  color: #fff;
  overflow: hidden;
  position: relative;
}
.install-card h2 { font-size: 21px; color: #fff; }
.install-card p { color: rgba(255, 255, 255, 0.76); font-size: 13.5px; margin-top: 6px; }
.install-card ol { display: grid; gap: 8px; margin: 16px 0 0; padding-left: 18px; list-style: decimal; font-size: 13.5px; color: rgba(255, 255, 255, 0.85); }
.install-card .btn { margin-top: 18px; }

/* ---------- footer ---------- */
.footer {
  margin-top: clamp(40px, 7vw, 72px);
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.74);
  padding: clamp(28px, 4vw, 44px) 0 22px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: clamp(20px, 4vw, 40px);
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
}
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand .brand-logo { filter: drop-shadow(0 6px 14px rgba(10, 132, 227, 0.35)); }
.footer-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; }
.footer-title em { font-style: normal; color: #8fd0ff; }
.footer-pay { margin-top: 10px; max-width: 34ch; color: rgba(255, 255, 255, 0.72); }
.footer .muted { color: rgba(255, 255, 255, 0.74); }
.footer-col { display: grid; gap: 8px; align-content: start; font-size: 13.5px; }
.footer-head { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); margin-bottom: 2px; }
.footer-col a:hover { color: #8fd0ff; }
.footer-col .small { color: rgba(255, 255, 255, 0.74); line-height: 1.5; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: clamp(24px, 4vw, 38px);
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.62);
}

/* ---------- tabbar ---------- */
.tabbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -8px 24px -18px rgba(10, 26, 51, 0.35);
}
.tabbar a {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 9px 4px 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
}
.tabbar a.is-active { color: var(--green); }
.tabbar a.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--green);
}
.tab-ico { display: grid; place-items: center; width: 24px; height: 24px; }
.tab-ico svg { width: 22px; height: 22px; }
.tab-count {
  position: absolute;
  top: 4px;
  right: calc(50% - 20px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--clay);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
@media (max-width: 859px) {
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .footer { margin-bottom: 0; }
  .toasts { bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); }
  .summary { position: static; }
}

/* ---------- install prompt ---------- */
.install-banner {
  position: fixed;
  left: 16px;
  bottom: 18px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(380px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--green-900);
  color: #fff;
  box-shadow: var(--shadow-lg);
  animation: slide-up 0.25s ease;
}
.install-banner .ib-ico {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: rgba(10, 132, 227, 0.16);
  color: #8fd0ff;
  flex: none;
}
.install-banner .ib-ico svg { width: 19px; height: 19px; }
.install-banner strong { display: block; font-size: 13.5px; }
.install-banner .small { color: rgba(255, 255, 255, 0.68); font-size: 11.5px; }
.install-banner .ib-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.install-banner .btn { min-height: 34px; padding: 6px 12px; font-size: 12.5px; }
.install-banner .ib-close {
  border: 0; background: transparent; color: rgba(255, 255, 255, 0.6);
  width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center;
}
.install-banner .ib-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
@media (max-width: 859px) { .install-banner { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); left: 12px; width: calc(100vw - 24px); } }

/* ---------- misc ---------- */
.mini-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spaced { display: grid; gap: 16px; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 14px; }
.mt-4 { margin-top: 22px; }
.only-mobile { display: none; }
@media (max-width: 859px) { .only-mobile { display: initial; } .no-mobile { display: none !important; } }
@media (min-width: 860px) { .only-desktop { display: initial; } }
@media (max-width: 859px) { .only-desktop { display: none !important; } }

@media (max-width: 859px) {
  .topbar-inner {
    flex-wrap: wrap;
    min-height: 0;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .brand { order: 1; }
  .topbar-actions { order: 2; }
  .topbar-actions .navlink { display: none; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .brand-tag { display: none; }
  .hero { grid-template-columns: 1fr; padding: 28px 22px; border-radius: 22px; }
  .hero-art { max-height: 210px; overflow: hidden; order: -1; }
  .hero-art svg { max-width: 260px; margin: -10px 0 -30px; }
  .hero h1 { margin-top: 8px; }
  .hero-actions .btn { flex: 1 1 150px; }
  .section-head { align-items: center; }
  .pdp-buy .btn { flex: 1 1 auto; }
  .cart-item { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 10px; }
  .cart-thumb { width: 60px; height: 60px; font-size: 24px; }
  .order-card { padding: 14px; }
}

/* quantity control should hug its content */
.stepper { width: max-content; }
.cart-item-main .stepper { justify-self: start; }

/* Narrow phones: price and remove drop below the name instead of squeezing it. */
@media (max-width: 380px) {
  .cart-item {
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-areas:
      "thumb main"
      "thumb side";
    align-items: start;
    column-gap: 12px;
    row-gap: 8px;
  }
  .cart-thumb { grid-area: thumb; width: 58px; height: 58px; }
  .cart-item-main { grid-area: main; }
  .cart-item-main .name { font-size: 14px; }
  .cart-item-side {
    grid-area: side;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
  }
  .cart-item-side .price { font-size: 14.5px; }
}

/* ---------- motion: market feel ---------- */
@keyframes card-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes media-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -80% 0; }
}
@keyframes badge-pop {
  0% { transform: scale(1); }
  38% { transform: scale(1.45); }
  100% { transform: scale(1); }
}
.cart-count.is-pop, .tab-count.is-pop { animation: badge-pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }

.fly-ghost {
  position: fixed;
  z-index: 120;
  border-radius: 12px;
  background: #fff;
  padding: 4px;
  object-fit: contain;
  box-shadow: 0 10px 24px -12px rgba(8, 30, 60, 0.55);
  pointer-events: none;
}

/* ---------- splash ---------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(120% 90% at 50% 0%, #123b6b 0%, #0a2a4d 46%, #071426 100%);
  color: #fff;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.splash.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-inner {
  display: grid;
  justify-items: center;
  text-align: center;
  animation: splash-in 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.splash-mark {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin-bottom: 22px;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 24px 48px -22px rgba(0, 0, 0, 0.75);
  animation: splash-pulse 2s ease-in-out infinite;
}
.splash-mark img { width: 78px; height: 78px; }
.splash-name {
  font-family: var(--font-display);
  font-size: clamp(23px, 6vw, 30px);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.1;
}
.splash-name em { font-style: normal; color: #6ec1ff; }
.splash-tag {
  margin-top: 10px;
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.splash-bar {
  margin-top: 28px;
  width: 148px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.splash-bar span {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3fa9ff, #9ad5ff);
  animation: splash-slide 0.95s ease-in-out infinite;
}
@keyframes splash-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes splash-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
@keyframes splash-slide {
  from { transform: translateX(-110%); }
  to { transform: translateX(240%); }
}

@media (prefers-reduced-motion: reduce) {
  .product,
  .product-media::after,
  .cart-count.is-pop,
  .tab-count.is-pop { animation: none; }
  .product { opacity: 1; transform: none; }
  .product:hover { transform: none; }
  .product:hover .product-media img { transform: none; }
  .product-media::after { display: none; }
  .splash-inner, .splash-mark { animation: none; }
  .splash-bar span { animation: none; width: 100%; }
  .splash { transition: opacity 0.2s ease; }
}
