/* ============================================================
   Base — resets, typography, shared components
   ============================================================ */

* { box-sizing: border-box; }
html, body { height: auto; margin: 0; }

html {
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.92;
  font-weight: 900;
}

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.02em;
  border: 2px solid var(--fg);
  text-decoration: none;
  background: none;
  color: var(--fg);
}
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--solid:hover { border-color: var(--accent); }
.btn--ghost:hover { border-color: var(--fg); }

/* ---------- Breadcrumb (shared across product + category) ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--fg-soft);
  margin-bottom: 32px;
}
.breadcrumb a {
  text-decoration: none;
  color: var(--fg-soft);
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb__sep { opacity: 0.5; user-select: none; }
.breadcrumb__current { color: var(--fg); font-weight: 600; }

/* ---------- Section heading ---------- */
.sechead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.sechead h2 { font-size: clamp(30px, 4.4vw, 46px); }
.sechead p { color: var(--fg-soft); font-size: 14.5px; max-width: 34ch; margin: 8px 0 0; }

section { padding: 64px 0; }
.divider { border: none; border-top: 2px solid var(--fg); margin: 0; }

/* ---------- Product grid ---------- */
.pgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
@media (max-width: 900px) { .pgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .pgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card__body { padding: 10px 10px 8px; gap: 4px; }
  .card__name { font-size: 13px; }
  .card__desc { font-size: 11px; min-height: 26px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .card__foot { padding: 0 10px 10px; flex-wrap: wrap; gap: 6px; }
  .card__price { font-size: 14px; }
  .card__view { font-size: 11px; padding: 4px 2px; }
  .card__add { padding: 6px 10px; font-size: 11px; }
}

/* ---------- Product card (shared) ---------- */
.card {
  border: 2px solid var(--fg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card__link { text-decoration: none; color: inherit; display: block; }

.card__swatch {
  aspect-ratio: 1 / 0.92;
  position: relative;
  border-bottom: 2px solid var(--fg);
  overflow: hidden;
}
.card__swatch svg { width: 100%; height: 100%; }
.card__swatch img { width: 100%; height: 100%; object-fit: cover; }
.product-image { display: block; width: 100%; height: 100%; object-fit: cover; }

.card__tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  background: var(--ink);
  color: var(--paper);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 8px;
}

.card__body {
  padding: 18px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.card__name { font-weight: 700; font-size: 16.5px; }
.card__stock { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.card__stock--low { color: #b45309; }
.card__desc { font-size: 13px; color: var(--fg-soft); line-height: 1.4; min-height: 34px; }

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 18px 18px;
  margin-top: auto;
}
.card__price { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.card__actions { display: flex; align-items: center; gap: 10px; }

.card__view {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-soft);
  text-decoration: none;
  padding: 8px 4px;
  letter-spacing: 0.02em;
}
.card__view:hover { text-decoration: underline; }

.card__add {
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.card__add:hover:not(:disabled) { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.card__add:active:not(:disabled) { transform: translateY(1px); }
.card__add:disabled { opacity: 0.6; cursor: not-allowed; }
.card__add.added { background: var(--accent-dark); }
.card__add--soldout { background: var(--bg-2); color: var(--fg-soft); cursor: not-allowed; opacity: 0.7; }
.card__soldout-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  background: color-mix(in srgb, var(--ink) 85%, transparent);
  color: var(--white);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 4px;
  z-index: 2;
}

.image-upload {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  transition: border-color 0.15s ease;
}
.image-upload.has-image { border-style: solid; border-color: var(--accent); }
.image-upload.is-uploading { opacity: 0.6; pointer-events: none; }
.image-upload__preview {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
}
.image-upload__preview img { width: 100%; height: 100%; object-fit: contain; }
.image-upload__placeholder,
.image-upload__error,
.image-upload__loading { padding: 10px; text-align: center; font-size: 12px; color: var(--fg-soft); }
.image-upload__error { color: var(--danger); }
.image-upload__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.logo__img { width: 34px; height: 34px; object-fit: contain; flex: none; }

.product-gallery {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-2);
  border-radius: inherit;
  perspective: 1200px;
  touch-action: pan-y;
}
.card__swatch > .product-gallery,
.pdp__media > .product-gallery { position: absolute; inset: 0; }
.flip-card,
.flip-card__stage {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
.flip-card__face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform-origin: center center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity;
}
.flip-card__face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flip-card__face svg { width: 100%; height: 100%; }
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--fg);
  border: 2px solid var(--line);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 0;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
}
.gallery-nav svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gallery-nav:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-50%) scale(1.08); box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 25%, transparent); }
.gallery-nav:active { transform: translateY(-50%) scale(0.95); }
.gallery-nav:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.gallery-nav--prev { left: 12px; }
.gallery-nav--next { right: 12px; }
.product-gallery--card .gallery-nav { width: 32px; height: 32px; font-size: 14px; border-width: 1.5px; }
.product-gallery--card .gallery-nav svg { width: 14px; height: 14px; }
.product-gallery--card .gallery-nav--prev { left: 8px; }
.product-gallery--card .gallery-nav--next { right: 8px; }
.product-gallery--detail .gallery-nav { width: 48px; height: 48px; font-size: 22px; border-width: 2px; }
.product-gallery--detail .gallery-nav svg { width: 22px; height: 22px; }
.product-gallery--detail .gallery-nav--prev { left: 16px; }
.product-gallery--detail .gallery-nav--next { right: 16px; }
.product-gallery:hover .gallery-nav,
.product-gallery:focus-within .gallery-nav { display: flex; }
.product-gallery__dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 4;
}
.product-gallery__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.15);
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, width 0.2s ease;
}
.product-gallery__dot:hover { background: rgba(255,255,255,0.8); }
.product-gallery__dot.is-active { background: var(--accent); width: 22px; border-radius: 4px; }
.product-gallery[data-count="1"] .gallery-nav,
.product-gallery[data-count="1"] .product-gallery__dots { display: none !important; }
.gallery-fullscreen-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--fg);
  border: 2px solid var(--line);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.gallery-fullscreen-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gallery-fullscreen-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.1); box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 25%, transparent); }
