/* ============================================================
   SA SHOP — Design Token CSS
   Single source of truth for all brand colors and utility
   classes. Include once via topbar.blade.php (loaded globally).

   To change the brand color: edit --sa-primary here, done.
   ============================================================ */

/* Prevent unstyled SVG expansion / FOUC */
svg.w-4 { width: 1rem; height: 1rem; }
svg.w-5 { width: 1.25rem; height: 1.25rem; }
svg.w-6 { width: 1.5rem; height: 1.5rem; }
svg.w-8 { width: 2rem; height: 2rem; }
svg.w-9 { width: 2.25rem; height: 2.25rem; }
svg.w-10 { width: 2.5rem; height: 2.5rem; }
svg.w-12 { width: 3rem; height: 3rem; }

/* ── Custom Properties (CSS Variables) ─────────────────────── */
:root {
  /* Brand reds */
  --sa-primary: #7a1a1a;
  /* main brand red */
  --sa-primary-dark: #5a1010;
  /* hover / pressed state */
  --sa-primary-deep: #6b1414;
  /* hero / banner backgrounds */

  /* Accent */
  --sa-red-light: #f87171;
  /* light-red text on dark backgrounds */
  --sa-red-pale: #fee2e2;
  /* pale red surface */
  --sa-red-tint: #fff5f5;
  /* very light red tint */

  /* Dark palette (navbars, footer) */
  --sa-navy: #0f172a;
  --sa-navy-md: #1e293b;

  /* Neutral grays */
  --sa-gray-text: #000000;
  /* body text / muted links */
  --sa-gray-light: #000000;
  /* placeholder / secondary text */
  --sa-gray-border: #e2e8f0;
  /* borders */
  --sa-gray-bg: #f1f5f9;
  /* page / section background */
  --sa-gray-subtle: #f8fafc;
  /* card / input background */

  /* Grid & Category Typography */
  --sa-font-grid: Lexend, "Comic Neue", Fredoka, Quicksand, system-ui, -apple-system, sans-serif;
}

/* ── Grid & Category Font Family ────────────────────────────── */
#grid-container,
#grid-inner,
#product-grid,
.sa-responsive-grid,
.sa-card-info,
.sa-card-action,
.prodotti-grid,
.categoria-grid,
.psb-card,
aside.sticky,
#sort-select,
.sa-view-btn,
.sa-product-card,
.sa-cat-grid,
.sa-filter-sidebar,
.sb-section,
.sb-title,
.sb-check,
.brand-badge {
  font-family: var(--sa-font-grid) !important;
}

/* ── Text colors ────────────────────────────────────────────── */
.sa-text-primary {
  color: var(--sa-primary) !important;
}

.sa-text-dark {
  color: var(--sa-navy) !important;
}

.sa-text-muted {
  color: var(--sa-gray-text) !important;
}

.sa-text-on-dark {
  color: var(--sa-on-dark) !important;
}

.sa-text-accent {
  color: var(--sa-red-light) !important;
}

/* ── Background colors ──────────────────────────────────────── */
.sa-bg-primary {
  background-color: var(--sa-primary) !important;
}

.sa-bg-primary-dk {
  background-color: var(--sa-primary-dark) !important;
}

.sa-bg-navy {
  background-color: var(--sa-navy) !important;
}

.sa-bg-pale {
  background-color: var(--sa-red-pale) !important;
}

.sa-bg-tint {
  background-color: var(--sa-red-tint) !important;
}

.sa-bg-subtle {
  background-color: var(--sa-gray-subtle) !important;
}

/* ── Border colors ──────────────────────────────────────────── */
.sa-border-primary {
  border-color: var(--sa-primary) !important;
}

.sa-border-light {
  border-color: var(--sa-gray-border) !important;
}

/* ── Links ──────────────────────────────────────────────────── */
/* Neutral link → turns brand red on hover */
.sa-link {
  color: var(--sa-gray-text);
  text-decoration: none;
  transition: color .15s;
}

