﻿:root {
  --canary: #ffe135;
  --canary-deep: #f5c400;
  --canary-soft: #fff6b0;
  --canary-tint: #fffce6;
  --ink: #121212;
  --muted: #6b6b6b;
  --line: #eee;
  --paper: #fff;
  --wash: #fafafa;
  --danger: #e30613;
  --radius: 16px;
  --shadow: 0 10px 28px rgba(18,18,18,.08);
  --font: "Montserrat", ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--wash); line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
img { max-width: 100%; display: block; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow: visible;
}
.topbar {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 10px 20px 4px;
}
.logo {
  font-weight: 800; letter-spacing: .08em; font-size: 1.35rem;
  line-height: 1; display: inline-flex; align-items: center;
}
.logo-o {
  display: inline-grid; place-items: center;
  width: 1.05em; height: 1.05em; margin: 0 .02em;
  border-radius: 50%; background: var(--canary); color: var(--ink);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.12);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .88rem;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: #fff;
}
.text-btn:hover { background: var(--canary); border-color: var(--canary-deep); }
.cart-text { background: var(--canary); border-color: var(--canary-deep); }
.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
}

.nav-row {
  display: none;
}
.main-nav {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2px;
  padding: 2px 20px 12px;
  border-top: 1px solid #f3f3f3;
  overflow: visible;
}
.nav-item { position: relative; flex: 0 0 auto; }
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 40px;
  padding: 0 11px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: .8rem;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.nav-item.is-open > .nav-link { background: var(--canary); }
.nav-link.is-current { background: var(--canary); }
.caret { font-size: .7rem; opacity: .75; transition: transform .15s ease; }
.nav-item.is-open > .nav-link .caret { transform: rotate(180deg); }

.search-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
}
.search-after-menu {
  flex: 0 0 240px;
  width: 240px;
  margin-left: 8px;
}
.search-inline input {
  border: 0; outline: 0; width: 100%; background: transparent; font-size: .9rem;
}
.search-inline input::placeholder { opacity: 0; }
.search-inline svg { color: #777; flex: 0 0 auto; }

.dropdown {
  display: none;
  position: fixed;
  z-index: 1000;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 16px 36px rgba(0,0,0,.14);
  overflow: hidden;
}
.nav-item.is-open > .dropdown { display: block; }

.mega { display: none; }
.nav-item.is-open > .mega { display: flex; }
.mega-simple {
  flex-direction: column;
  min-width: 240px;
  max-width: 300px;
  max-height: min(70vh, 480px);
}
.mega-simple .mega-side {
  border-right: 0;
  overflow-y: auto;
  max-height: min(70vh, 480px);
}
.mega-split {
  min-width: 480px;
  max-width: 560px;
  min-height: 260px;
  max-height: min(70vh, 480px);
}
.mega-side {
  flex: 0 0 210px;
  background: #fafafa;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--canary-deep) #eee;
}
.mega-side::-webkit-scrollbar { width: 8px; }
.mega-side::-webkit-scrollbar-thumb {
  background: var(--canary-deep);
  border-radius: 999px;
}
.mega-side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: .84rem;
  text-align: left;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.mega-side-link:hover,
.mega-side-link.is-current { background: var(--canary); }
.mega-side-link.is-all {
  color: #8a6d00;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
}
.mega-arrow { opacity: .5; font-size: 1.05rem; }
.mega-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 12px 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--canary-deep) #f3f3f3;
}
.mega-main::-webkit-scrollbar { width: 8px; }
.mega-main::-webkit-scrollbar-thumb {
  background: var(--canary-deep);
  border-radius: 999px;
}
.mega-panel { display: none; }
.mega-panel.is-visible { display: block; }
.mega-panel-title {
  display: inline-block;
  margin: 0 0 10px;
  font-weight: 800;
  font-size: .98rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--canary);
  padding-bottom: 4px;
}
.mega-links { display: grid; gap: 2px; }
.mega-link {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink);
  text-decoration: none;
}
.mega-link:hover { background: var(--canary-tint); }