.gallery-fullscreen-btn:active { transform: scale(0.95); }
.gallery-fullscreen-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.product-gallery--card .gallery-fullscreen-btn { width: 30px; height: 30px; top: 8px; right: 8px; }
.product-gallery--card .gallery-fullscreen-btn svg { width: 13px; height: 13px; }
.product-gallery--card:hover .gallery-fullscreen-btn { display: flex; }
.product-gallery--detail .gallery-fullscreen-btn { display: flex; width: 42px; height: 42px; top: 14px; right: 14px; }
.product-gallery--detail .gallery-fullscreen-btn svg { width: 18px; height: 18px; }
.product-gallery[data-count="1"] .gallery-fullscreen-btn { display: none !important; }

.gallery-fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(0,0,0,0.95);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.gallery-fullscreen-overlay.is-open { display: flex; opacity: 1; }
.gallery-fullscreen-overlay__stage {
  position: relative;
  width: min(100%, 1200px);
  height: min(90vh, 1200px);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
}
.gallery-fullscreen-overlay__stage > .product-gallery {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  background: transparent;
}
.gallery-fullscreen-overlay .flip-card__face img { object-fit: contain; }
.gallery-fullscreen-overlay__close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.3);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: background 0.2s ease, transform 0.15s ease;
  padding: 0;
  z-index: 10;
}
.gallery-fullscreen-overlay__close:hover { background: var(--accent); border-color: var(--accent); transform: scale(1.1); }
.gallery-fullscreen-overlay .gallery-nav { display: flex; width: 56px; height: 56px; background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); color: #fff; }
.gallery-fullscreen-overlay .gallery-nav svg { width: 24px; height: 24px; }
.gallery-fullscreen-overlay .gallery-nav:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.gallery-fullscreen-overlay .gallery-nav--prev { left: 20px; }
.gallery-fullscreen-overlay .gallery-nav--next { right: 20px; }
.gallery-fullscreen-overlay .product-gallery__dots { bottom: -30px; }
.gallery-fullscreen-overlay .product-gallery__dot { background: rgba(255,255,255,0.3); }
.gallery-fullscreen-overlay .product-gallery__dot.is-active { background: #fff; }
.gallery-fullscreen-overlay__counter {
  position: absolute;
  top: -50px;
  left: 0;
  color: rgba(255,255,255,0.8);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.05em;
  background: rgba(255,255,255,0.1);
  padding: 8px 14px;
  border-radius: 999px;
}
body.has-fullscreen-open { overflow: hidden; }

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  margin: 8px 0 12px;
}
.image-gallery.is-uploading { pointer-events: none; opacity: 0.7; }
.image-gallery__item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.image-gallery__item > img { width: 100%; height: 100%; object-fit: cover; }
.image-gallery__item-actions {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: flex;
  gap: 4px;
}
.image-gallery__move,
.image-gallery__remove {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--fg);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.image-gallery__move { font-size: 14px; font-weight: 700; }
.image-gallery__move:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.1); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 25%, transparent); }
.image-gallery__move:active,
.image-gallery__remove:active { transform: scale(0.95); }
.image-gallery__move:disabled { opacity: 0.3; cursor: not-allowed; }
.image-gallery__move:disabled:hover { background: var(--surface); border-color: var(--line); color: var(--fg); transform: none; box-shadow: none; }
.image-gallery__remove { color: var(--fg-soft); }
.image-gallery__remove:hover { background: var(--danger); border-color: var(--danger); color: #fff; transform: scale(1.1); }
.image-gallery__add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border: 2px dashed var(--line);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--fg-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.image-gallery__add:hover { border-color: var(--accent); border-style: solid; color: var(--accent); background: color-mix(in srgb, var(--accent) 4%, transparent); }
.image-gallery__main-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 3px 6px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.image-gallery__loading,
.image-gallery__empty {
  display: flex;
  min-height: 112px;
  align-items: center;
  justify-content: center;
  color: var(--fg-soft);
  font-size: 12px;
}
.image-gallery__loading { width: 100%; height: 100%; }
.image-gallery__empty { grid-column: 1 / -1; border: 1px dashed var(--line); }

@media (hover: none) {
  .product-gallery .gallery-nav { display: flex; }
  .product-gallery--card .gallery-fullscreen-btn { display: flex; }
}
@media (max-width: 640px) {
  .gallery-fullscreen-overlay { padding: 20px; }
  .gallery-fullscreen-overlay__stage { height: 80vh; }
  .gallery-fullscreen-overlay__close { top: -45px; width: 38px; height: 38px; }
  .gallery-fullscreen-overlay .gallery-nav { width: 44px; height: 44px; }
  .gallery-fullscreen-overlay .gallery-nav--prev { left: 8px; }
  .gallery-fullscreen-overlay .gallery-nav--next { right: 8px; }
}

.variant-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24,21,16,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 80;
}
.variant-modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.variant-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: min(480px, 92vw);
  max-height: 85vh;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 14px;
  z-index: 81;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.variant-modal.is-open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.variant-modal__head,
