/* =====================================================================
   Reusable components. Each block is one component; the class names
   match the HTML built in assets/js/ui/*.js.
   ===================================================================== */


/* =====================================================================
   BUTTONS
   <a class="btn btn--primary">   main action (one per area)
   <a class="btn btn--secondary"> second action
   <a class="btn btn--ghost">     on dark backgrounds
   <a class="link-arrow">         text link with a chevron
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;                    /* comfortable tap size */
  padding: 0 var(--s-6);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease),
              border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

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

.btn--dark { background: var(--c-text); color: #fff; }
.btn--dark:hover { background: #000; }

.btn--secondary { background: transparent; color: var(--c-accent); border-color: var(--c-accent); }
.btn--secondary:hover { background: var(--c-accent); color: #fff; }

.btn--ghost { background: rgba(255, 255, 255, 0.08); color: var(--c-on-ink); border-color: rgba(255, 255, 255, 0.24); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.16); }

.btn--light { background: #fff; color: var(--c-text); }
.btn--light:hover { background: var(--c-bg-alt); }

.btn--sm { min-height: 36px; padding: 0 var(--s-4); font-size: var(--fs-sm); }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: var(--fw-regular);
  color: var(--c-accent);
}
.link-arrow::after {                    /* the › chevron */
  content: "";
  width: 7px; height: 7px;
  margin-left: 4px;
  border-right: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--dur-1) var(--ease);
}
.link-arrow:hover::after { transform: translateX(2px) rotate(45deg); }
.on-ink .link-arrow { color: #6fa8ff; }

.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-6); }

/* Round icon-only buttons (search, cart, menu). */
.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--c-text);
  transition: background-color var(--dur-1) var(--ease);
}
.icon-btn:hover { background: rgba(0, 0, 0, 0.05); text-decoration: none; }
.icon-btn svg { width: 20px; height: 20px; }


/* =====================================================================
   ANNOUNCEMENT BAR (from Settings → announcement; hidden when empty)
   ===================================================================== */
.announce {
  background: var(--c-bg-alt);
  color: var(--c-text-2);
  font-size: var(--fs-sm);
  text-align: center;
  padding: 10px var(--gutter);
}


/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);   /* frosted glass */
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2) var(--ease), background-color var(--dur-2) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--c-line-soft); }
.site-header.is-open { background: #fff; }               /* solid while a menu is open */

.header-bar {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--c-text);
  font-weight: var(--fw-bold);
  font-size: 1.0625rem;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand img, .brand svg { width: 26px; height: 26px; }
.brand-sub {                                 /* the "SOLUTIONS" part, hidden on small phones */
  font-weight: var(--fw-regular);
  color: var(--c-text-3);
  letter-spacing: 0.06em;
}
@media (max-width: 380px) { .brand-sub { display: none; } }

.main-nav { flex: 1; }
.main-nav > ul {
  display: flex;
  justify-content: center;
  gap: clamp(var(--s-3), 2vw, var(--s-7));
  margin: 0; padding: 0; list-style: none;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  height: var(--header-h);
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--c-text-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  white-space: nowrap;
  transition: color var(--dur-1) var(--ease);
}
.nav-link:hover, .nav-link[aria-expanded="true"], .nav-link[aria-current="page"] {
  color: var(--c-text);
  text-decoration: none;
}

.header-actions { display: flex; align-items: center; gap: var(--s-1); margin-left: auto; }

.cart-count {
  position: absolute;
  top: 3px; right: 1px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--c-text);
  color: #fff;
  font-size: 10.5px;
  font-weight: var(--fw-semibold);
  line-height: 17px;
  text-align: center;
}
.cart-count:empty, .cart-count[data-count="0"] { display: none; }

.menu-toggle { display: none; }

/* Below 900px: hide the desktop links, show the menu button. */
@media (max-width: 899px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-grid; }
}

