/* ==========================================================================
   Fiskr — single design system
   Sport fishing demo store for practicing UI automation.
   Outdoor palette: lure rust + forest green, on warm paper.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --paper: #f7f6f3;
  --surface: #ffffff;
  --surface-2: #f0eee9;
  --ink: #1f2430;
  --muted: #6b7280;
  --line: #e5e2da;
  --primary: #c05621;
  --primary-ink: #9c4118;
  --primary-wash: #faeade;
  --accent: #2f6b4a;
  --accent-wash: #e5f1e9;
  --danger: #d64545;
  --danger-wash: #fdeaea;
  --warn: #b97b0c;
  --warn-wash: #fdf3dd;
  --shadow: 0 1px 2px rgba(31, 36, 48, 0.05), 0 8px 24px rgba(31, 36, 48, 0.07);
  --shadow-lg: 0 4px 12px rgba(31, 36, 48, 0.1), 0 20px 48px rgba(31, 36, 48, 0.16);
  --radius: 14px;
  --radius-sm: 8px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #14161c;
  --surface: #1d2129;
  --surface-2: #252a34;
  --ink: #edeae4;
  --muted: #9aa1ad;
  --line: #333947;
  --primary: #e88a52;
  --primary-ink: #f0a678;
  --primary-wash: #362315;
  --accent: #6dbb8e;
  --accent-wash: #1c3527;
  --danger: #ef6a6a;
  --danger-wash: #3a2022;
  --warn: #e0a53c;
  --warn-wash: #362b14;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.45), 0 20px 48px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 1rem; }

a {
  color: var(--primary-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--primary); }

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface-2);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.15s ease;
}

.skip-link:focus { top: 0; color: #fff; }

/* --------------------------------------------------------------------------
   3. Layout and header
   -------------------------------------------------------------------------- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

main.container {
  padding-top: 2rem;
  padding-bottom: 4rem;
  min-height: 60vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
}

.site-nav { margin-left: auto; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 0.45rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.site-nav a[aria-current="page"] {
  color: var(--primary-ink);
  background: var(--primary-wash);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  position: relative;
}

.icon-btn:hover { background: var(--surface-2); }

.icon-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border-radius: 99px;
}

.cart-badge[data-count="0"] { display: none; }

.theme-icon--dark { display: none; }
[data-theme="dark"] .theme-icon--dark { display: block; }
[data-theme="dark"] .theme-icon--light { display: none; }

.nav-toggle { display: none; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 1.75rem 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

.site-footer p { margin: 0; }

/* Breadcrumbs and page headers */
.breadcrumbs {
  font-size: 0.83rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.breadcrumbs a { color: var(--muted); }

.page-head { margin-bottom: 1.75rem; }

.page-head p {
  color: var(--muted);
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   4. Buttons, badges and toasts
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn:active { transform: scale(0.98); }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn--primary:hover:not(:disabled) {
  background: var(--primary-ink);
  border-color: var(--primary-ink);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--primary-ink);
}

.btn--ghost:hover:not(:disabled) {
  background: var(--primary-wash);
  color: var(--primary-ink);
}

.btn--danger {
  background: transparent;
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  color: var(--danger);
}

.btn--danger:hover:not(:disabled) {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn--sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
}

.btn--block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 99px;
  padding: 0.18rem 0.7rem;
}

.badge--stock { background: var(--accent-wash); color: var(--accent); }
.badge--out { background: var(--danger-wash); color: var(--danger); }
.badge--offer { background: var(--warn-wash); color: var(--warn); }
.badge--info { background: var(--primary-wash); color: var(--primary-ink); }

/* Toasts */
.toast-region {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: min(360px, calc(100vw - 2rem));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem 0.9rem;
  font-size: 0.87rem;
  animation: toast-in 0.2s ease;
}

.toast[data-variant="error"] { border-left-color: var(--danger); }

.toast__icon { font-weight: 700; flex-shrink: 0; color: var(--accent); }
.toast[data-variant="error"] .toast__icon { color: var(--danger); }

.toast__message { flex: 1; }

.toast__close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem;
}

.toast__close:hover { color: var(--ink); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   5. Forms
   -------------------------------------------------------------------------- */
.field { margin-bottom: 1.1rem; }

.field > label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="tel"],
.field input[type="search"],
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  transition: border-color 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--danger);
}

.field__error {
  display: none;
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 0.3rem;
}

.field__error:not(:empty) { display: block; }

.field__hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.4rem 0;
  font-size: 0.88rem;
}

.check-row input[type="checkbox"],
.check-row input[type="radio"] {
  width: 16px;
  height: 16px;
  margin-top: 0.2rem;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.check-row label { cursor: pointer; }

/* --------------------------------------------------------------------------
   6. Hero and home page sections
   -------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
  padding: 3rem 0 2.5rem;
}

.hero__kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-ink);
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 52ch;
}

.hero__art {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.hero__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 1.25rem;
}

.section-head h2 { margin: 0; }

/* --------------------------------------------------------------------------
   7. Products
   -------------------------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
}

.product-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-2);
}

.product-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.product-card:hover .product-card__media img {
  transform: scale(1.04);
}

.product-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem;
  flex: 1;
}

.product-card__title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

.product-card__title a {
  color: inherit;
  text-decoration: none;
}

.product-card__title a:hover { color: var(--primary-ink); }

.product-card__category {
  font-size: 0.76rem;
  color: var(--muted);
}

.product-card__rating {
  font-size: 0.8rem;
  color: var(--warn);
}

.product-card__price {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: auto;
}

.product-card__footer {
  padding: 0 1rem 1rem;
}

/* Large media in product detail */
.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.product-hero__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.product-hero__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.price-tag {
  font-size: 1.7rem;
  font-weight: 700;
  font-family: var(--font-display);
}

/* Quantity selector */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 99px;
  overflow: hidden;
}