.variant-modal__foot { display: flex; align-items: center; gap: 10px; padding: 18px 22px; }
.variant-modal__head { justify-content: space-between; border-bottom: 1px solid var(--line); }
.variant-modal__head h3 { font-family: var(--font-display); font-size: 20px; text-transform: uppercase; margin: 0; }
.variant-modal__close { background: none; border: none; font-size: 26px; cursor: pointer; color: var(--fg); }
.variant-modal__body { flex: 1; overflow-y: auto; padding: 22px; }
.variant-modal__product { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.variant-modal__swatch { width: 60px; height: 60px; border-radius: 8px; overflow: hidden; flex: none; }
.variant-modal__swatch svg { width: 100%; height: 100%; }
.variant-modal__name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.variant-modal__price { font-family: var(--font-display); font-size: 22px; font-weight: 900; }
.variant-modal__foot { border-top: 1px solid var(--line); }
.variant-modal__foot .btn { flex: 1; }
.variant-modal__error { min-height: 1.25em; margin: 12px 0 0; color: var(--danger); font-size: 13px; }
.product-option { margin-bottom: 16px; }
.product-option > label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; color: var(--fg-soft); }
.product-option select,
.product-option input[type="text"] { width: 100%; padding: 10px 12px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font-family: inherit; border-radius: 8px; }
.swatch-group { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 36px; height: 36px; border-radius: 8px; border: 2px solid var(--line); background: var(--option-color, var(--bg-2)); cursor: pointer; padding: 0; transition: border-color 0.15s ease, transform 0.1s ease; }
.swatch:hover { transform: scale(1.05); }
.swatch.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.radio-group { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-group label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; text-transform: none; letter-spacing: 0; cursor: pointer; }
.radio-group input { accent-color: var(--accent); }

/* ---------- Best-in-the-field blocks (homepage) ---------- */
.bestblock { margin-bottom: 56px; }
.bestblock:last-child { margin-bottom: 0; }