/* ---------- Shop menu (desktop drop-down panel) ---------- */
.mega {
  position: absolute;
  left: 0; right: 0; top: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--c-line-soft);
  box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(-8px);
  visibility: hidden;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
}
.mega.is-open {
  opacity: 1; transform: none; visibility: visible;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.mega-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-8);
  padding-block: var(--s-8) var(--s-9);
}
.mega-title { font-size: var(--fs-xs); color: var(--c-text-3); margin-bottom: var(--s-3); }
.mega-list { list-style: none; margin: 0; padding: 0; }
.mega-list a {
  display: block;
  padding: 5px 0;
  color: var(--c-text);
  font-size: var(--fs-sm);
}
.mega-list--big a { font-size: 1.25rem; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-tight); padding: 4px 0; }

/* Dim the page behind an open menu. */
.page-scrim {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: calc(var(--z-header) - 1);
  background: rgba(232, 232, 237, 0.4);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
}
.page-scrim.is-open { opacity: 1; visibility: visible; transition: opacity var(--dur-2) var(--ease); }

/* ---------- Mobile menu (full-screen sheet) ---------- */
.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: var(--z-menu);
  overflow-y: auto;
  background: #fff;
  padding: var(--s-4) var(--gutter) var(--s-10);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
.mobile-menu .mega-list--big a { font-size: 1.75rem; padding: 6px 0; }
.mobile-menu .mega-title { margin-top: var(--s-7); }


/* =====================================================================
   SEARCH OVERLAY
   ===================================================================== */
.search-panel {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-overlay);
  background: #fff;
  box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.2);
  max-height: 100vh;
  overflow-y: auto;
  opacity: 0; visibility: hidden;
  transform: translateY(-12px);
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
}
.search-panel.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
.search-scrim { inset: 0; z-index: calc(var(--z-overlay) - 1); }

.search-inner { max-width: 760px; margin-inline: auto; padding: var(--s-6) var(--gutter) var(--s-9); }
.search-form { display: flex; align-items: center; gap: var(--s-3); border-bottom: 1px solid var(--c-line); }
.search-form svg { width: 22px; height: 22px; color: var(--c-text-3); flex-shrink: 0; }
.search-input {
  flex: 1;
  min-width: 0;
  height: 64px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-tight);
}
.search-input::placeholder { color: var(--c-text-3); font-weight: var(--fw-regular); }
.search-input::-webkit-search-cancel-button { display: none; }

.search-section { margin-top: var(--s-6); }
.search-results { list-style: none; margin: 0; padding: 0; }
.search-result {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-2) 0;
  color: var(--c-text);
}
.search-result:hover { text-decoration: none; }
.search-result:hover .search-result-name { color: var(--c-accent); }
.search-thumb {
  width: 48px; height: 48px;
  flex-shrink: 0;
  border-radius: var(--radius-s);
  background: var(--c-bg-alt);
  object-fit: contain;
}
.search-result-name { font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.search-result-meta { font-size: var(--fs-xs); color: var(--c-text-3); }


/* =====================================================================
   SECTION HEADINGS
   <div class="section-head"><h2 class="h2">..</h2><a class="link-arrow">..</a></div>
   ===================================================================== */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-3) var(--s-6);
  margin-bottom: var(--s-6);
}
.section-head p { max-width: 52ch; margin-top: var(--s-2); }