.sa-link:hover {
  color: var(--sa-primary);
}

/* Already-red link → turns darker on hover */
.sa-link-primary {
  color: var(--sa-primary);
  text-decoration: none;
  transition: color .15s;
}

.sa-link-primary:hover {
  color: var(--sa-primary-dark);
}

/* Light link on dark bg → turns accent-red on hover */
.sa-footer-link {
  color: #dfdfdf;
  text-decoration: none;
  transition: color .15s;
}

.sa-footer-link:hover {
  color: var(--sa-red-light);
}

/* ── Buttons ────────────────────────────────────────────────── */
.sa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  transition: background-color .15s, color .15s;
}

/* Solid primary */
.sa-btn-primary {
  background-color: var(--sa-primary);
  color: #fff;
}

.sa-btn-primary:hover {
  background-color: var(--sa-primary-dark);
}

/* Outline primary */
.sa-btn-outline {
  background: transparent;
  color: var(--sa-primary);
  border: 1.5px solid var(--sa-primary);
}

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

/* ── Input focus ring ───────────────────────────────────────── */
.sa-input:focus {
  border-color: var(--sa-primary) !important;
  outline: none;
  background: #fff !important;
}

/* ── Avatar (circular user initials bubble) ─────────────────── */
.sa-avatar {
  background: var(--sa-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(122, 26, 26, .35);
}

/* ── Admin badge pill ───────────────────────────────────────── */
.sa-badge-admin {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--sa-red-tint);
  border: 1px solid #fecaca;
  color: var(--sa-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: background-color .15s;
}

.sa-badge-admin:hover {
  background: var(--sa-red-pale);
}

/* ── Count / tag pill ───────────────────────────────────────── */
.sa-pill {
  background: color-mix(in srgb, var(--sa-primary) 10%, white);
  color: var(--sa-primary);
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.1rem 0.65rem;
  font-size: 0.72rem;
}

/* ── Section accent bar (left border on headings) ───────────── */
.sa-accent-bar {
  width: 4px;
  border-radius: 2px;
  background: var(--sa-primary);
  flex-shrink: 0;
}

/* ── Underline accent (used on footer headings) ─────────────── */
.sa-underline-accent {
  display: inline-block;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--sa-primary);
}

/* ── Range / slider fill bar ────────────────────────────────── */
.sa-range-fill {
  background: var(--sa-primary);
}

input[type=range].sa-range {
  pointer-events: none;
}

input[type=range].sa-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sa-primary);
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 2px var(--sa-primary);
  cursor: pointer;
  pointer-events: all;
}

input[type=range].sa-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sa-primary);
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 2px var(--sa-primary);
  cursor: pointer;
  pointer-events: all;
}

/* ── Checkbox accent ────────────────────────────────────────── */
.sa-checkbox {
  accent-color: var(--sa-primary);
}

/* ── Active filter pill ─────────────────────────────────────── */
.sa-filter-pill {
  font-size: 0.72rem;
  background: var(--sa-red-pale);
  color: #5a1010;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ── Topbar search input ────────────────────────────────────── */
.sa-search-input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--sa-gray-border);
  background: var(--sa-gray-subtle);
  color: var(--sa-navy-md);
  font-size: 0.875rem;
  outline: none;
  transition: border-color .15s, background .15s;
}

.sa-search-input:focus {
  border-color: var(--sa-primary);
  background: #fff;
}

/* ── Cart / nav icon link ───────────────────────────────────── */
.sa-nav-icon-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #000000;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: color .15s;
}

.sa-nav-icon-link:hover {
  color: var(--sa-primary);
}

/* ── Dropdown menu item ─────────────────────────────────────── */
.sa-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  color: #374151;
  text-decoration: none;
  border-radius: 0.4rem;
  transition: background .1s;
}