.dropdown-item, .dropdown-link, .dropdown-sub, .dropdown-all { display: none; }
.catalog-page .catalog-crumb { margin: 0 0 6px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.catalog-page .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.catalog-page .empty-cat { grid-column: 1 / -1; }

@media (max-width: 900px) {
  .main-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .search-after-menu {
    flex: 0 0 200px;
    width: 200px;
  }
  .nav-link { padding: 0 10px; font-size: .76rem; }
  .text-btn { padding: 0 10px; font-size: .82rem; }
}

.hero { padding: 4px 20px 20px; }
.hero-slide { display: none; }
.hero-slide.is-active { display: block; animation: fadeUp .4s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hero-visual {
  position: relative; overflow: hidden; min-height: 420px; border-radius: 22px;
  padding: 36px 24px; display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff; background: linear-gradient(180deg, transparent 15%, rgba(0,0,0,.78)), linear-gradient(135deg, #1a1a1a, #2b2b2b);
  box-shadow: var(--shadow);
}
.burst {
  position: absolute; inset: -10% auto auto 50%; width: 260px; height: 260px;
  transform: translateX(-50%);
  background: radial-gradient(circle at center, var(--canary) 0 28%, transparent 29%),
    repeating-conic-gradient(from 0deg, var(--canary-deep) 0 8deg, transparent 8deg 20deg);
  opacity: .85; animation: spinBurst 18s linear infinite; pointer-events: none;
}
@keyframes spinBurst { to { transform: translateX(-50%) rotate(360deg); } }
.hero-kicker { position: relative; margin: 0 0 8px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: .75rem; color: var(--canary); }
.hero-kicker.dark { color: var(--canary-deep); }
.hero h1, .hero h2 { position: relative; margin: 0 0 8px; font-size: clamp(1.65rem, 5vw, 2.35rem); line-height: 1.1; max-width: 14ch; }
.hero-sub { position: relative; margin: 0 0 18px; color: rgba(255,255,255,.88); }
.btn, .add-btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 46px; padding: 0 18px; border-radius: 999px; font-weight: 700;
  border: 0; cursor: pointer; background: var(--canary); color: var(--ink);
}
.btn:hover, .add-btn:hover { background: var(--canary-deep); }
.btn-ghost, .btn.ghost { background: #fff; border: 1px solid var(--line); }
.hero-dots { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 14px; }
.hero-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: 0; background: #f3d9de; cursor: pointer; padding: 0;
}
.hero-dots button.is-active { background: var(--canary-deep); width: 22px; border-radius: 999px; }

.why, .rail-inner, .page { padding: 40px 20px; max-width: 1180px; margin: 0 auto; }
.rail { padding: 0; }
.rail-alt { background: var(--paper); }
.rail-alt .rail-inner { padding-top: 48px; padding-bottom: 48px; }
.why h2, .rail h2, .page h1 { margin: 0; font-size: 1.55rem; }
.section-sub, .muted { margin: 4px 0 0; color: var(--muted); }
.why-grid { display: grid; gap: 14px; margin-top: 18px; }
.why-grid article { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.why-grid h3 { margin: 8px 0 4px; font-size: 1.05rem; }
.why-grid p { margin: 0; color: var(--muted); }
.why-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--canary); }

.rail-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px;
}
.rail-title { display: grid; gap: 2px; }
.rail-icon {
  margin: 0; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--canary-tint); color: var(--canary-deep); border: 1px solid #f0e6a8; font-weight: 800;
}
.rail-nav { display: flex; align-items: center; gap: 8px; }
.nav-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--paper); font-size: 1.35rem; cursor: pointer;
  display: inline-grid; place-items: center; line-height: 1; padding: 0;
}
.nav-btn:hover { background: var(--canary); border-color: var(--canary-deep); }