.qty-stepper button {
  width: 34px;
  height: 34px;
  border: none;
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
}

.qty-stepper button:hover:not(:disabled) { background: var(--surface-2); }
.qty-stepper button:disabled { opacity: 0.4; cursor: not-allowed; }

.qty-stepper output {
  min-width: 34px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Catalog toolbar */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.catalog-toolbar .field { margin: 0; }
.catalog-toolbar .field--search { flex: 1 1 240px; }

.results-info {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.empty-state h3 { color: var(--ink); }

/* --------------------------------------------------------------------------
   8. Tabs and reviews (product detail)
   -------------------------------------------------------------------------- */
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
}

.tabs__list [role="tab"] {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.55rem 1rem;
  margin-bottom: -1px;
  cursor: pointer;
}

.tabs__list [role="tab"]:hover { color: var(--ink); }

.tabs__list [role="tab"][aria-selected="true"] {
  color: var(--primary-ink);
  border-bottom-color: var(--primary);
}

.review {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 1rem 1.25rem;
  margin-bottom: 0.9rem;
}

.review__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.review__author { font-weight: 600; }
.review__stars { color: var(--warn); }
.review p { margin: 0; font-size: 0.9rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   9. Cart and summary
   -------------------------------------------------------------------------- */
.cart-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.9rem;
}

.cart-item__thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}

.cart-item__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item__name {
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 0.15rem;
}

.cart-item__price {
  font-size: 0.83rem;
  color: var(--muted);
}

.cart-item__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.cart-item__subtotal { font-weight: 700; }

.summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  position: sticky;
  top: 84px;
}

.summary-card h2 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  padding: 0.35rem 0;
}

/* display:flex would override the hidden attribute (UA rule); restored here. */
.summary-row[hidden] { display: none; }

.summary-row--discount { color: var(--accent); }

.summary-row--total {
  border-top: 1px solid var(--line);
  margin-top: 0.6rem;
  padding-top: 0.9rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.coupon-form {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.coupon-form input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.88rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  background: var(--surface);
  color: var(--ink);
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   10. Checkout
   -------------------------------------------------------------------------- */
.steps {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.steps li {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  position: relative;
  padding-top: 38px;
}

.steps li::before {
  content: attr(data-step);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 15px;
  left: calc(50% + 22px);
  width: calc(100% - 44px);
  height: 2px;
  background: var(--line);
}

.steps li[data-state="current"] {
  color: var(--primary-ink);
  font-weight: 600;
}

.steps li[data-state="current"]::before {
  border-color: var(--primary);
  background: var(--primary-wash);
  color: var(--primary-ink);
}

.steps li[data-state="done"]::before {
  content: "✓";
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.steps li[data-state="done"]:not(:last-child)::after { background: var(--accent); }

.checkout-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}

.checkout-panel[hidden] { display: none; }

.order-confirm {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.order-confirm__icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.order-number {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 0.4rem 1rem;
  display: inline-block;
  margin: 0.5rem 0 1rem;
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid color-mix(in srgb, currentColor 30%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   11. Account and orders
   -------------------------------------------------------------------------- */
.auth-card {
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}

.demo-note {
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  margin-bottom: 1.25rem;
}

.order-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.order-card__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.6rem;
}

.order-card__number {
  font-family: var(--font-mono);
  font-weight: 700;
}

.order-card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   12. Utilities and responsive
   -------------------------------------------------------------------------- */
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }

/* ---- Clickable product images --------------------------------------- */
.product-card__media a,
.cart-item__thumb a {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---- Language and country selectors (header) ---------------------------------- */
.locale-select {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
}

.locale-select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

/* ---- Map iframe (home page) ------------------------------------------------ */
.map-frame {
  display: block;
  width: min(480px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

/* ---- Tooltip (hover and focus) ---------------------------------------------------- */
.tooltip-wrap {
  position: relative;
  display: inline-block;
  margin-left: 0.3rem;
}

.tooltip-trigger {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 210px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.72rem;
  line-height: 1.45;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
  z-index: 30;
  pointer-events: none;
}

.tooltip-wrap:hover .tooltip,
.tooltip-trigger:focus-visible + .tooltip {
  opacity: 1;
  visibility: visible;
}

/* ---- Reorderable list (drag & drop) ------------------------------------------ */
.dnd-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.dnd-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: grab;
  user-select: none;
}

.dnd-item::before {
  content: "⠿ ";
  color: var(--muted);
}

.dnd-item.is-dragging {
  opacity: 0.5;
  border-style: dashed;
  cursor: grabbing;
}

@media (max-width: 960px) {
  .nav-toggle {
    display: inline-grid;
    margin-left: auto;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    display: none;
  }

  .site-nav.is-open { display: block; }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1rem 1rem;
  }

  .site-nav a {
    padding: 0.7rem 0.75rem;
    font-size: 0.95rem;
  }

  .hero,
  .product-hero,
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .summary-card { position: static; }
}

@media (max-width: 640px) {
  body { font-size: 14.5px; }

  /* The header must fit without horizontal scroll on narrow screens. */
  .header-actions { gap: 0.3rem; }
  .locale-select {
    font-size: 0.72rem;
    padding: 0.3rem 0.35rem;
    max-width: 96px;
  }
  .icon-btn { width: 34px; height: 34px; }

  .field-row { grid-template-columns: 1fr; }

  .cart-item {
    grid-template-columns: 56px 1fr;
  }

  .cart-item__thumb { width: 56px; height: 56px; }

  .cart-item__aside {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .steps li { font-size: 0.7rem; }

  .site-footer__inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .spinner { animation: none; }
}
