/* ========================================================================
   FILO — RESTYLING 2026 / CUSTOMER APP
   Layer visuale non distruttivo: preserva ID e logica applicativa esistenti.
   ======================================================================== */
:root {
  --bordeaux: #7b1d25;
  --bordeaux-dark: #5f151c;
  --orange: #e66f24;
  --orange-text: #a94700;
  --orange-hover: #c95c17;
  --olive: #52672e;
  --ink: #201a17;
  --ink-soft: #4f4843;
  --muted: #746d68;
  --surface: #ffffff;
  --surface-soft: #fffaf6;
  --surface-warm: #f7efe8;
  --line: #eadfd7;
  --line-strong: #d9c9bf;
  --focus: #075cc8;
  --success: #17653a;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 10px 30px rgba(72, 45, 31, 0.07);
  --shadow-lift: 0 16px 38px rgba(72, 45, 31, 0.12);
  --content-max: 1240px;
  --header-height: 76px;
  --bg-color: var(--surface-soft);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  scroll-padding-bottom: 92px;
}
body {
  background: var(--surface-soft);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { touch-action: manipulation; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2000;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--bordeaux);
  border: 2px solid var(--focus);
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

:where(a, button, input, select, textarea, [tabindex]) {
  scroll-margin-top: calc(var(--header-height) + 16px);
  scroll-margin-bottom: 92px;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--focus) !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}

