/* ===========================================================================
   PlanetaryDriver — app shell + components. Mobile-first.
   =========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  background-image: var(--bg-pattern);
  background-size: var(--bg-pattern-size);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 750; letter-spacing: -.01em; }
h1 { font-size: 1.9rem; }
p { margin: 0 0 1em; }
hr { border: none; border-top: 1px solid var(--border); margin: 1.4rem 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-contrast); }

.muted { color: var(--muted); }
.tiny { font-size: .76rem; }
.small { font-size: .86rem; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ----------------------------------------------------------------- App bar */
.appbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--appbar-bg);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--appbar-h);
  padding-top: env(safe-area-inset-top);
}
.appbar-inner {
  max-width: var(--maxw); margin: 0 auto; height: var(--appbar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 12px;
}
.brand { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.brand-mark { color: var(--accent-2); display: grid; place-items: center; }
.brand-img { width: 30px; height: 30px; display: block; flex-shrink: 0; }
.pic { display: inline-block; vertical-align: -0.18em; }
.empty .big .pic { width: 46px; height: 46px; vertical-align: middle; }
.brand-text { font-weight: 800; letter-spacing: .5px; font-size: 1.02rem; }
.brand-text b { color: var(--accent); font-weight: 800; }
.brand-text.small { font-size: 1.2rem; }
.appbar-search {
  flex: 1; display: none; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 13px; color: var(--muted);
  max-width: 440px;
}
.appbar-search input { flex: 1; background: none; border: none; color: var(--text); font-size: .92rem; outline: none; min-width: 0; }
.search-m { display: grid; }
.desktop-nav { display: none; gap: 4px; }
.dn-link { padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .92rem; color: var(--muted); }
.dn-link:hover { color: var(--text); background: var(--surface); }
.dn-link.active { color: var(--accent); }
.appbar-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.iconbtn {
  position: relative; width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; color: var(--text); background: none;
  border: none; cursor: pointer;
}
.iconbtn:hover { background: var(--surface); }
.ic { width: 24px; height: 24px; }
.ic-sm { width: 20px; height: 20px; }
.cart-badge {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 999px; background: var(--accent);
  color: var(--accent-contrast); font-size: .66rem; font-weight: 800;
  display: grid; place-items: center; line-height: 1;
}
.cart-badge[hidden] { display: none; }
.avatar {
  border-radius: 50%; background: var(--accent); color: var(--accent-contrast);
  display: grid; place-items: center; font-weight: 800; overflow: hidden;
}
.avatar-xs { width: 30px; height: 30px; font-size: .72rem; }
.avatar-sm { width: 40px; height: 40px; font-size: .9rem; }
.avatar-lg { width: 76px; height: 76px; font-size: 1.7rem; }

/* ----------------------------------------------------------------- Bottom nav */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  display: flex; justify-content: space-around;
  background: var(--appbar-bg); backdrop-filter: saturate(140%) blur(12px);
  border-top: 1px solid var(--border);
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
}
.bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--muted); font-size: .66rem; font-weight: 600; padding-top: 8px;
  transition: color .15s;
}
.bn-item.active { color: var(--accent); }
.bn-icon { position: relative; display: grid; place-items: center; }
.bn-item.active .bn-icon { transform: translateY(-1px); }
.bn-badge { top: -5px; right: -8px; }
.bn-label { letter-spacing: .2px; }