.sa-dropdown-item:hover {
  background: var(--sa-gray-subtle);
}

.sa-dropdown-item-danger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  color: #ef4444;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  border-radius: 0.4rem;
  font-family: inherit;
  transition: background .1s;
}

.sa-dropdown-item-danger:hover {
  background: #fef2f2;
}

.sa-dropdown-item-primary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  color: var(--sa-primary);
  text-decoration: none;
  border-radius: 0.4rem;
  font-weight: 600;
  transition: background .1s;
}

.sa-dropdown-item-primary:hover {
  background: var(--sa-red-tint);
}

/* ============================================================
   SHARED COMPONENT CLASSES
   Used across prodotti/index, categoria/index, livewire views.
   Define once here — remove from individual <style> blocks.
   ============================================================ */

/* ── Keyframe animations ──────────────────────────────────── */
@keyframes sa-loadbar {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@keyframes sa-shimmer {
  0% {
    background-position: -800px 0;
  }

  100% {
    background-position: 800px 0;
  }
}

@keyframes sa-fadein {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

@keyframes sa-grid-fadein {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

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

@keyframes sa-skeleton-wave {
  0% {
    background-position: -400px 0;
  }

  100% {
    background-position: 400px 0;
  }
}

/* ── Top loading progress bar ────────────────────────────── */
.sa-progress-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  height: 3px;
  background: linear-gradient(90deg, var(--sa-primary) 0%, var(--sa-red-light) 50%, var(--sa-primary) 100%);
  background-size: 200% 100%;
  animation: sa-loadbar 1.2s linear infinite;
}

.sa-progress-bar.active {
  display: block;
}

/* For wire:loading inline usage */
.sa-wire-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  height: 3px;
  background: linear-gradient(90deg, var(--sa-primary) 0%, var(--sa-red-light) 50%, var(--sa-primary) 100%);
  background-size: 200% 100%;
  animation: sa-loadbar 1.2s linear infinite;
}

/* ── Grid fade-in ─────────────────────────────────────────── */
.grid-loaded {
  animation: sa-grid-fadein 0.25s ease-out both;
}

/* ── Skeleton cards ───────────────────────────────────────── */
.skeleton-card {
  background: #fff;
  border: 1px solid var(--sa-gray-border);
  border-radius: 0.75rem;
  overflow: hidden;
  animation: sa-fadein 0.3s ease;
}

.skeleton-pulse {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 37%, #f0f0f0 63%);
  background-size: 800px 100%;
  animation: sa-shimmer 1.4s infinite linear;
  border-radius: 0.25rem;
}

.sk-card {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid var(--sa-gray-border);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.sk-bone {
  background: linear-gradient(90deg, var(--sa-gray-bg) 25%, var(--sa-gray-border) 50%, var(--sa-gray-bg) 75%);
  background-size: 800px 100%;
  animation: sa-skeleton-wave 1.4s ease-in-out infinite;
  border-radius: 0.4rem;
}

.sk-img {
  height: 10rem;
  border-radius: 0;
  margin-bottom: 0;
}

.sk-body {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.sk-tag {
  height: 0.6rem;
  width: 40%;
}

.sk-ttl {
  height: 0.85rem;
  width: 85%;
}

.sk-ttl2 {
  height: 0.85rem;
  width: 60%;
}

.sk-pr {
  height: 1.1rem;
  width: 35%;
  margin-top: 0.35rem;
}

.sk-btn {
  height: 2rem;
  width: 6rem;
  border-radius: 0.45rem;
  align-self: flex-end;
}

/* ── Sidebar filter sections (prodotti & categoria pages) ──── */
.sb-section {
  border-bottom: 1px solid var(--sa-gray-bg);
}

.sb-section:last-child {
  border-bottom: none;
}

.sb-section-head {
  width: 100%;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  user-select: none;
}

.sb-title,
.sb-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--sa-primary);
}

.sb-tgl,
.sb-toggle {
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  border: 1px solid var(--sa-gray-border);
  background: var(--sa-gray-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--sa-gray-text);
  font-weight: 700;
  line-height: 1;
  transition: all .15s;
  flex-shrink: 0;
  pointer-events: none;
}

.sb-toggle:hover {
  background: var(--sa-red-tint);
  border-color: #fecaca;
  color: var(--sa-primary);
}

.sb-body {
  padding: 0 1.25rem 1rem;
}

.sb-scroll {
  max-height: 12rem;
  overflow-y: auto;
}

.sb-scroll::-webkit-scrollbar {
  width: 4px;
}

.sb-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

/* ── Sidebar checkboxes ──────────────────────────────────── */
.sb-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0;
  cursor: pointer;
  font-size: 0.82rem;
  color: #0c0c0c;
}