/* =====================================================================
   PRODUCT CARD
   ===================================================================== */
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--c-text);
  border-radius: var(--radius-l);
  background: #fff;
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.pcard:hover { text-decoration: none; }
@media (hover: hover) {
  .pcard:hover { transform: translateY(-3px); }
  .pcard:hover .pcard-media img { transform: scale(1.03); }
}
.pcard-media {
  position: relative;
  aspect-ratio: 1 / 1;              /* every image the same shape: no jumping */
  overflow: hidden;
  border-radius: var(--radius-l);
  background: var(--c-bg-alt);
}
.pcard-media img {
  width: 100%; height: 100%;
  object-fit: contain;              /* never crops the product */
  padding: 10%;
  transition: transform var(--dur-3) var(--ease-out);
}
.pcard-media .placeholder-art { width: 100%; height: 100%; color: #c7c7cc; padding: 28%; }

.pcard-body { padding: var(--s-4) var(--s-1) var(--s-2); display: flex; flex-direction: column; gap: 2px; flex: 1; }
.pcard-brand { font-size: var(--fs-xs); color: var(--c-text-3); }
.pcard-name {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  line-height: 1.3;
  letter-spacing: var(--tracking-tight);
  /* at most two lines, then "..." */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pcard-price { margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--c-text); }
.pcard-stock { font-size: var(--fs-xs); margin-top: 2px; }

.price-now  { font-weight: var(--fw-medium); }
.price-sale { color: var(--c-sale); font-weight: var(--fw-medium); }
.price-was  { color: var(--c-text-3); text-decoration: line-through; margin-left: 6px; }

.stock-out { color: var(--c-danger); }
.stock-low { color: var(--c-warning); }
.stock-in  { color: var(--c-success); }

/* Small label on a card: New, Sale, Bestseller... */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.01em;
  background: #fff;
  color: var(--c-text);
}
.pcard .badge { position: absolute; top: var(--s-3); left: var(--s-3); z-index: 1; }
.badge--sale { background: var(--c-sale); color: #fff; }
.badge--accent { color: var(--c-warning); }   /* orange "New" text, like a store label */
.badge--dark { background: var(--c-text); color: #fff; }

/* Out of stock: card stays readable but quieter. */
.pcard.is-soldout .pcard-media img { opacity: 0.55; }


/* =====================================================================
   PRODUCT SHELF (horizontal scrolling row)
   ===================================================================== */
.shelf { position: relative; }
.shelf-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(200px, 46vw, 272px);   /* about 2 cards on phones, 4 on desktop */
  gap: var(--s-5);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: var(--s-2) var(--gutter) var(--s-4);
  margin-inline: calc(var(--gutter) * -1);        /* let cards run to the screen edge */
  scrollbar-width: none;
}
.shelf-track::-webkit-scrollbar { display: none; }
.shelf-track > * { scroll-snap-align: start; }

.shelf-nav { display: flex; gap: var(--s-2); }
.shelf-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--c-bg-alt);
  color: var(--c-text);
  transition: background-color var(--dur-1) var(--ease), opacity var(--dur-1) var(--ease);
}
.shelf-btn:hover { background: #e8e8ed; }
.shelf-btn[disabled] { opacity: 0.35; cursor: default; }
.shelf-btn svg { width: 16px; height: 16px; }
@media (hover: none) { .shelf-nav { display: none; } }   /* phones swipe instead */

/* Regular grid of products (shop pages). */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: var(--s-7) var(--s-5);
}
@media (max-width: 520px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-3); }
}
.product-grid > .notice { grid-column: 1 / -1; }   /* messages span the whole grid */


/* =====================================================================
   LOADING SKELETONS (grey shapes while data loads, same size as the
   real content so nothing jumps)
   ===================================================================== */
.skeleton {
  background: linear-gradient(90deg, #efeff2 0%, #f7f7f9 40%, #efeff2 80%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-s);
}
.skeleton-card .pcard-media { background: none; }
.skeleton-card .pcard-media.skeleton { border-radius: var(--radius-l); }
.skeleton-line { height: 12px; margin-top: 8px; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-70 { width: 70%; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }


/* =====================================================================
   CHIPS (category / device pills)
   ===================================================================== */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 var(--s-4);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-pill);
  color: var(--c-text);
  font-size: var(--fs-sm);
  background: #fff;
  transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.chip:hover { border-color: var(--c-text); text-decoration: none; }
.chip.is-active { border-color: var(--c-text); background: var(--c-text); color: #fff; }
.on-ink .chip { background: transparent; color: var(--c-on-ink); border-color: rgba(255, 255, 255, 0.24); }
.on-ink .chip:hover { border-color: #fff; }


/* =====================================================================
   EMPTY / NOTICE BOX
   ===================================================================== */
.notice {
  padding: var(--s-8) var(--s-7);
  border-radius: var(--radius-l);
  background: var(--c-bg-alt);
  text-align: center;
}
.notice .h3 { margin-bottom: var(--s-2); }
.notice p { color: var(--c-text-2); max-width: 46ch; margin-inline: auto; }
.notice .btn-row { justify-content: center; margin-top: var(--s-5); }


/* =====================================================================
   FORM FIELDS (used by search now; checkout and repairs later)
   ===================================================================== */
.field { display: grid; gap: 6px; }
.field label { font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-s);
  background: #fff;
  font-size: 1rem;           /* 16px+: stops iPhones zooming in on focus */
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.input:focus, .select:focus, .textarea:focus {
  outline: 0;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-soft);
}
.textarea { min-height: 120px; resize: vertical; }
.req { color: var(--c-danger); }   /* the * on required fields */
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--c-danger); }
.field-hint  { font-size: var(--fs-xs); color: var(--c-text-3); }
.field-error { font-size: var(--fs-xs); color: var(--c-danger); }