.rail-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 240px);
  gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px;
}
.empty-rail { grid-column: 1 / -1; padding: 24px; color: var(--muted); }
.card {
  scroll-snap-align: start; background: var(--paper); border: 1px solid #f3d9de;
  border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; min-height: 360px;
}
.card-media {
  position: relative; aspect-ratio: 1/1.05;
  background: linear-gradient(160deg, var(--canary-soft), #fff 55%, #f4f4f4);
  display: grid; place-items: center; background-size: cover; background-position: center;
}
.card-media.has-img .media-placeholder { display: none; }
.media-placeholder { color: var(--muted); font-size: .8rem; font-weight: 600; }
.badge {
  position: absolute; top: 10px; left: 10px; padding: 5px 10px; border-radius: 999px;
  background: var(--canary-deep); color: var(--ink); font-size: .68rem; font-weight: 800;
}
.badge.promo { background: var(--danger); color: #fff; }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: .95rem; line-height: 1.25; min-height: 2.5em; }
.price { display: flex; align-items: baseline; gap: 8px; font-weight: 800; }
.price.big { font-size: 1.4rem; margin: 10px 0; }
.price s { color: var(--muted); font-weight: 500; font-size: .85rem; }
.qty-row { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.qty {
  width: 48px; height: 40px; border: 1px solid var(--line); border-radius: 10px;
  text-align: center; display: flex; align-items: center; justify-content: center;
}
.add-btn { flex: 1; height: 40px; min-height: 40px; border-radius: 10px; }
.add-btn:disabled { background: #ececec; color: #999; cursor: not-allowed; }

.footer { margin-top: 20px; padding: 36px 20px 28px; background: #141414; color: #f5f5f5; }
.footer-brand { max-width: 1180px; margin: 0 auto 24px; }
.footer .logo-o { color: var(--ink); }
.footer-brand p { color: #bdbdbd; }
.footer-cols { max-width: 1180px; margin: 0 auto; display: grid; gap: 22px; }
.footer-cols h4 { margin: 0 0 10px; color: var(--canary); }
.footer-cols a, .footer-cols p { display: block; color: #cfcfcf; margin-bottom: 8px; font-size: .92rem; }
.copy { max-width: 1180px; margin: 28px auto 0; padding-top: 18px; border-top: 1px solid #2a2a2a; color: #8f8f8f; font-size: .85rem; }

.alert { padding: 12px 14px; border-radius: 12px; margin: 12px 0; }
.alert.ok { background: #eaffc7; }
.alert.err { background: #ffe1e1; }
.cart-table { display: grid; gap: 12px; }
.cart-row, .sum-row {
  display: grid; grid-template-columns: 1fr 70px auto; gap: 12px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px;
}
.sum-row { grid-template-columns: 1fr auto; background: transparent; border: 0; padding: 8px 0; }
.sum-total { display: flex; justify-content: space-between; font-size: 1.1rem; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.cart-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }
.checkout-grid { display: grid; gap: 20px; }
.checkout-form, .checkout-summary, .panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.checkout-form label, .form-grid label { display: grid; gap: 6px; margin-bottom: 12px; font-weight: 600; font-size: .9rem; }
.checkout-form input, .checkout-form textarea, .form-grid input, .form-grid textarea, .form-grid select {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-weight: 500;
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.product-page { display: grid; gap: 20px; }
.product-hero { min-height: 280px; border-radius: 18px; background: linear-gradient(160deg, var(--canary-soft), #eee); background-size: cover; background-position: center; }
.center-page { text-align: center; }

.info-page { max-width: 860px; }
.info-content { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.info-content h2 { margin: 1.4em 0 .5em; font-size: 1.1rem; }
.info-content p, .info-content li { color: #333; }
.info-content a { color: #8a6d00; text-decoration: underline; }
.legal-table-wrap { overflow: auto; margin: 12px 0; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.legal-table th, .legal-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.legal-table th { background: var(--canary-tint); }

/* Catalogo + barra laterale categorie */
.catalog {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 20px 48px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.cat-side {
  position: static;
  align-self: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 10px 16px;
  box-shadow: var(--shadow);
  overflow: visible;
  max-height: none;
}
.cat-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.cat-side-head strong {
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.side-all {
  font-size: .78rem;
  font-weight: 700;
  color: #8a6d00;
}
.side-item { margin: 0; }
.side-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  border-radius: 10px;
  padding-right: 4px;
}
.side-item.is-active > .side-row {
  background: var(--canary);
}
.side-mark {
  text-align: center;
  font-size: .7rem;
  color: #999;
  line-height: 1;
}
.side-item.depth-0 > .side-row .side-mark { color: #222; font-weight: 700; }
.side-link {
  display: block;
  padding: 6px 6px 6px 2px;
  font-size: .86rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.25;
}
.side-link:hover { text-decoration: underline; }
.side-children {
  display: block;
  padding-left: 8px;
  margin: 0 0 4px 8px;
  border-left: 2px solid #ececec;
}
.side-children.is-shown { display: block; }
.side-item.depth-1 .side-link { font-size: .84rem; font-weight: 600; }
.side-item.depth-2 .side-link { font-size: .8rem; font-weight: 500; color: #444; }
.side-empty { margin: 8px; color: var(--muted); font-size: .85rem; }

.catalog-main { min-width: 0; }
.catalog-crumb {
  margin: 0 0 6px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
}
.catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.catalog-head h1 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.8rem); }
.cat-side-open { display: none; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.empty-cat { grid-column: 1 / -1; padding: 28px 8px; }
.cat-side-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 90;
}

@media (max-width: 900px) {
  .catalog { grid-template-columns: 1fr; }
  .cat-side-open { display: inline-flex; }
  .cat-side {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(320px, 88vw);
    max-height: none;
    overflow-y: auto;
    z-index: 100;
    border-radius: 0 16px 16px 0;
    transform: translateX(-105%);
    transition: transform .2s ease;
    padding-top: 18px;
  }
  .cat-side.is-drawer-open { transform: translateX(0); }
}

@media (min-width: 768px) {
  .why-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .checkout-grid, .product-page { grid-template-columns: 1.2fr .8fr; }
  .hero-visual { min-height: 480px; padding: 48px 40px; }
}