.sb-check input,
.sb-check input[type=checkbox] {
  width: 0.9rem;
  height: 0.9rem;
  accent-color: var(--sa-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.sb-check-name {
  flex: 1;
}

.sb-check:hover .sb-check-name {
  color: var(--sa-primary);
}

.sb-check-count {
  font-size: 0.7rem;
  color: var(--sa-gray-text);
  background: var(--sa-gray-bg);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  flex-shrink: 0;
}

/* ── Brand badges ────────────────────────────────────────── */
.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.65rem;
  border: 1.5px solid var(--sa-gray-border);
  border-radius: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--sa-navy-md);
  background: #fff;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.brand-badge:hover,
.brand-badge.active {
  border-color: var(--sa-primary);
  background: var(--sa-red-tint);
  color: var(--sa-primary);
}

/* ── Dual range slider ───────────────────────────────────── */
.range-wrap {
  position: relative;
  height: 2.75rem;
  min-height: 44px;
  margin: 0.5rem 0 0.25rem;
  display: flex;
  align-items: center;
}

.range-wrap input[type=range] {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  transform: none;
  width: 100%;
  height: 100%;
  min-height: 44px;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  margin: 0;
  padding: 0;
}

.range-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sa-primary);
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 2px var(--sa-primary), 0 2px 4px rgba(0,0,0,0.15);
  cursor: pointer;
  pointer-events: all;
  margin-top: 0;
}

.range-wrap input[type=range]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sa-primary);
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 2px var(--sa-primary), 0 2px 4px rgba(0,0,0,0.15);
  cursor: pointer;
  pointer-events: all;
}

.range-track {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 2px;
  background: #dde3ed;
}

.range-fill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  border-radius: 2px;
  background: var(--sa-primary);
}
  background: var(--sa-primary);
}

/* ── Price filter columns ────────────────────────────────── */
.price-col {
  flex: 1;
}

.price-col label {
  font-size: 0.7rem;
  color: #000000;
  display: block;
  margin-bottom: 0.2rem;
  font-weight: 500;
}

.price-col input[type=number] {
  width: 100%;
  padding: 0.38rem 0.5rem;
  border: 1px solid var(--sa-gray-border);
  border-radius: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sa-navy-md);
  background: #fff;
  outline: none;
  transition: border-color .15s;
  -moz-appearance: textfield;
}

.price-col input[type=number]:focus {
  border-color: var(--sa-primary);
}

.price-col input[type=number]::-webkit-inner-spin-button,
.price-col input[type=number]::-webkit-outer-spin-button {
  display: none;
}

.price-sep {
  color: var(--sa-gray-light);
  font-size: 0.9rem;
  margin: 0 0.1rem;
  padding-top: 1.2rem;
}

/* ── Product card add-to-cart button ─────────────────────── */
.sa-add-btn {
  background: var(--sa-primary);
  color: #fff;
  border: none;
  padding: 0.4rem 0.75rem;
  border-radius: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s;
}

.sa-add-btn:hover {
  background: var(--sa-primary-dark);
}