/* ----------------------------------------------------------------- Page */
.page { max-width: var(--maxw); margin: 0 auto; padding: 16px; min-height: 60vh; }
.section { margin: 28px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.section-head h2 { margin: 0; font-size: 1.25rem; }
.section-head a { color: var(--accent); font-weight: 600; font-size: .88rem; }
.eyebrow { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }

/* ----------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--accent); color: var(--accent-contrast); border: 1px solid transparent;
  font-weight: 700; font-size: .92rem; padding: 11px 18px; border-radius: 10px;
  cursor: pointer; transition: transform .08s, filter .15s; font-family: inherit; text-align: center;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 13px; font-size: .84rem; border-radius: 8px; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-strong); filter: none; }
.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ----------------------------------------------------------------- Cards / grids */
.card {
  background: var(--elev); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.card-pad { padding: 16px; }
.grid { display: grid; gap: 14px; }
.grid-products { grid-template-columns: repeat(2, 1fr); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }

/* product card */
.pcard { display: flex; flex-direction: column; background: var(--elev); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, transform .1s; }
.pcard:hover { border-color: var(--border-strong); }
.pcard-media { aspect-ratio: 1 / 1; background: var(--surface); position: relative; display: grid; place-items: center; overflow: hidden; }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; }
.pcard-ph { color: var(--muted); font-family: var(--mono); font-size: .72rem; text-align: center; padding: 10px; }
.pcard-badge { position: absolute; top: 8px; left: 8px; background: var(--accent-2); color: #1a1a1a; font-size: .64rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; }
.pcard-kit { position: absolute; top: 8px; right: 8px; background: var(--accent); color: var(--accent-contrast); font-size: .62rem; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.pcard-body { padding: 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard-cat { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.pcard-name { font-weight: 650; font-size: .92rem; line-height: 1.25; }
.pcard-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 8px; gap: 8px; }
.price { color: var(--price); font-weight: 800; font-size: 1.02rem; }
.price-compare { color: var(--muted); text-decoration: line-through; font-size: .8rem; font-weight: 500; margin-left: 5px; }
.iconadd { width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: var(--accent-contrast); border: none; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.iconadd:active { transform: scale(.92); }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .84rem; font-weight: 600; }
.chip.active { background: var(--accent); color: var(--accent-contrast); border-color: transparent; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 6px; background: var(--tag-bg); color: var(--tag-text); font-size: .72rem; font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); font-size: .74rem; color: var(--muted); }
.pill.ok { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); }

/* ----------------------------------------------------------------- Hero */
.hero { position: relative; border: 1px solid var(--border); border-radius: 20px; padding: 30px 22px; background:
   linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, var(--elev)) 0%, var(--elev) 55%); overflow: hidden; }
.hero h1 { font-size: 2rem; max-width: 16ch; }
.hero p { color: var(--text); opacity: .85; max-width: 46ch; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.hero-spark { position: absolute; right: -30px; top: -30px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 40%, transparent), transparent 70%); pointer-events: none; }

/* ----------------------------------------------------------------- Forms */
label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
input[type=text], input[type=email], input[type=password], input[type=search],
input[type=number], input[type=url], select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; padding: 11px 13px; font-size: .95rem;
  font-family: inherit; outline: none; transition: border-color .15s;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.hint { color: var(--muted); font-size: .78rem; margin-top: 5px; }
