:root {
  --bg-0: #f4f7f9;
  --bg-1: #eef3f6;
  --bg-2: #e4ebf0;
  --surface: #ffffff;
  --surface-strong: #f0f5f8;
  --border: rgba(21, 32, 40, 0.12);
  --text: #152028;
  --muted: #5b6f7c;
  --accent: #0f766e;
  --accent-strong: #0d9488;
  --accent-soft: rgba(15, 118, 110, 0.1);
  --danger: #e11d48;
  --warning: #b45309;
  --ok: #047857;
  --font-display: "Outfit", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(21, 32, 40, 0.08);
  --header-h: 72px;
  --container: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-0);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button,
a,
label {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 8% -10%, rgba(13, 148, 136, 0.14), transparent 55%),
    radial-gradient(ellipse 55% 40% at 92% 8%, rgba(56, 189, 248, 0.12), transparent 50%),
    linear-gradient(180deg, #f7fafb 0%, #eef3f6 48%, #f4f7f9 100%);
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(21, 32, 40, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 32, 40, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 70%);
  pointer-events: none;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1rem, 3.5vw, 1.35rem);
  letter-spacing: -0.03em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  flex-shrink: 0;
}

.nav a,
.nav-cart {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-cart {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.nav a:hover,
.nav a.is-active,
.nav-cart:hover,
.nav-cart.is-active,
.nav-cart[aria-expanded="true"] {
  color: var(--text);
  background: var(--surface-strong);
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.cart-count[hidden] {
  display: none;
}

main {
  min-height: calc(100vh - var(--header-h) - 140px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

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

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

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

.btn-whatsapp {
  background: #25d366;
  color: #053218;
}

.btn-whatsapp:hover {
  background: #1ebe57;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 2.2rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.9rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.02);
  animation: heroDrift 18s ease-in-out infinite alternate;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(244, 247, 249, 0.96) 0%, rgba(244, 247, 249, 0.72) 40%, rgba(244, 247, 249, 0.2) 100%),
    linear-gradient(180deg, rgba(244, 247, 249, 0.15) 0%, rgba(244, 247, 249, 0.88) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: clamp(3rem, 10vh, 6rem) 0;
  max-width: 36rem;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin: 0 0 1rem;
  color: var(--text);
}

.hero-line {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 28rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes heroDrift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.06) translate3d(-1.5%, -1%, 0); }
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
  margin: 0;
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.link-more {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

/* Product grid / cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.45s ease forwards;
}

.product-card[data-animate] {
  animation-delay: calc(var(--i, 0) * 40ms);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card-media {
  position: relative;
  aspect-ratio: 1;
  background: #fff;
  overflow: hidden;
}

.product-card-media img {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  width: calc(100% - 1.7rem);
  height: calc(100% - 1.7rem);
  max-width: none;
  object-fit: contain;
  object-position: center;
  transition: transform 0.45s ease;
}

.product-card:hover .product-card-media img {
  transform: scale(1.02);
}

.product-card-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.product-brand {
  margin: 0;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.product-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.product-part {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.product-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.product-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.product-price {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
}

.stock-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
}

.stock-in_stock { color: var(--ok); }
.stock-low_stock { color: var(--warning); }
.stock-preorder { color: #0369a1; }
.stock-out_of_stock { color: var(--danger); }

.product-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.85rem;
}

.product-card-actions .btn {
  min-height: 2.4rem;
  padding-inline: 0.75rem;
}

/* Shop layout */
.shop-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.5rem;
  padding: 2rem 0 4rem;
  align-items: start;
}

.filters {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  max-height: calc(100vh - var(--header-h) - 2rem);
  overflow: auto;
  box-shadow: var(--shadow);
}

.filters-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.filters h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.filter-group {
  margin-bottom: 1.1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

.filter-group:last-of-type {
  border-bottom: 0;
  margin-bottom: 0.75rem;
  padding-bottom: 0;
}

.filter-group legend,
.filter-label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.filter-options {
  display: grid;
  gap: 0.35rem;
}

.filter-options.label-list label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-size: 0.92rem;
  cursor: pointer;
}

.filter-options.label-list label.is-zero {
  opacity: 0.45;
}

.filter-options input {
  accent-color: var(--accent);
}

.chip-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip-option {
  position: relative;
}

.chip-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-option span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 2.1rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip-option input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.chip-option.is-zero span {
  opacity: 0.4;
}

.chip-option .count,
.facet-count {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.78rem;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.preset-btn {
  min-height: 2.1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.preset-btn:hover,
.preset-btn.is-active {
  border-style: solid;
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.price-slider {
  position: relative;
  height: 28px;
  margin: 0.75rem 0 0.35rem;
}

.price-slider input[type="range"] {
  position: absolute;
  left: 0;
  width: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  appearance: none;
  background: transparent;
  pointer-events: none;
}

.price-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: var(--bg-2);
  border-radius: 999px;
}

.price-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(21, 32, 40, 0.25);
  margin-top: -7px;
  pointer-events: auto;
  cursor: pointer;
}

.price-slider input[type="range"]::-moz-range-track {
  height: 4px;
  background: var(--bg-2);
  border-radius: 999px;
}

.price-slider input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  pointer-events: auto;
  cursor: pointer;
}

.price-bounds {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.8rem;
}

.field {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.field:focus {
  outline: 2px solid rgba(15, 118, 110, 0.35);
  outline-offset: 1px;
}

.filter-actions {
  display: grid;
  gap: 0.5rem;
}

.collapse-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.55rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.collapse-toggle::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.collapse-toggle[aria-expanded="true"]::after {
  transform: rotate(225deg);
}

.collapse-body[hidden] {
  display: none;
}

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.shop-toolbar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.results-meta {
  color: var(--muted);
  margin: 0.2rem 0 0;
}

.toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 1.1rem;
  min-height: 0;
}

.active-filters[hidden] {
  display: none;
}

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.25rem 0.35rem 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(15, 118, 110, 0.25);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

.active-chip button {
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.15);
  color: var(--accent);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.active-filters .clear-all {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.product-grid .empty-state {
  grid-column: 1 / -1;
}

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

.filters-toggle {
  display: none;
}

/* Product detail */
.product-page {
  padding: 2rem 0 4rem;
}

.product-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

.product-gallery {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  aspect-ratio: 1;
  box-shadow: var(--shadow);
}

.product-gallery img {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  width: calc(100% - 2.5rem);
  height: calc(100% - 2.5rem);
  max-width: none;
  object-fit: contain;
  object-position: center;
}

.product-info .eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}

.product-info h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.product-info .lead {
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.product-price-lg {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.sticky-wa {
  position: sticky;
  bottom: 1rem;
  z-index: 20;
  display: none;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.specs-table th,
.specs-table td {
  text-align: left;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.specs-table th {
  width: 38%;
  color: var(--muted);
  font-weight: 500;
}

/* Cart drawer */
.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(21, 32, 40, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cart-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cart-backdrop[hidden] {
  display: block;
  opacity: 0;
  pointer-events: none;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: min(100vw, 420px);
  height: 100dvh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -18px 0 40px rgba(21, 32, 40, 0.12);
  transform: translateX(100%);
  transition: transform 0.28s ease;
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-drawer[hidden] {
  display: flex;
}

.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-drawer-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.cart-drawer-body {
  flex: 1;
  overflow: auto;
  padding: 1rem 1.1rem;
}

.cart-drawer-body .cart-empty {
  margin: 0;
  box-shadow: none;
}

.cart-drawer-foot {
  flex-shrink: 0;
  padding: 1rem 1.1rem calc(1.25rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.cart-drawer-foot .field {
  margin-bottom: 0.75rem;
}

.cart-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-cart-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.footer-cart-link:hover {
  color: var(--accent);
}

.cart-drawer .cart-item {
  grid-template-columns: 72px 1fr;
  gap: 0.75rem;
}

.cart-drawer .cart-item-side {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.cart-drawer .cart-list {
  gap: 0.75rem;
}

/* Cart */
.cart-page {
  padding: 2rem 0 4rem;
}

.cart-page h1 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1.5rem;
  align-items: start;
}

.cart-list {
  display: grid;
  gap: 0.85rem;
}

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

.cart-item img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  padding: 0.35rem;
  box-sizing: border-box;
}

.cart-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-family: var(--font-display);
}

.cart-item .muted {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.qty-controls button {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
}

.cart-summary {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  padding: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cart-summary h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.summary-row.total {
  font-size: 1.15rem;
  font-weight: 700;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.cart-summary .field {
  margin-bottom: 0.85rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 2rem;
  background: rgba(255, 255, 255, 0.55);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.footer-copy {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.footer-nap {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 22rem;
}

.footer-nap a {
  color: var(--muted);
  text-decoration: none;
}

.footer-nap a:hover {
  color: var(--accent);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 10rem;
}

.footer-col-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex-wrap: nowrap;
  align-items: flex-start;
}

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

.footer-links a:hover {
  color: var(--accent);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%) translateY(120%);
  background: #fff;
  color: var(--text);
  border: 1px solid rgba(15, 118, 110, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  z-index: 60;
  transition: transform 0.25s ease;
  box-shadow: var(--shadow);
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
}

.filters-backdrop {
  display: none;
}

@media (max-width: 960px) {
  .nav-cart,
  .footer-cart-link,
  .product-card-actions,
  .product-actions {
    display: none;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .shop-layout {
    padding-top: 1.25rem;
    padding-bottom: 5rem;
  }

  .filters-toggle {
    position: fixed;
    top: auto;
    left: auto;
    right: calc(1rem + env(safe-area-inset-right));
    bottom: calc(1rem + env(safe-area-inset-bottom));
    z-index: 40;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    min-height: 2.75rem;
    box-shadow: var(--shadow);
  }

  .filters {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    max-height: 82dvh;
    z-index: 50;
    border-radius: 18px 18px 0 0;
    transform: translateY(110%);
    transition: transform 0.28s ease;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
  }

  /* Drag-handle affordance on the bottom sheet */
  .filters::before {
    content: "";
    display: block;
    width: 2.5rem;
    height: 4px;
    border-radius: 999px;
    background: var(--border);
    margin: 0 auto 0.75rem;
    flex-shrink: 0;
  }

  .filters.is-open {
    transform: translateY(0);
  }

  .filters form {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    margin: 0 -1.1rem;
    padding: 0 1.1rem;
  }

  /* Keep Apply/Clear reachable while scrolling the sheet */
  .filter-actions {
    position: sticky;
    bottom: 0;
    grid-template-columns: 1fr 1fr;
    background: var(--surface);
    margin: 0 -1.1rem;
    padding: 0.85rem 1.1rem calc(0.85rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
  }

  .filters-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(21, 32, 40, 0.35);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .filters-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .sticky-wa {
    display: block;
    margin-top: 1rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }

  .sticky-wa .btn {
    width: 100%;
    box-shadow: var(--shadow);
  }

  .product-gallery {
    aspect-ratio: 4 / 3;
  }

  .section {
    padding: 2.5rem 0;
  }

  .qty-controls button {
    width: 2.5rem;
    height: 2.5rem;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 60px;
  }

  .header-inner {
    gap: 0.5rem;
  }

  .nav a,
  .nav-cart {
    padding: 0.45rem 0.65rem;
    font-size: 0.95rem;
  }

  /* Compact 2-up cards: browsing beats giant single cards */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .product-card-media img {
    top: 0.6rem;
    left: 0.6rem;
    width: calc(100% - 1.2rem);
    height: calc(100% - 1.2rem);
  }

  .product-card-body {
    padding: 0.75rem 0.8rem 0.9rem;
    gap: 0.3rem;
  }

  .product-name {
    font-size: 0.95rem;
  }

  .product-meta {
    font-size: 0.78rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .product-part {
    font-size: 0.72rem;
  }

  .product-price {
    font-size: 0.98rem;
  }

  .stock-pill {
    font-size: 0.68rem;
    padding: 0.15rem 0.45rem;
  }

  .product-card-actions {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding-top: 0.65rem;
  }

  .product-card-actions .btn {
    min-height: 2.6rem;
  }

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

  .cart-item-side {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .hero-content {
    max-width: none;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .toast {
    width: calc(100% - 2rem);
    max-width: 22rem;
    text-align: center;
    bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 400px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .product-card,
  .hero-media img {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .cart-drawer,
  .filters,
  .toast {
    transition: none;
  }
}

/* Contact */
.contact-page {
  padding: 2.5rem 0 4.5rem;
}

.contact-panel {
  max-width: 40rem;
  padding: 2rem 0;
}

.contact-panel .eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}

.contact-panel h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.contact-panel .lead {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 36rem;
}

.contact-details {
  margin: 0 0 2rem;
  display: grid;
  gap: 1.35rem;
}

.contact-details div {
  margin: 0;
}

.contact-details dt {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.contact-details dd {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.55;
}

.contact-details a {
  color: var(--text);
  text-decoration: none;
}

.contact-details a:hover {
  color: var(--accent);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

@media (max-width: 640px) {
  .contact-actions .btn {
    flex: 1 1 100%;
    text-align: center;
  }
}

/* Local SEO landing pages */
.seo-landing {
  padding: 2.5rem 0 4rem;
  max-width: 44rem;
}

.seo-landing .eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}

.seo-landing h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.seo-landing .lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.seo-landing h2 {
  margin: 2rem 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.seo-landing p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

.seo-landing a {
  color: var(--accent);
}

.seo-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0 0 0.5rem;
}

.seo-link-list {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.7;
}

.seo-landing .product-grid {
  margin-top: 1rem;
  max-width: none;
}

.seo-landing.container {
  max-width: var(--container);
}

.seo-landing.container > h1,
.seo-landing.container > .lead,
.seo-landing.container > h2,
.seo-landing.container > p,
.seo-landing.container > .seo-link-list,
.seo-landing.container > .eyebrow,
.seo-landing.container > .seo-cta-row {
  max-width: 44rem;
}