/* ── Product card (grid/list) hover ─────────────────────── */
.sa-product-card {
  text-decoration: none;
  transition: box-shadow .2s, transform .2s;
}

.sa-product-card:hover {
  box-shadow: 0 8px 24px rgba(122, 26, 26, .12);
  transform: translateY(-2px);
}

.sa-product-list-row {
  text-decoration: none;
  transition: box-shadow .15s;
}

.sa-product-list-row:hover {
  box-shadow: 0 4px 16px rgba(122, 26, 26, .1);
}

/* ── View toggle buttons (griglia/lista) ─────────────────── */
.sa-view-btn {
  padding: 0.35rem 0.65rem;
  border: none;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}

.sa-view-btn.active {
  background: var(--sa-primary);
  color: #fff;
}

.sa-view-btn:not(.active) {
  background: #fff;
  color: var(--sa-gray-text);
}

/* ── Breadcrumb on dark hero backgrounds ─────────────────── */
.sa-breadcrumb-dark a {
  color: rgba(255, 255, 255, .75);
  text-decoration: none;
  font-size: 0.78rem;
  transition: color .15s;
}

.sa-breadcrumb-dark a:hover {
  color: #fff;
}

.sa-breadcrumb-dark span {
  color: rgba(255, 255, 255, .4);
}

.sa-breadcrumb-dark .current {
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
}

