/* LinkGo storefront — Nile Atelier */
:root {
  --ink: #0e2428;
  --ink-soft: #3d5559;
  --surface: #f3f6f5;
  --paper: #fbfdfc;
  --line: #d5e2df;
  --line-strong: #b7cbc6;
  --brand: #0c6b6f;
  --brand-deep: #084f52;
  --brand-soft: #e4f2f1;
  --accent: #b8892d;
  --accent-soft: #f5edd8;
  --danger: #9b3a2f;
  --ok: #1b6b45;
  --ok-soft: #e8f6ee;
  --shadow: 0 18px 40px rgba(14, 36, 40, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Readex Pro", "Segoe UI", Tahoma, sans-serif;
  --display: "Fraunces", "Readex Pro", Georgia, serif;
  --shell: 1180px;
  --header-h: 72px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  border: 0;
}

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  /* Match topbar so no light “gap” can appear above the header */
  background: var(--ink);
}

.store-surface {
  position: relative;
  z-index: 1;
  background:
    radial-gradient(1200px 500px at 90% -10%, rgba(184, 137, 45, 0.12), transparent 55%),
    radial-gradient(900px 480px at -10% 0%, rgba(12, 107, 111, 0.10), transparent 50%),
    linear-gradient(180deg, #eef4f3 0%, var(--surface) 38%, #eef2ef 100%);
  min-height: calc(100vh - 96px);
}

/* Unified sticky header (flush to viewport top) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0;
  padding: 0;
  background: var(--paper);
  border-bottom: 1px solid rgba(213, 226, 223, 0.9);
  box-shadow: 0 8px 24px rgba(14, 36, 40, 0.06);
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.shell {
  width: min(100% - 2rem, var(--shell));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.topbar {
  background: var(--ink);
  color: #d7e8e6;
  font-size: 12px;
  letter-spacing: 0.02em;
  margin: 0;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-block: 7px;
  min-height: 0;
}
.topbar-text { opacity: 0.92; }
.topbar-accent { color: #e6c778; font-weight: 600; white-space: nowrap; }

.header {
  background: var(--paper);
  border: 0;
  position: relative;
  z-index: 1;
}
.header-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 64px;
  padding-block: 8px;
}
.header-start {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.45rem, 2.2vw, 1.75rem);
  letter-spacing: -0.03em;
  color: var(--brand-deep);
  line-height: 1;
}
.brand span { color: var(--accent); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(145deg, var(--brand), var(--brand-deep));
  color: #fff; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 15px;
  margin-inline-end: 10px; flex-shrink: 0;
}
.brand-wrap { display: inline-flex; align-items: center; min-width: 0; }
.brand-logo {
  display: block;
  max-height: 40px;
  width: auto;
  max-width: min(160px, 42vw);
  object-fit: contain;
}

.search {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper);
  transition: border-color .2s, box-shadow .2s;
  max-width: 560px;
  width: 100%;
  margin-inline: auto;
}
.search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(12, 107, 111, 0.12);
}
.search input {
  border: 0; outline: 0; background: transparent;
  padding: 11px 18px; flex: 1; min-width: 0; color: var(--ink);
}
.search input::placeholder { color: #7a9194; }
.search .btn {
  border-radius: 0;
  padding-inline: 20px;
  background: var(--brand);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  transition: .18s ease;
}
.icon-link:hover {
  color: var(--brand-deep);
  background: var(--brand-soft);
  border-color: #c9e0de;
}
.icon-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.cart-badge {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding-inline: 5px;
  border-radius: 999px; background: var(--accent); color: #1a1406;
  font-size: 11px; font-weight: 800; line-height: 1;
}
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  align-items: center; justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

.nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0 0 10px;
  margin: 0;
  scrollbar-width: none;
  border-top: 1px solid rgba(213, 226, 223, 0.7);
  padding-top: 8px;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: .18s ease;
}
.nav a:hover,
.nav a.is-active {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.header-tagline {
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.4;
}

/* Mobile drawer / sidebar */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(14, 36, 40, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.mobile-nav.is-open { opacity: 1; pointer-events: auto; }
.mobile-nav-panel {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: min(88vw, 360px);
  background: var(--paper);
  padding: 16px 16px max(20px, env(safe-area-inset-bottom));
  transform: translateX(-105%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
[dir="rtl"] .mobile-nav-panel { transform: translateX(105%); }
.mobile-nav.is-open .mobile-nav-panel { transform: translateX(0); }
.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mobile-nav-section { display: grid; gap: 8px; }
.mobile-nav-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-inline: 4px;
}
.mobile-nav-links { display: grid; gap: 4px; }
.mobile-nav-links a,
.mobile-nav-logout {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--ink);
  text-align: start;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.mobile-nav-links a:hover,
.mobile-nav-logout:hover { background: var(--brand-soft); color: var(--brand-deep); }
.mobile-nav-close {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 10px;
  width: 40px; height: 40px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.mobile-search {
  max-width: none;
  border-radius: 14px;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: var(--brand);
  color: #fff;
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--brand-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-accent { background: var(--accent); color: #1a1406; }
.btn-accent:hover { background: #a67824; }
.btn-ghost {
  background: transparent;
  color: var(--brand-deep);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: var(--brand-soft); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 22px; font-size: 15px; border-radius: 14px; }

/* Main */
main.shell { padding: 28px 0 64px; }

.alert, .errors {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-weight: 600;
  animation: fadeUp .35s ease both;
}
.alert { background: var(--ok-soft); color: var(--ok); border: 1px solid #b7e2c8; }
.errors { background: #fcedea; color: var(--danger); border: 1px solid #f0c4bc; }

.page-title {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.2;
}
.page-lead {
  color: var(--ink-soft);
  margin: 0 0 24px;
  max-width: 52ch;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.section-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

/* Hero — full bleed within shell as dominant plane */
.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(340px, 52vw, 460px);
  border-radius: 28px;
  overflow: hidden;
  margin-bottom: 36px;
  color: #f4faf9;
  display: grid;
  align-items: end;
  background:
    linear-gradient(115deg, rgba(8, 40, 44, 0.92) 0%, rgba(12, 107, 111, 0.72) 52%, rgba(14, 36, 40, 0.55) 100%),
    radial-gradient(circle at 78% 35%, rgba(184, 137, 45, 0.35), transparent 42%),
    linear-gradient(160deg, #0a3d40, #145f63 45%, #1c4a3e);
  animation: heroIn .7s ease both;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% 40%;
  height: 120%;
  background:
    radial-gradient(circle at 30% 40%, rgba(255,255,255,0.12), transparent 45%),
    repeating-linear-gradient(-18deg, transparent 0 14px, rgba(255,255,255,0.04) 14px 15px);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: clamp(28px, 5vw, 56px);
  max-width: 640px;
}
.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  line-height: 1.05;
}
.hero-brand span { color: var(--accent); }
.hero-copy {
  margin: 0 0 22px;
  color: #d5ebe8;
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 38ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Category rail */
.cat-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 36px;
  scrollbar-width: thin;
}
.cat-chip {
  display: grid;
  gap: 6px;
  padding: 16px 14px;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  min-height: 88px;
  transition: .2s ease;
  animation: fadeUp .45s ease both;
}
.cat-chip:hover {
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.cat-chip strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.cat-chip span {
  font-size: 12px;
  color: var(--ink-soft);
}

/* Product grid / cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  animation: fadeUp .5s ease both;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #c5dad6;
}
.product-card-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(160deg, #dceae8, #eef4f2);
  overflow: hidden;
}
.product-card-media-wrap {
  position: relative;
}
.product-card-wish {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  z-index: 2;
  margin: 0;
}
.product-card-wish button {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(251, 253, 252, 0.95);
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(14, 36, 40, 0.08);
}
.product-card-wish button.is-active,
.wishlist-btn.is-active {
  color: #b42318;
  border-color: #f2c4bf;
  background: #fff5f4;
}
.wishlist-form { margin-top: 10px; }
.wishlist-btn { gap: 8px; }
.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.product-card:hover .product-card-media img { transform: scale(1.04); }
.product-card-badge {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 1;
  background: var(--accent);
  color: #1a1406;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 999px;
}
.product-card-body {
  display: grid;
  gap: 8px;
  padding: 14px 14px 16px;
  flex: 1;
}
.product-card-name {
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
  color: var(--ink);
}
.product-card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.price {
  font-weight: 800;
  color: var(--brand-deep);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.price small { font-size: 0.72em; font-weight: 700; opacity: 0.8; }
.old-price {
  font-size: 12.5px;
  color: #7d9194;
  text-decoration: line-through;
}

.empty {
  padding: 56px 28px;
  text-align: center;
  background: var(--paper);
  border-radius: 22px;
  border: 1px dashed var(--line-strong);
  color: var(--ink-soft);
}
.empty strong { color: var(--ink); display: block; margin-bottom: 8px; font-size: 1.15rem; }

/* Product detail */
.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: start;
}
.product-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(360px, 34%);
  gap: 18px;
  align-items: start;
  width: 100%;
}
.product-primary,
.product-aside { display: grid; gap: 14px; min-width: 0; }
.product-breadcrumb {
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink-soft);
}
.product-price-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
  margin: 8px 0 4px;
}
.product-short {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-weight: 600;
}
.product-copy .product-desc { white-space: pre-wrap; line-height: 1.75; }
.sticky-buy { position: sticky; top: 88px; }
.product-buy-card .buy-panel { margin-top: 8px; }
.gallery-main {
  aspect-ratio: 1;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(160deg, #dceae8, #eef4f2);
  border: 1px solid var(--line);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.gallery-thumbs button {
  width: 64px; height: 64px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--paper);
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.gallery-thumbs button:hover,
.gallery-thumbs button.is-active {
  border-color: var(--brand);
  transform: translateY(-2px);
}
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery-video {
  width: 100%;
  margin-top: 14px;
  border-radius: 18px;
  background: #000;
  border: 1px solid var(--line);
}

.product-path {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
}
.product-path:hover { text-decoration: underline; }
.product-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}
.flag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.flag-ok { background: var(--ok-soft); color: var(--ok); }
.flag-brand { background: var(--brand-soft); color: var(--brand-deep); }
.flag-accent { background: var(--accent-soft); color: #7a5a14; }

.product-desc {
  color: var(--ink-soft);
  line-height: 1.85;
  margin: 14px 0 20px;
}

.bundle-box, .buy-panel, .upsell-list label {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.bundle-box {
  padding: 16px 18px;
  margin: 14px 0;
}
.bundle-box ul {
  margin: 8px 0 0;
  padding-inline-start: 18px;
  color: var(--ink-soft);
}

.upsell-list {
  display: grid;
  gap: 10px;
  margin: 8px 0 18px;
}
.upsell-list > strong {
  font-family: var(--display);
  font-size: 1.15rem;
}
.upsell-card {
  display: block;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.upsell-card:has(input:checked),
.upsell-card.is-selected {
  border-color: var(--brand);
  background: #f3faf9;
  box-shadow: 0 0 0 3px rgba(12, 107, 111, 0.1);
}
.upsell-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.upsell-meta { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.upsell-price { text-align: end; white-space: nowrap; }
.upsell-normal {
  font-size: 13px;
  color: var(--ink-soft);
  padding: 4px 2px;
}

.buy-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}
.live-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 700;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.field input,
.field select,
.field textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(12, 107, 111, 0.12);
}
.field textarea { min-height: 96px; resize: vertical; }
.full { grid-column: 1 / -1; }

.payment-gateways {
  display: grid;
  gap: 10px;
}
.payment-gateway {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.payment-gateway input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}
.payment-gateway.is-selected,
.payment-gateway:has(input:checked) {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 6%, #fff);
  box-shadow: 0 0 0 3px rgba(12, 107, 111, 0.1);
}
.payment-gateway-media {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f4f7f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.payment-gateway-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.payment-gateway-fallback {
  font-size: 18px;
  color: var(--brand);
}
.payment-gateway-name {
  font-size: 14px;
}

/* Cart / checkout */
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 22px;
  align-items: start;
}
.cart-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.cart-item-info { min-width: 0; }
.cart-qty,
.cart-remove { margin: 0; }
.cart-thumb {
  width: 88px; height: 88px;
  border-radius: 12px;
  overflow: hidden;
  background: #dceae8;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-title { font-weight: 700; display: block; margin-bottom: 4px; }
.cart-item-note { font-size: 12.5px; color: var(--ink-soft); }
.qty-input {
  width: 64px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
  background: #fff;
}
.link-danger {
  border: 0;
  background: none;
  color: var(--danger);
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}
.summary-card {
  background: linear-gradient(165deg, #0e2a2e, #124448 55%, #0c3a3d);
  color: #e8f3f1;
  border-radius: 20px;
  padding: 22px;
  position: sticky;
  top: calc(var(--header-h) + 18px);
  box-shadow: var(--shadow);
}
.summary-card h3 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 650;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  font-size: 14px;
}
.summary-total {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.18);
  font-size: 1.15rem;
  font-weight: 800;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
}
.panel h3 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 650;
}

.success-panel {
  max-width: 560px;
  margin: 28px auto;
  text-align: center;
  padding: 42px 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  animation: fadeUp .45s ease both;
}
.success-icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  display: grid; place-items: center;
}
.success-icon svg { width: 28px; height: 28px; }

/* Account */
.auth-panel { max-width: 480px; margin-inline: auto; }
.account-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.account-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
}
.account-nav a.is-active,
.account-nav a:hover {
  background: var(--brand-soft);
  border-color: transparent;
  color: var(--brand-deep);
}
.account-list { display: grid; gap: 12px; }
.account-card { padding: 18px; }
.account-card-link { transition: border-color .15s, box-shadow .15s; }
.account-card-link:hover {
  border-color: var(--brand);
  box-shadow: 0 10px 24px rgba(14, 36, 40, 0.06);
}
.account-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.account-card-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 10px;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 700;
}
.header-logout { display: inline; margin: 0; }
.header-logout button {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 0;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  border-inline-start: 2px solid var(--line);
  padding-inline-start: 16px;
}
.timeline li { position: relative; }
.timeline li::before {
  content: "";
  position: absolute;
  inset-inline-start: -21px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.timeline strong { display: block; }
.timeline span { font-size: 12.5px; color: var(--ink-soft); }
.timeline p { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-soft); }

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: #c9dcda;
  padding: 42px 0 28px;
  margin-top: 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  gap: 28px;
  align-items: start;
}
.footer .brand { color: #fff; }
.footer-copy { margin-top: 10px; max-width: 36ch; line-height: 1.7; font-size: 14px; }
.footer-col h4 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer-col a {
  display: block;
  padding: 5px 0;
  color: #b7cbc8;
  font-size: 14px;
}
.footer-col a:hover { color: #e6c778; }
.social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.social a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  color: #e8f3f1;
  transition: .15s ease;
}
.social a:hover {
  background: rgba(255,255,255,0.08);
  border-color: #e6c778;
  color: #e6c778;
}
.social a svg { width: 18px; height: 18px; }
.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12.5px;
  color: #8aa3a0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom .copyright { margin: 0; }

.dev-credit {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.dev-credit-label { color: #8aa3a0; }
.dev-credit-name {
  color: #e6c778;
  font-weight: 700;
  border-bottom: 1px solid transparent;
  transition: border-color .15s, color .15s;
}
.dev-credit-name:hover,
.dev-credit:focus-within .dev-credit-name {
  border-bottom-color: #e6c778;
  color: #f3d98a;
}
.dev-popover {
  position: absolute;
  inset-inline-end: 0;
  bottom: calc(100% + 10px);
  min-width: 180px;
  padding: 10px;
  border-radius: 14px;
  background: #102a2e;
  border: 1px solid rgba(230, 199, 120, 0.35);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  display: grid;
  gap: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: .18s ease;
  z-index: 5;
}
.dev-credit:hover .dev-popover,
.dev-credit:focus-within .dev-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dev-popover a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  color: #e8f3f1;
  font-weight: 600;
  font-size: 13px;
}
.dev-popover a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e6c778;
}

.footer--compact .footer-inner,
.footer--minimal .footer-inner {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
}
.footer--minimal .social { justify-content: center; }

/* Sticky mobile cart bar */
.mobile-cart-bar {
  display: none;
  position: fixed;
  inset-inline: 12px;
  bottom: 12px;
  z-index: 35;
  background: var(--ink);
  color: #fff;
  border-radius: 16px;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 12px 30px rgba(14, 36, 40, 0.28);
  text-decoration: none;
}
.mobile-cart-bar strong { color: #e6c778; }

/* Pagination */
.pagination { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.pagination > * {
  display: inline-flex;
  min-width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding-inline: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-weight: 600;
  font-size: 13px;
}
.pagination .active span,
.pagination [aria-current="page"] span {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  border-radius: 10px;
  padding: 8px 12px;
}

/* Sidebar + blog */
.shell--with-sidebar .store-layout {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.store-sidebar {
  position: sticky;
  top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--paper) 92%, var(--brand) 8%);
}
.sidebar-section + .sidebar-section { margin-top: 18px; }
.sidebar-title { font-size: 0.95rem; margin: 0 0 10px; }
.sidebar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sidebar-list a { color: var(--ink); text-decoration: none; font-size: 14px; }
.sidebar-list a:hover { color: var(--brand); }
.sidebar-content { font-size: 14px; color: var(--ink-soft); }
.blog-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: 16px; margin: 16px 0 24px; }
.blog-body { line-height: 1.8; font-size: 1.05rem; }
.blog-article { max-width: 720px; }

/* Responsive */
@media (max-width: 980px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .shell--with-sidebar .store-layout { grid-template-columns: 1fr; }
  .store-sidebar { position: static; }
}

@media (max-width: 780px) {
  html, body { overflow-x: hidden; max-width: 100vw; }
  body.nav-open { overflow: hidden; touch-action: none; }
  .shell { width: min(100% - 1rem, var(--shell)); max-width: 100%; }
  .header-main {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 56px;
    padding-block: 6px;
  }
  .header-main .brand { min-width: 0; font-size: 1.25rem; }
  .header-main .brand strong,
  .header-main .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-main .search { display: none; }
  .header-tagline { display: none; }
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-nav { display: block; }
  .header-actions { gap: 4px; flex-shrink: 0; }
  .header-actions .hide-sm,
  .hide-sm { display: none !important; }
  .topbar-accent { display: none; }
  .topbar-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-card { min-width: 0; }
  .product-card .btn,
  .product-card button { width: 100%; justify-content: center; }
  .product-detail { grid-template-columns: 1fr; gap: 18px; }
  .product-split { grid-template-columns: 1fr; }
  .sticky-buy { position: static; }
  .sticky-buy { position: static; }
  .product-gallery,
  .product-gallery img,
  .product-gallery video { max-width: 100%; }
  .split-layout { grid-template-columns: 1fr; gap: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .summary-card { position: static; width: 100%; }
  .cart-item {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas:
      "thumb info"
      "thumb qty"
      "thumb del";
    gap: 8px 10px;
    align-items: start;
  }
  .cart-thumb { grid-area: thumb; width: 72px; height: 72px; }
  .cart-item-info { grid-area: info; }
  .cart-qty {
    grid-area: qty;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
  }
  .cart-remove { grid-area: del; justify-self: start; }
  .footer-inner { grid-template-columns: 1fr; gap: 18px; }
  .footer-bottom { justify-content: center; text-align: center; }
  .dev-popover { inset-inline: 0; margin-inline: auto; }
  .mobile-cart-bar {
    display: flex;
    inset-inline: 10px;
    bottom: max(10px, env(safe-area-inset-bottom, 0px));
    padding: 11px 14px;
  }
  body:has(.chatbot-root) .mobile-cart-bar,
  body:has([data-chatbot]) .mobile-cart-bar {
    bottom: max(72px, calc(env(safe-area-inset-bottom, 0px) + 64px));
  }
  main.shell { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .hero {
    border-radius: 18px;
    min-height: 240px;
    padding: 22px 16px;
    margin-inline: 0;
  }
  .hero h1,
  .hero-brand { font-size: clamp(1.45rem, 7vw, 2rem); line-height: 1.25; word-break: break-word; }
  .hero p,
  .hero-copy { font-size: 0.95rem; max-width: 100%; }
  .hero .btn-row,
  .hero .actions,
  .hero-actions { flex-wrap: wrap; gap: 8px; }
  .hero-actions .btn { flex: 1 1 auto; min-width: min(100%, 140px); }
  .section-head { flex-wrap: wrap; gap: 10px; }
  .cat-rail {
    grid-auto-columns: minmax(120px, 58vw);
    margin-inline: -0.25rem;
    padding-inline: 0.25rem;
    gap: 8px;
  }
  .panel { padding: 14px; overflow: hidden; }
  .btn-block { width: 100%; }
  .account-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .account-nav::-webkit-scrollbar { display: none; }
  input, select, textarea, .btn { font-size: 16px; }
  .search input { font-size: 16px; }
}

@media (max-width: 430px) {
  .shell { width: min(100% - 0.75rem, var(--shell)); }
  .product-grid { gap: 8px; }
  .product-card-body { padding: 10px; }
  .product-card-name { font-size: 12.5px; min-height: 2.4em; line-height: 1.3; }
  .price { font-size: 0.95rem; }
  .icon-link { padding: 8px; }
  .icon-link span.label { display: none; }
  .locale-link { font-size: 12px; padding-inline: 10px; }
  .cart-item { grid-template-columns: 64px minmax(0, 1fr); }
  .cart-thumb { width: 64px; height: 64px; }
  .page-title { font-size: 1.35rem; word-break: break-word; }
  .brand-logo { max-height: 34px; max-width: min(132px, 40vw); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