.eyebrow {
  color: var(--orange-text);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.page-title {
  color: var(--ink);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

/* ---- Auth ---- */
.center-screen { background: radial-gradient(circle at top, #ffffff 0, var(--surface-soft) 64%); }
.auth-card {
  border: 1px solid var(--line);
  border-top: 1px solid var(--line) !important;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.auth-card img { border-radius: 18px; }
.auth-card .form-control,
.auth-card .form-select {
  min-height: 48px;
  border-color: var(--line-strong);
  border-radius: 12px;
}

/* ---- Header ---- */
.top-nav {
  min-height: var(--header-height);
  padding: 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(123, 29, 37, 0.09);
  box-shadow: 0 4px 24px rgba(72, 45, 31, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.filo-nav-inner {
  width: min(100%, calc(var(--content-max) + 48px));
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}

.filo-brand {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--bordeaux);
  min-height: 48px;
  padding: 4px 6px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.filo-brand-mark {
  width: 40px;
  height: 40px;
  object-fit: cover;
  object-position: 50% 27%;
  border-radius: 12px;
}

.filo-brand-copy { display: flex; flex-direction: column; line-height: 1; }
.filo-brand-copy strong { font-size: 1.55rem; letter-spacing: -0.04em; }
.filo-brand-copy small { margin-top: 5px; color: var(--muted); font-size: 0.67rem; font-weight: 700; }

.filo-desktop-nav { justify-content: center; align-items: center; gap: 6px; }
.filo-nav-link {
  position: relative;
  border: 0;
  background: transparent;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--ink-soft);
  font-weight: 750;
}
.filo-nav-link:hover { background: var(--surface-warm); color: var(--bordeaux); }
.filo-nav-link.active { color: var(--bordeaux); background: #fff5f2; }
.filo-nav-link.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  background: var(--orange);
}

.filo-nav-actions { display: inline-flex; align-items: center; gap: 8px; }
.cart-pill-btn,
.filo-menu-button {
  border: 1px solid var(--line);
  background: #fff;
  min-width: 46px;
  min-height: 46px;
  border-radius: 14px;
  color: var(--bordeaux);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  box-shadow: none;
}
.cart-pill-btn:hover,
.filo-menu-button:hover { background: var(--surface-warm); border-color: var(--line-strong); transform: none; }
.cart-pill-btn .cart-icon { color: var(--bordeaux); font-size: 1.05rem; }
.cart-total { font-weight: 800; color: var(--ink); }
.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
}

.filo-account-drawer { width: min(360px, 92vw); border-left: 1px solid var(--line); }
.filo-account-drawer .offcanvas-header { padding: 24px; border-bottom: 1px solid var(--line); }
.filo-account-drawer .offcanvas-body { padding: 18px; }
.account-menu-link {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
}
.account-menu-link i { width: 22px; color: var(--bordeaux); text-align: center; }
.account-menu-link:hover,
.account-menu-link.active { background: var(--surface-warm); color: var(--bordeaux); }

/* ---- Main layout ---- */
.filo-shell {
  width: 100%;
  margin: 0;
  padding: 42px 24px 110px;
}
.filo-content { width: min(100%, var(--content-max)); margin: 0 auto; }
.content-panel {
  width: min(100%, 900px);
  padding: clamp(20px, 4vw, 38px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.checkout-page { max-width: 1180px; }
.profile-page { max-width: 720px; }
.shops-page { max-width: 1000px; }
.fidelity-page { max-width: 860px; }

/* ---- Home ---- */
.home-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin: 2px 0 20px;
}
.home-greeting {
  margin: 0;
  color: var(--bordeaux);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.02;
  font-weight: 850;
  letter-spacing: -0.05em;
}
.home-subtitle { margin: 8px 0 0; color: var(--ink); font-size: clamp(1rem, 2vw, 1.2rem); font-weight: 650; }

.home-search {
  width: min(100%, 760px);
  min-height: 56px;
  margin-bottom: 38px;
  padding: 6px 7px 6px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(72, 45, 31, 0.045);
}
.home-search > i { color: var(--muted); }
.home-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}
.home-search input::placeholder { color: #958d87; opacity: 1; }
.home-search button {
  min-height: 42px;
  padding: 8px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--bordeaux);
  color: #fff;
  font-weight: 800;
}
.home-search button:hover { background: var(--bordeaux-dark); }

.home-block { margin: 0 0 42px; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}
.section-heading.compact { margin-bottom: 12px; }
.section-heading h2,
.home-fidelity-summary h2,
.shops-callout h2 {
  margin: 0;
  color: var(--bordeaux);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  font-weight: 850;
  letter-spacing: -0.03em;
}
.section-link {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--bordeaux);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}
.section-link:hover { color: var(--orange-text); }

.home-loading {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
}

/* Editorial stories */
.filo-story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.filo-story-card {
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) minmax(0, 1.1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 8px 26px rgba(72, 45, 31, 0.05);
}
.filo-story-card.is-featured {
  grid-column: 1 / -1;
  grid-template-columns: minmax(320px, 1.35fr) minmax(280px, 0.85fr);
  min-height: 330px;
}
.story-media { min-height: 220px; background: var(--surface-warm); overflow: hidden; }
.story-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-media-placeholder { display: grid; place-items: center; background: linear-gradient(135deg, var(--story-color), #b48a70); color: #fff; font-size: 3rem; }
.story-copy { padding: clamp(20px, 3vw, 36px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.story-kicker,
.promo-kicker {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--orange-text);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.story-copy h3 { margin: 0 0 10px; color: var(--bordeaux); font-size: clamp(1.35rem, 2.7vw, 2.25rem); line-height: 1.05; font-weight: 850; letter-spacing: -0.045em; }
.filo-story-card:not(.is-featured) .story-copy h3 { font-size: 1.25rem; }
.story-copy p { margin: 0 0 18px; color: var(--muted); max-width: 58ch; }
.story-action,
.promo-card-action {
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--bordeaux);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-weight: 850;
  text-decoration: none;
}
.story-action:hover,
.promo-card-action:hover { color: var(--orange-text); }
.story-empty {
  grid-column: 1 / -1;
  min-height: 120px;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
}
.story-empty > div { width: 42px; height: 42px; border-radius: 12px; background: var(--surface-warm); color: var(--bordeaux); display: grid; place-items: center; flex: 0 0 auto; }
.story-empty p { flex: 1; }

/* Promotions */
.home-promos[hidden] { display: none !important; }
.promo-slider-home { display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.promo-card-home {
  min-width: min(420px, 86vw);
  max-width: 460px;
  min-height: 180px;
  display: grid;
  grid-template-columns: 150px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  scroll-snap-align: start;
  box-shadow: none;
}
.promo-card-home:hover { transform: none; box-shadow: var(--shadow-soft) !important; }
.promo-card-home > img,
.promo-card-placeholder { width: 100%; height: 100%; min-height: 180px; object-fit: cover; }
.promo-card-placeholder { display: grid; place-items: center; background: var(--surface-warm); color: var(--orange-text); font-size: 2rem; }
.promo-card-copy { padding: 18px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.promo-card-copy h3 { margin: 0 0 6px; color: var(--ink); font-size: 1.05rem; font-weight: 850; }
.promo-card-copy p { margin: 0 0 8px; color: var(--muted); font-size: 0.9rem; }
.promo-notice { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.promo-notice strong { display: block; color: var(--ink); }
.promo-notice p { margin: 3px 0 0; color: var(--muted); font-size: 0.9rem; }

/* Categories */
.category-slider { gap: 12px; padding: 2px 2px 8px; }
.cat-slide-item {
  appearance: none;
  border: 0;
  background: transparent;
  min-width: 104px;
  min-height: 118px;
  padding: 4px;
  cursor: pointer;
}
.cat-slide-icon {
  width: 78px;
  height: 78px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--bordeaux);
  box-shadow: none;
  font-size: 1.5rem;
}
.cat-slide-item:hover .cat-slide-icon { transform: none; background: var(--surface-warm); border-color: var(--line-strong); box-shadow: none; color: var(--orange-text); }
.cat-slide-item > span:last-child { color: var(--ink-soft); font-size: 0.86rem; font-weight: 750; }

/* Product cards */
.product-card { margin-bottom: 0; }
.product-card .card {
  overflow: hidden;
  border: 1px solid var(--line) !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  background: #fff;
}
.product-card .card:hover { transform: none; border-color: var(--line-strong) !important; box-shadow: var(--shadow-soft) !important; }
.product-card .card-body { border-top-color: #f2ebe6 !important; }
.product-card .text-orange { color: var(--bordeaux) !important; }
.product-card .btn-outline-bordeaux {
  min-height: 40px;
  border-width: 1px;
  border-radius: 10px;
}
.product-card .btn-qta { min-width: 36px; min-height: 40px; }
.product-card input[type="number"] { min-height: 40px; }
.product-card button.rounded-circle { min-width: 40px !important; min-height: 40px !important; width: 40px !important; height: 40px !important; border-color: var(--line) !important; }

/* Home fidelity */
.home-fidelity-summary {
  min-height: 156px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid #ead7c7;
  border-radius: var(--radius-lg);
  background: linear-gradient(115deg, #fff8ef 0%, #f8eadc 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.home-fidelity-copy { flex: 1; max-width: 660px; }
.home-fidelity-points { color: var(--bordeaux); font-size: clamp(1.7rem, 4vw, 2.45rem); line-height: 1; }
.home-fidelity-progress { height: 8px; max-width: 460px; background: rgba(123,29,37,0.12); }
.home-fidelity-progress .progress-bar,
.fidelity-progress .progress-bar { background: linear-gradient(90deg, var(--bordeaux), var(--orange)); }
.home-fidelity-arrow {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid rgba(123,29,37,0.18);
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  color: var(--bordeaux);
}

/* Shops callout */
.shops-callout {
  min-height: 220px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.shops-callout-copy { max-width: 620px; }
.shops-callout-copy p:not(.eyebrow) { margin: 10px 0 18px; color: var(--muted); }
.shops-callout-art { min-width: 180px; text-align: center; color: #ead8cd; font-size: 7rem; line-height: 1; }

/* Catalog */
.catalog-heading { display: flex; align-items: end; justify-content: space-between; }
.catalog-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 6px;
  scrollbar-width: none;
}
.catalog-tabs::-webkit-scrollbar { display: none; }
.catalog-tabs .nav-item { display: block; flex: 0 0 auto; font-size: inherit; color: inherit; }
.catalog-tabs .nav-link {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  white-space: nowrap;
  box-shadow: none;
}
.catalog-tabs .nav-link:hover { background: var(--surface-warm); border-color: var(--line-strong); }
.catalog-tabs .nav-link.active { background: var(--bordeaux) !important; border-color: var(--bordeaux) !important; color: #fff !important; box-shadow: none; }

.sticky-filter-bar {
  top: calc(var(--header-height) + 8px);
  padding: 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,0.96) !important;
  box-shadow: 0 8px 26px rgba(72,45,31,0.06) !important;
  backdrop-filter: blur(12px);
}
.catalog-search-field { min-height: 46px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; }
.catalog-search-field i { color: var(--muted); }
.catalog-search-field .form-control { min-height: 42px; padding: 0; border: 0; box-shadow: none; background: transparent; }
.sticky-filter-bar .form-select { min-height: 46px; border-color: var(--line-strong); border-radius: 12px; background-color: #fff; }

/* Fidelity + impact */
.fidelity-card {
  padding: clamp(20px, 4vw, 30px) !important;
  border: 0 !important;
  background: linear-gradient(135deg, #6c1720 0%, #8f2430 56%, #a24f29 100%) !important;
  box-shadow: none !important;
}
.text-white-75 { color: rgba(255,255,255,0.78); }
.fidelity-points-label { color: rgba(255,255,255,0.78); font-size: 0.84rem; font-weight: 700; }
.fidelity-points-value { margin: 2px 0 8px; font-size: clamp(2.5rem, 8vw, 4.1rem); line-height: 1; font-weight: 850; letter-spacing: -0.05em; }
.fidelity-progress { height: 9px; background: rgba(255,255,255,0.2); }
.impact-card { padding: 22px; display: grid; grid-template-columns: auto 1fr; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.impact-card-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: #edf3e3; color: var(--olive); }
.impact-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 0.9rem; }

/* Shops */
.shops-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.shop-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.shop-card-topline { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.shop-card h2 { color: var(--bordeaux); font-weight: 800; }
.shop-card p { margin: 7px 0 0; color: var(--muted); display: flex; gap: 9px; align-items: flex-start; }
.shop-card p i { width: 16px; margin-top: 4px; color: var(--orange-text); text-align: center; }
.shop-status { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 800; }
.shop-status.is-open { background: #e6f4eb; color: var(--success); }
.shop-status.is-closed { background: #f2efed; color: #665e59; }
.shop-note { margin-top: 12px !important; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.88rem; }

/* Profile */
.profile-quick-link {
  width: 100%;
  min-height: 50px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 750;
}
.profile-quick-link span { display: flex; align-items: center; gap: 10px; }
.profile-quick-link span i { color: var(--bordeaux); }

/* Bottom navigation */
.bottom-nav {
  min-height: 72px;
  padding: 7px max(8px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.97);
  box-shadow: 0 -8px 28px rgba(72,45,31,0.08);
  backdrop-filter: blur(14px);
}
.bottom-nav .nav-item {
  appearance: none;
  min-width: 52px;
  min-height: 50px;
  padding: 5px 4px;
  border: 0;
  background: transparent;
  color: #746d68;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.69rem;
  font-weight: 650;
}
.bottom-nav .nav-item.active { color: var(--bordeaux); font-weight: 800; }
.bottom-nav .nav-item i { font-size: 1.18rem; }
.bottom-nav .nav-scanner-center {
  top: -15px;
  width: 58px;
  height: 58px;
  min-width: 58px;
  min-height: 58px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--bordeaux);
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(123,29,37,0.25);
}
.bottom-nav .nav-scanner-center span { font-size: 0.6rem; text-transform: none; letter-spacing: 0; }

/* Back to top */
.back-to-top {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--bordeaux);
  box-shadow: var(--shadow-soft);
}

/* A11y user preferences: new components included */
body.a11y-high-contrast .top-nav,
body.a11y-high-contrast .filo-story-card,
body.a11y-high-contrast .promo-card-home,
body.a11y-high-contrast .home-fidelity-summary,
body.a11y-high-contrast .shops-callout,
body.a11y-high-contrast .shop-card,
body.a11y-high-contrast .content-panel,
body.a11y-high-contrast .home-search,
body.a11y-high-contrast .sticky-filter-bar {
  background: #111 !important;
  color: #fff !important;
  border-color: #777 !important;
}
body.a11y-high-contrast :where(.home-greeting,.page-title,.section-heading h2,.story-copy h3,.shops-callout h2,.shop-card h2,.filo-brand-copy strong) { color: #fff !important; }
body.a11y-high-contrast :where(.text-muted,.story-copy p,.promo-card-copy p,.shops-callout-copy p,.shop-card p) { color: #ddd !important; }

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

@media (min-width: 768px) {
  .category-slider {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }
  .cat-slide-item {
    min-height: 132px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: none;
  }
  .cat-slide-item:hover { transform: none; background: var(--surface-warm); box-shadow: none !important; }
}

@media (max-width: 991.98px) {
  .filo-story-card,
  .filo-story-card.is-featured { grid-template-columns: 1fr; min-height: 0; }
  .filo-story-card.is-featured .story-media { min-height: 300px; }
  .filo-story-card:not(.is-featured) .story-media { min-height: 190px; }
}

@media (max-width: 767.98px) {
  :root { --header-height: 64px; }
  body { padding-bottom: 76px; }

  .top-nav { min-height: var(--header-height); }
  .filo-nav-inner {
    min-height: var(--header-height);
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 0 14px;
  }
  .filo-brand { padding-left: 0; }
  .filo-brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .filo-brand-copy strong { font-size: 1.35rem; }
  .filo-brand-copy small { font-size: 0.61rem; margin-top: 3px; }
  .cart-pill-btn { min-width: 44px; min-height: 44px; padding: 6px 9px; }

  .filo-shell { padding: 26px 14px 96px; }
  .home-intro { margin-bottom: 16px; }
  .home-greeting { font-size: 2rem; }
  .home-search { margin-bottom: 28px; min-height: 52px; border-radius: 15px; }
  .home-search button { min-height: 40px; padding: 7px 11px; font-size: 0.82rem; }

  .home-block { margin-bottom: 34px; }
  .section-heading { align-items: center; }
  .section-heading h2 { font-size: 1.35rem; }
  .section-link { padding: 6px; font-size: 0.8rem; }

  .filo-story-grid {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 2px 2px 10px;
    margin-inline: -2px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .filo-story-grid::-webkit-scrollbar { display: none; }
  .filo-story-card,
  .filo-story-card.is-featured {
    flex: 0 0 88%;
    display: grid;
    grid-template-columns: 1fr;
    scroll-snap-align: start;
    border-radius: 18px;
  }
  .filo-story-card .story-media,
  .filo-story-card.is-featured .story-media { min-height: 210px; height: 210px; }
  .story-copy { padding: 20px; }
  .story-copy h3,
  .filo-story-card:not(.is-featured) .story-copy h3 { font-size: 1.35rem; }

  .promo-card-home { min-width: 88%; grid-template-columns: 110px 1fr; min-height: 160px; }
  .promo-card-home > img,
  .promo-card-placeholder { min-height: 160px; }
  .promo-card-copy { padding: 14px; }

  .category-slider { gap: 8px; margin-right: -14px; padding-right: 14px; }
  .cat-slide-item { min-width: 82px; min-height: 102px; }
  .cat-slide-icon { width: 64px; height: 64px; font-size: 1.25rem; }
  .cat-slide-item > span:last-child { font-size: 0.76rem; }

  .home-product-grid,
  #app.row { --bs-gutter-x: 0.75rem; }
  .home-product-grid > .product-card,
  #app > .product-card {
    flex: 0 0 50%;
    max-width: 50%;
    padding-left: calc(var(--bs-gutter-x) * .5);
    padding-right: calc(var(--bs-gutter-x) * .5);
  }
  .product-card .card-body { padding: 12px !important; }
  .product-card .card-title { font-size: 0.86rem !important; }
  .product-card h4,
  .product-card h5 { font-size: 1.05rem !important; }
  .product-card .input-group { width: 92px !important; margin-right: 6px !important; }
  .product-card .btn-qta { min-width: 30px; padding-inline: 6px !important; }
  .product-card .btn-outline-bordeaux { font-size: 0.75rem; min-width: 42px; }
  .product-card .product-image-button { height: 145px !important; padding: 10px !important; }

  .home-fidelity-summary { min-height: 140px; padding: 20px; }
  .home-fidelity-points { font-size: 1.8rem; }
  .shops-callout { min-height: 0; padding: 22px; }
  .shops-callout-art { min-width: auto; font-size: 3.8rem; }

  .content-panel { padding: 20px 16px; border-radius: 18px; box-shadow: none; }
  .sticky-filter-bar { top: calc(var(--header-height) + 5px); padding: 9px !important; border-radius: 14px !important; }
  .shops-grid { grid-template-columns: 1fr; }
  .shop-card { padding: 17px; }

  .cart-sticky { bottom: 72px; }
  .back-to-top { bottom: 94px; right: 12px; }
}

@media (max-width: 359px) {
  .filo-brand-copy small { display: none; }
  .home-product-grid > .product-card,
  #app > .product-card { flex-basis: 100%; max-width: 100%; }
  .product-card .product-image-button { height: 180px !important; }
}

.product-image-button {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 16px 16px 0 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.product-image-button img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-title-button {
  width: 100%;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-title-button:hover { color: var(--bordeaux); }
.product-code { font-size: 0.72rem !important; }

.filo-brand-mark-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}
.filo-brand-mark-wrap .filo-brand-mark {
  position: absolute;
  width: 123px;
  height: 123px;
  max-width: none;
  left: -40px;
  top: -14px;
  border-radius: 0;
}
@media (max-width: 767.98px) {
  .filo-brand-mark-wrap { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; }
  .filo-brand-mark-wrap .filo-brand-mark { width: 105px; height: 105px; left: -34px; top: -12px; }
}

/* Contrasto AA per testo bianco su controlli arancio. L'arancio brillante resta decorativo. */
.btn-orange,
.bg-orange,
.cart-count { background-color: #b94700 !important; color: #fff !important; }
.btn-orange:hover { background-color: #963a00 !important; color: #fff !important; }

.cart-item {
  padding: 16px 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.cart-item:hover { background: transparent; }
.cart-item-main { min-width: 0; max-width: 72%; }
.cart-item-title { font-size: 0.92rem; line-height: 1.3; }
.cart-qty-control { width: 118px; }
.cart-qty-control .btn,
.cart-qty-control .form-control { min-height: 38px; }
.cart-item-total { flex: 0 0 auto; padding-left: 12px; }