/* ── Auth / guest layout (gl-* classes) ─────────────────── */
.gl-left {
  width: 42%;
  background: linear-gradient(160deg, #1e3a8a 0%, var(--sa-primary-dark) 45%, var(--sa-primary) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.gl-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');

  }

  .gl-logo {
    display: flex; align-items: center; gap: 0.75rem; margin-bottom: 3rem; position: relative;
  }

  .gl-logo-badge {
    width: 3rem; height: 3rem; background: rgba(255, 255, 255, .2); border: 2px solid rgba(255, 255, 255, .4); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 1rem; backdrop-filter: blur(8px);
  }

  .gl-logo-text {
    color: #fff; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em;
  }

  .gl-logo-sub {
    color: rgba(255, 255, 255, .6); font-size: 0.75rem; letter-spacing: .08em; text-transform: uppercase;
  }

  .gl-tagline {
    color: #fff; font-size: 1.8rem; font-weight: 800; line-height: 1.25; margin-bottom: 1.25rem; position: relative; letter-spacing: -0.02em;
  }

  .gl-desc {
    color: rgba(255, 255, 255, .7); font-size: 0.9rem; line-height: 1.6; margin-bottom: 2.5rem; position: relative;
  }

  .gl-features {
    display: flex; flex-direction: column; gap: 0.75rem; position: relative;
  }

  .gl-feature {
    display: flex; align-items: center; gap: 0.75rem; color: rgba(255, 255, 255, .85); font-size: 0.85rem;
  }

  .gl-feature-dot {
    width: 0.5rem; height: 0.5rem; background: var(--sa-red-light); border-radius: 50%; flex-shrink: 0;
  }

  .gl-home-link {
    position: absolute; bottom: 2rem; left: 3rem; color: rgba(255, 255, 255, .5); font-size: 0.8rem; text-decoration: none; display: flex; align-items: center; gap: 0.4rem; transition: color .15s;
  }

  .gl-home-link:hover {
    color: #fff;
  }

  .gl-right {
    flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; overflow-y: auto;
  }

  .gl-form-wrap {
    width: 100%; max-width: 26rem;
  }

  .gl-form-title {
    font-size: 1.6rem; font-weight: 800; color: var(--sa-navy-md); margin-bottom: 0.4rem; letter-spacing: -0.02em;
  }

  .gl-form-sub {
    color: var(--sa-gray-text); font-size: 0.9rem; margin-bottom: 2rem;
  }

  .gl-label {
    display: block; font-size: 0.8rem; font-weight: 600; color: #374151; margin-bottom: 0.4rem;
  }

  .gl-input {
    width: 100%; padding: 0.6rem 0.875rem; border: 1.5px solid var(--sa-gray-border); border-radius: 0.5rem; font-size: 0.9rem; color: var(--sa-navy-md); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; font-family: inherit;
  }

  .gl-input:focus {
    border-color: var(--sa-primary); box-shadow: 0 0 0 3px rgba(122, 26, 26, .1);
  }

  .gl-input::placeholder {
    color: var(--sa-gray-light);
  }

  .gl-input-group {
    margin-bottom: 1rem;
  }

  .gl-input-row {
    display: flex; gap: 0.75rem; margin-bottom: 1rem;
  }

  .gl-input-row .gl-input-group {
    margin-bottom: 0; flex: 1;
  }

  .gl-error {
    color: #dc2626; font-size: 0.75rem; margin-top: 0.25rem;
  }

  .gl-btn {
    width: 100%; background: linear-gradient(135deg, var(--sa-primary), var(--sa-primary-dark)); color: #fff; font-size: 0.9rem; font-weight: 700; padding: 0.7rem 1.5rem; border: none; border-radius: 0.5rem; cursor: pointer; box-shadow: 0 4px 12px rgba(122, 26, 26, .3); transition: opacity .15s, transform .1s; font-family: inherit;
  }

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

  .gl-section-divider {
    border: none; border-top: 1px solid var(--sa-gray-border); margin: 1.5rem 0;
  }

  .gl-link {
    color: var(--sa-primary); font-weight: 600; text-decoration: none; font-size: 0.85rem;
  }

  .gl-link:hover {
    text-decoration: underline;
  }

  .gl-sub-text {
    color: var(--sa-gray-text); font-size: 0.85rem;
  }

  .gl-check-label {
    display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: #374151; cursor: pointer;
  }

  .gl-check {
    width: 1rem; height: 1rem; accent-color: var(--sa-primary);
  }

  .gl-status {
    background: #dcfce7; color: #166534; border-radius: 0.5rem; padding: 0.6rem 0.875rem; font-size: 0.85rem; margin-bottom: 1rem;
  }

  .gl-section-label {
    font-size: 0.75rem; font-weight: 700; color: var(--sa-gray-light); text-transform: uppercase; letter-spacing: .08em; margin: 1.25rem 0 0.75rem; border-top: 1px solid var(--sa-gray-border); padding-top: 1.25rem;
  }

  @media (max-width: 768px) {
    .gl-left {
      display: none;
    }

    .gl-right {
      padding: 1.5rem;
    }
  }

  /* ── Product description rich HTML container ─────────────── */
  /* Wraps {!! $articolo->descrizione !!} on the detail page.   */
  .sa-product-desc {
    font-size: 0.82rem;
    color: #374151;
    line-height: 1.75;
    margin-bottom: 1rem;
  }

  /* Section headings from the scraper */
  .sa-product-desc h4 {
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    color: var(--sa-navy) !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 1.25rem 0 0.5rem !important;
    padding: 0 0 0.3rem 0.65rem !important;
    border-left: 3px solid var(--sa-primary);
    border-bottom: 1px solid var(--sa-gray-border);
    line-height: 1.3;
  }

  .sa-product-desc h4:first-child {
    margin-top: 0 !important;
    font-size: inherit !important;
    font-weight: 900 !important;
  }

  /* Paragraph */
  .sa-product-desc p {
    margin: 0 0 0.5rem !important;
  }

  /* Bullet lists */
  .sa-product-desc ul {
    margin: 0.25rem 0 0.75rem 1.25rem !important;
    padding: 0;
    list-style: disc !important;
  }

  .sa-product-desc li {
    margin-bottom: 0.25rem !important;
    padding-left: 0.25rem;
  }

  /* Tables inside description */
  .sa-product-desc table {
    border-collapse: collapse;
    font-size: 0.79rem;
    width: 100%;
    margin-bottom: 1rem;
    border: 1px solid #d1d5db;
  }

  .sa-product-desc th {
    padding: 0.4rem 0.75rem;
    text-align: left;
    font-weight: 700;
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .sa-product-desc td {
    padding: 0.35rem 0.75rem;
    border: 1px solid #d1d5db;
    color: var(--sa-navy-md);
  }

  .sa-product-desc tr:nth-child(even) td {
    background: #f9fafb;
  }

  /* ── Premium Petzl-style Headers & Specification Tables ── */
  .sa-sec-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--sa-navy);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 1.5rem 0 0.75rem;
    padding: 0 0 0.3rem 0.65rem;
    border-left: 3px solid var(--sa-primary);
    border-bottom: 1px solid var(--sa-gray-border);
    line-height: 1.3;
  }

  .sa-spec-table {
    border-collapse: collapse !important;
    font-size: 0.8rem !important;
    width: 100% !important;
    margin-bottom: 1rem !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.4rem !important;
    overflow: hidden !important;
  }

  .sa-spec-table th {
    padding: 0.6rem 0.85rem !important;
    text-align: left !important;
    font-weight: 800 !important;
    color: #334155 !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    white-space: nowrap !important;
  }

  .sa-spec-table td {
    padding: 0.6rem 0.85rem !important;
    border: 1px solid #e2e8f0 !important;
    color: var(--sa-navy) !important;
    background: #fff !important;
  }

  /* Styling first column (properties) */
  .sa-spec-table td:first-child {
    font-weight: 600 !important;
    color: #475569 !important;
    background: #f8fafc !important;
    width: 35% !important;
  }