.bestblock__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.bestblock__head h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}
.bestblock__all {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.bestblock__all:hover { text-decoration: underline; }

/* ---------- Header / nav (shared across all pages) ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 2px solid var(--fg);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark { width: 34px; height: 34px; flex: none; }
.logo__text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.logo__text small {
  display: block;
  font-family: var(--font-body);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  font-weight: 500;
  color: var(--fg-soft);
  text-transform: uppercase;
}
.navlinks { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.navlinks a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.navlinks a:hover { border-color: var(--accent); }
.navright { display: flex; align-items: center; gap: 14px; }
.iconbtn {
  background: none;
  border: 2px solid var(--fg);
  color: var(--fg);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: none;
}
.iconbtn:hover { border-color: var(--accent); }
.cartcount {
  position: absolute;
  top: -9px;
  right: -9px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg);
}
.menubtn { display: none; }
@media (max-width: 840px) {
  .navlinks { display: none; }
  .menubtn { display: flex; }
}

/* ---------- Footer (shared) ---------- */
footer { padding: 56px 0 34px; }
.fgrid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; }
@media (max-width: 760px) { .fgrid { grid-template-columns: 1fr 1fr; } }
.fgrid h4 {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.fgrid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.fgrid a { text-decoration: none; font-size: 14px; color: var(--fg-soft); }
.fgrid a:hover { text-decoration: underline; }
.fbottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 44px;
  padding-top: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.fbottom p { font-size: 12.5px; color: var(--fg-soft); margin: 0; }

/* ---------- Cart drawer (shared) ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(24,21,16,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 60;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 92vw);
  background: var(--surface);
  color: var(--fg);
  border-left: 2px solid var(--fg);
  z-index: 61;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.drawer.open { transform: translateX(0); }
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 2px solid var(--fg);
}
.drawer__head h3 { font-size: 22px; }
.drawer__close {
  background: none;
  border: none;
  color: var(--fg);
  font-size: 22px;
  line-height: 1;
  padding: 4px;
}
.drawer__items {
  flex: 1;
  overflow-y: auto;
  padding: 14px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.drawer__empty { color: var(--fg-soft); font-size: 14px; padding: 30px 0; text-align: center; }

.ditem { display: flex; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.ditem__swatch {
  width: 60px;
  height: 60px;
  border: 2px solid var(--fg);
  flex: none;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg-2);
}
.ditem__swatch img,
.ditem__swatch svg { width: 100%; height: 100%; display: block; }
.ditem__swatch img { object-fit: cover; }
.ditem__info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ditem__top { display: flex; justify-content: space-between; gap: 8px; }
.ditem__name { font-weight: 700; font-size: 14px; }
.ditem__name small { display: block; margin-top: 4px; color: var(--fg-soft); font-size: 11px; font-weight: 500; line-height: 1.4; }
.ditem__options { font-size: 11.5px; color: var(--fg-soft); margin-top: 2px; line-height: 1.3; }
.ditem__price { font-weight: 700; font-size: 14px; white-space: nowrap; }
.ditem__ctrl { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.qtybtn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--fg);
  background: none;
  color: var(--fg);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qtybtn:hover { border-color: var(--accent); }
.remove {
  background: none;
  border: none;
  color: var(--fg-soft);
  font-size: 12px;
  text-decoration: underline;
  margin-left: auto;
  padding: 0;
}
.remove:hover { text-decoration-thickness: 2px; }

.drawer__foot { border-top: 2px solid var(--fg); padding: 18px 22px; }
.subtotal {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 14px;
}
.checkout {
  width: 100%;
  background: var(--fg);
  color: var(--bg);
  border: 2px solid var(--fg);
  padding: 14px;
  font-weight: 700;
  font-size: 14.5px;
}
.checkout:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.checkout:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Toast (shared) ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 120%);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  font-size: 13.5px;
  font-weight: 600;
  z-index: 70;
  transition: transform 0.25s ease;
  border: 2px solid var(--paper);
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- Mobile menu (shared) ---------- */
.mobilemenu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24,21,16,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 60;
}
.mobilemenu-overlay.is-open { opacity: 1; pointer-events: auto; }
.mobilemenu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(320px, 86vw);
  background: var(--surface);
  color: var(--fg);
  border-left: 1px solid var(--line);
  z-index: 61;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mobilemenu.is-open { transform: translateX(0); }
.mobilemenu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.mobilemenu__title {
  font-family: var(--font-display);
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 700;
}
.mobilemenu__close {
  background: none;
  border: none;
  color: var(--fg);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.mobilemenu__nav {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  overflow-y: auto;
}
.mobilemenu__nav a {
  text-decoration: none;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.mobilemenu__nav a:hover { text-decoration: underline; }
.mobilemenu__nav a:last-child { border-bottom: none; }