/* Checkbox with label: <label class="check"><input type="checkbox"> Text</label> */
.check {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 32px;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px; height: 20px;
  margin: 0;
  flex-shrink: 0;
  border: 1.5px solid var(--c-line);
  border-radius: 6px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.check input::after {
  content: "";
  width: 5px; height: 10px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform var(--dur-1) var(--ease);
}
.check input:checked { background: var(--c-accent); border-color: var(--c-accent); }
.check input:checked::after { transform: rotate(45deg) scale(1); }
.check input:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* Choice pills for product options (colour, length...). Radio inputs underneath. */
.pills { display: flex; flex-wrap: wrap; gap: var(--s-2); border: 0; margin: 0; padding: 0; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s-5);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-m);
  font-size: var(--fs-sm);
  background: #fff;
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.pill input:hover + span { border-color: var(--c-text-3); }
.pill input:checked + span { border-color: var(--c-accent); box-shadow: 0 0 0 1px var(--c-accent); }
.pill input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.pill input:disabled + span { color: var(--c-text-3); text-decoration: line-through; background: var(--c-bg-alt); }

/* Quantity: [-] 1 [+] */
.qty {
  display: inline-flex;
  align-items: center;
  height: 44px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.qty button {
  width: 44px; height: 100%;
  border: 0; background: none;
  font-size: 1.25rem; line-height: 1;
  color: var(--c-text);
}
.qty button:hover { background: var(--c-bg-alt); }
.qty button:disabled { color: var(--c-line); cursor: default; background: none; }
.qty input {
  width: 40px; height: 100%;
  border: 0; outline: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: var(--fw-medium);
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Breadcrumb: Shop › Category › Product */
.breadcrumb { font-size: var(--fs-xs); color: var(--c-text-3); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--c-line); }
.breadcrumb a { color: var(--c-text-2); }

/* Spinner inside buttons while sending. */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Success / error message boxes inside forms. */
.alert { padding: var(--s-4) var(--s-5); border-radius: var(--radius-m); font-size: var(--fs-sm); }
.alert--success { background: #e9f6ee; color: #145c2e; }
.alert--error { background: #fdeceb; color: #8c1d14; }

/* Honeypot: a hidden field only spam robots fill in. */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }


/* =====================================================================
   TOAST (small message, e.g. "Added to cart")
   ===================================================================== */
.toast {
  position: fixed;
  left: 50%; bottom: var(--s-6);
  z-index: var(--z-toast);
  transform: translate(-50%, 20px);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--c-text);
  color: #fff;
  font-size: var(--fs-sm);
  box-shadow: var(--shadow-2);
  opacity: 0;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease-out);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }


/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
  margin-top: var(--section-gap);
  background: var(--c-bg-alt);
  color: var(--c-text-3);
  font-size: var(--fs-xs);
  line-height: 1.5;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-7);
  padding-block: var(--s-9) var(--s-7);
  border-bottom: 1px solid var(--c-line);
}
.footer-title { color: var(--c-text); font-size: var(--fs-xs); font-weight: var(--fw-semibold); margin-bottom: var(--s-3); }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li + li { margin-top: 8px; }
.footer-list a { color: var(--c-text-2); }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3) var(--s-6);
  padding-block: var(--s-5) var(--s-8);
}
.footer-legal p { max-width: 80ch; }

@media (max-width: 760px) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7) var(--s-5); }
}