/* ════════════════════════════════════════════════════════════════
   SHARED SKELETON / LOADING STATES
   Used by: prodotti, categoria, marca-prodotti, storefront, etc.
   ════════════════════════════════════════════════════════════════ */

@keyframes shimmer {
  0%   { background-position: -800px 0; }
  100% { background-position:  800px 0; }
}

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

@keyframes loadbar {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-pulse {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 37%, #f0f0f0 63%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 0.25rem;
}

.skeleton-card {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

/* View-toggle buttons (grid / list) */
.sa-view-btn {
  padding: 0.42rem 0.65rem;
  background: #fff;
  border: none;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.sa-view-btn.active         { background: #7a1a1a; color: #fff; }
.sa-view-btn:hover:not(.active) { background: #f8fafc; }

/* Product-grid fade transition */
#product-grid               { transition: opacity .15s ease; }
#product-grid.loading       { opacity: .4; pointer-events: none; }

/* Responsive Product Card Grid: 2 cols on mobile, 3 on tablet, 4 on desktop */
.sa-responsive-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.75rem !important;
}
@media (min-width: 640px) {
  .sa-responsive-grid {
    gap: 0.85rem !important;
  }
}
@media (min-width: 768px) {
  .sa-responsive-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1rem !important;
  }
}
@media (min-width: 1024px) {
  .sa-responsive-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1.1rem !important;
  }
}


/* ============================================================
   ACCESSIBILITY & KEYBOARD NAVIGATION (TABULATION) IMPROVEMENTS
   ============================================================ */

/* 1. Global Focus Indicator for keyboard-navigating users */
*:focus-visible {
  outline: 3px solid #7a1a1a !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px rgba(122, 26, 26, 0.45) !important;
}

/* 2. Skip to main content link (utility for screen readers and keyboard users) */
.sa-skip-link {
  position: absolute;
  top: -100px;
  left: 1.5rem;
  background: #7a1a1a;
  color: #ffffff !important;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(122, 26, 26, 0.4);
  z-index: 99999;
  text-decoration: none !important;
  transition: top 0.2s ease, outline 0.15s;
}

.sa-skip-link:focus-visible {
  top: 1rem;
}