.checkbox { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.checkbox input { width: auto; }
.form-card { background: var(--elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; max-width: 460px; margin: 8px auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ----------------------------------------------------------------- Flash / toast */
.flash-stack { margin-bottom: 14px; display: grid; gap: 8px; }
.flash { padding: 11px 14px; border-radius: 10px; font-size: .9rem; font-weight: 500; border: 1px solid var(--border); background: var(--elev); }
.flash-success { border-color: color-mix(in srgb, var(--success) 50%, transparent); color: var(--success); }
.flash-error { border-color: color-mix(in srgb, var(--danger) 50%, transparent); color: var(--danger); }
.flash-info { border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent); }
.toast-host { position: fixed; left: 0; right: 0; bottom: calc(var(--bottomnav-h) + 14px + env(safe-area-inset-bottom)); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--elev-2); border: 1px solid var(--border-strong); color: var(--text); padding: 11px 18px; border-radius: 12px; font-size: .88rem; font-weight: 600; box-shadow: var(--shadow); animation: toastin .25s ease; max-width: 90%; }
.toast.success { border-color: color-mix(in srgb, var(--success) 55%, transparent); }
@keyframes toastin { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ----------------------------------------------------------------- Product detail */
.pdp { display: grid; gap: 20px; }
.pdp-gallery { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); aspect-ratio: 1/1; display: grid; place-items: center; overflow: hidden; }
.pdp-gallery img { width: 100%; height: 100%; object-fit: cover; }
.pdp-cat { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.pdp-price { font-size: 1.7rem; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.spec-table td { padding: 9px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.spec-table td:first-child { color: var(--muted); width: 42%; }
.kit-incl { display: flex; gap: 12px; align-items: center; padding: 11px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); }
.kit-incl .qty { font-family: var(--mono); color: var(--accent); font-weight: 700; }
.prose { line-height: 1.7; }
.prose h2 { font-size: 1.3rem; margin-top: 1.5em; }
.prose h3 { font-size: 1.1rem; margin-top: 1.4em; }
.prose code { font-family: var(--mono); background: var(--surface); padding: .12em .4em; border-radius: 5px; font-size: .88em; }
.prose pre { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .9rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.prose img { border-radius: 10px; margin: 1em 0; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 1em 0; padding: .3em 0 .3em 14px; color: var(--muted); }

/* ----------------------------------------------------------------- Product gallery + lightbox */
.gallery { display: flex; flex-direction: column; gap: 10px; }
.gallery-main { position: relative; aspect-ratio: 1/1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.gallery-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6%; opacity: 0; transition: opacity .18s; pointer-events: none; cursor: zoom-in; }
.gallery-img.active { opacity: 1; pointer-events: auto; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: var(--elev-2); border: 1px solid var(--border); color: var(--text); font-size: 1.5rem; line-height: 1; display: grid; place-items: center; cursor: pointer; opacity: .9; padding: 0; }
.gallery-nav:hover { opacity: 1; border-color: var(--border-strong); }
.gallery-nav.prev { left: 10px; } .gallery-nav.next { right: 10px; }
.gallery-expand { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 9px; background: var(--elev-2); border: 1px solid var(--border); color: var(--text); display: grid; place-items: center; cursor: pointer; opacity: .9; }
.gallery-count { position: absolute; bottom: 10px; left: 10px; background: var(--elev-2); border: 1px solid var(--border); color: var(--muted); font: 600 .72rem var(--mono); padding: 3px 9px; border-radius: 999px; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; cursor: pointer; padding: 0; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.gallery-thumb.active { border-color: var(--accent); }

.lightbox { position: fixed; inset: 0; z-index: 200; background: #000000ee; display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lb-img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 8px; background: #0c0e12; }
.lb-btn { position: absolute; background: #ffffff14; border: 1px solid #ffffff33; color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-close { top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; font-size: 1.1rem; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; font-size: 2rem; line-height: 1; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #fff; font: 600 .85rem var(--mono); background: #ffffff14; padding: 5px 14px; border-radius: 999px; }
@media (max-width: 640px) { .lb-nav { width: 44px; height: 44px; font-size: 1.6rem; } .gallery-thumb { flex-basis: 54px; width: 54px; height: 54px; } }

/* ----------------------------------------------------------------- Lists: threads / files / comments */
.list { display: grid; gap: 10px; }
.row-item { display: flex; gap: 12px; padding: 13px 14px; background: var(--elev); border: 1px solid var(--border); border-radius: 12px; align-items: center; }
.row-item:hover { border-color: var(--border-strong); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 650; font-size: .96rem; }
.row-meta { color: var(--muted); font-size: .78rem; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 3px; }
.row-stat { text-align: center; flex-shrink: 0; min-width: 42px; }
.row-stat b { display: block; font-size: 1rem; }
.row-stat span { font-size: .66rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.fcard-thumb { aspect-ratio: 4/3; background: var(--surface); display: grid; place-items: center; color: var(--muted); font-family: var(--mono); }
.fcard-ext { font-size: 1.4rem; font-weight: 800; color: var(--accent); }

.comment { display: flex; gap: 11px; padding: 12px 0; border-top: 1px solid var(--border); }
.comment-body { flex: 1; }
.comment-head { display: flex; align-items: center; gap: 8px; font-size: .82rem; margin-bottom: 3px; }
.comment-author { font-weight: 700; }

.like-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: .82rem; font-weight: 600; cursor: pointer; font-family: inherit; }
.like-btn.liked { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.like-btn.liked svg { fill: var(--danger); }

/* ----------------------------------------------------------------- Cart / checkout */
.cart-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: center; }
.cart-thumb { width: 64px; height: 64px; border-radius: 10px; background: var(--surface); object-fit: cover; flex-shrink: 0; display: grid; place-items: center; color: var(--muted); }
.qty-input { width: 64px; text-align: center; }
.summary { background: var(--elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; position: sticky; top: calc(var(--appbar-h) + 12px); }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; }
.summary-total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 800; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 8px; }
.demo-note { background: var(--tag-bg); color: var(--tag-text); border-radius: 10px; padding: 10px 12px; font-size: .82rem; margin: 12px 0; }

.empty { text-align: center; padding: 50px 16px; color: var(--muted); }
.empty .big { font-size: 2.4rem; margin-bottom: 8px; }

/* ----------------------------------------------------------------- Profile */
.profile-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.stat-row { display: flex; gap: 22px; margin: 12px 0; }
.stat-row b { font-size: 1.1rem; }

/* ----------------------------------------------------------------- Admin */
.admin-shell { display: grid; grid-template-columns: 1fr; gap: 16px; }
.admin-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav a { white-space: nowrap; padding: 8px 13px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-size: .85rem; font-weight: 600; color: var(--muted); }
.admin-nav a.active, .admin-nav a:hover { color: var(--accent); border-color: var(--accent); }
.stat-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-card { background: var(--elev); border: 1px solid var(--border); border-radius: 12px; padding: 15px; }
.stat-card b { font-size: 1.7rem; display: block; }
.stat-card span { color: var(--muted); font-size: .8rem; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.table-wrap { overflow-x: auto; background: var(--elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 12px; }
.badge-status { padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.s-pending { background: var(--tag-bg); color: var(--tag-text); }
.s-paid, .s-fulfilled { background: color-mix(in srgb, var(--success) 22%, transparent); color: var(--success); }
.s-cancelled { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.bar { height: 8px; background: var(--surface); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); }

/* ----------------------------------------------------------------- Misc layout helpers */
.split { display: grid; gap: 20px; }
.cluster { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stack-sm > * + * { margin-top: 8px; }
.video-embed { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--border); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 30px 16px 26px; background: var(--elev); }
.footer-grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.footer-grid h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.footer-grid a { display: block; padding: 4px 0; font-size: .88rem; color: var(--text); opacity: .85; }
.footer-grid a:hover { color: var(--accent); opacity: 1; }
.news-form { display: flex; gap: 7px; }
.news-form input { flex: 1; }
.footer-base { max-width: var(--maxw); margin: 22px auto 0; padding-top: 16px; border-top: 1px solid var(--border); text-align: center; }

/* ===========================================================================
   Tablet / desktop
   =========================================================================== */
@media (min-width: 640px) {
  .appbar-search { display: flex; }
  .search-m { display: none; }
  .grid-products { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 2.2rem; }
  .hero h1 { font-size: 2.5rem; }
  .form-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  :root { --appbar-h: 62px; }
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .desktop-nav { display: flex; }
  .grid-products { grid-template-columns: repeat(4, 1fr); }
  .page { padding: 24px 16px; }
  .pdp { grid-template-columns: 1fr 1fr; align-items: start; gap: 36px; }
  .split-cart { grid-template-columns: 1.6fr 1fr; }
  .split-side { grid-template-columns: 1fr 300px; }
  .admin-shell { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: 50px 44px; }
  .toast-host { bottom: 24px; }
}
@media (min-width: 1100px) {
  .grid-products { grid-template-columns: repeat(4, 1fr); }
}
