:root {
  --blue: #0f5bd8;
  --blue-dark: #0a3f99;
  --orange: #ff7a00;
  --orange-dark: #e56a00;
  --green: #0f8a3c;
  --red: #c62828;
  --ink: #1b2330;
  --muted: #667085;
  --line: #e4e7ec;
  --bg: #f3f5f8;
  --card: #fff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.45; font-size: 15px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: .2rem 0 .4rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: 0 0 .8rem; }
h3 { margin: 0; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.section { padding-top: 22px; padding-bottom: 12px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.ok { color: var(--green); }
.ko { color: var(--red); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 18px 20px; }
.chip { display: inline-block; background: #eef4ff; color: var(--blue-dark); border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 600; }
.badge { background: var(--red); color: #fff; border-radius: 6px; padding: 1px 6px; font-size: .75rem; font-weight: 700; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--blue); background: #fff; color: var(--blue); font-weight: 600; padding: 9px 16px; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap; }
.btn:hover { background: #eef4ff; text-decoration: none; }
.btn-compare { background: var(--blue); color: #fff; }
.btn-compare:hover { background: var(--blue-dark); }
.btn-cta { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-cta:hover { background: var(--orange-dark); }
.btn-small { padding: 6px 10px; }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.icon-btn { background: none; border: 0; color: inherit; cursor: pointer; padding: 6px; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.header-row { display: flex; align-items: center; gap: 18px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 1.35rem; font-weight: 500; letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo b { color: var(--orange); font-weight: 800; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 800; }
.menu-toggle { display: none; }
.search { position: relative; flex: 1; display: flex; max-width: 680px; }
.search input { flex: 1; min-width: 0; border: 2px solid var(--blue); border-right: 0; border-radius: 10px 0 0 10px; padding: 10px 14px; font: inherit; outline: none; }
.search button { border: 0; background: var(--blue); color: #fff; padding: 0 16px; border-radius: 0 10px 10px 0; cursor: pointer; font: inherit; font-weight: 700; }
.header-links { display: flex; gap: 16px; font-weight: 600; }
.header-links a { color: var(--ink); }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .16); overflow: hidden; z-index: 50; }
.suggest a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; color: var(--ink); }
.suggest a:hover, .suggest a.active { background: #f2f6ff; text-decoration: none; }
.suggest img { width: 38px; height: 38px; object-fit: contain; }
.suggest .s-title { flex: 1; font-size: .9rem; }
.suggest .s-price { font-weight: 700; color: var(--orange-dark); white-space: nowrap; }
.suggest .s-group { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 12px 2px; }

.catnav { background: var(--blue); }
.catnav-row { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.catnav-row::-webkit-scrollbar { display: none; }
.catnav-item { position: static; }
.catnav-item > a { display: block; color: #fff; padding: 10px 12px; font-size: .88rem; font-weight: 600; white-space: nowrap; }
.catnav-item > a:hover { background: rgba(255, 255, 255, .14); text-decoration: none; }
.mega { display: none; position: absolute; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(16, 24, 40, .12); padding: 18px max(16px, calc((100vw - 1208px) / 2)); columns: 4 200px; }
.mega a { display: block; color: var(--ink); padding: 5px 0; break-inside: avoid; }
.mega-all { font-weight: 700; color: var(--blue) !important; }
@media (hover: hover) and (min-width: 900px) { .catnav-item:hover .mega { display: block; } }

/* Hero */
.hero { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); color: #fff; padding: 46px 0 52px; }
.hero h1 { font-size: 2.3rem; font-weight: 800; }
.hero h1 span { color: #ffd199; }
.hero p { opacity: .9; margin: 0 0 18px; }
.search-hero { max-width: 720px; }
.search-hero input { border-color: #fff; padding: 14px 18px; font-size: 1.05rem; }
.search-hero button { background: var(--orange); padding: 0 26px; font-size: 1rem; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cat-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.cat-tile-head { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.cat-icon { font-size: 1.5rem; }
.cat-tile ul { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.cat-tile li { padding: 2px 0; }
.cat-tile li a { color: var(--muted); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.product-card { display: flex; flex-direction: column; overflow: hidden; }
.card-img { display: grid; place-items: center; height: 180px; padding: 12px; background: #fff; border-bottom: 1px solid var(--line); }
.card-img img { max-height: 156px; object-fit: contain; }
.noimg { color: var(--muted); font-size: .8rem; }
.card-body { padding: 12px 14px 4px; flex: 1; }
.card-brand { font-size: .75rem; text-transform: uppercase; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.card-title { font-size: .92rem; font-weight: 600; margin: 3px 0 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { color: var(--ink); }
.card-foot { padding: 10px 14px 14px; display: grid; gap: 8px; }
.price-from small { color: var(--muted); }
.price-from strong { font-size: 1.3rem; color: var(--orange-dark); font-weight: 800; }

.shop-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.shop-logo { height: 64px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; color: var(--ink); font-weight: 700; }
.shop-logo img { max-height: 44px; object-fit: contain; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-bottom: 40px; }
.how > div { background: #fff; border-radius: var(--radius); padding: 18px; border: 1px solid var(--line); }
.how b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: #fff; }
.how h3 { margin: 8px 0 4px; }
.how p { margin: 0; color: var(--muted); }

/* Breadcrumbs & listing */
.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.listing-head { display: flex; align-items: center; gap: 16px; }
.listing-logo { height: 56px; max-width: 160px; object-fit: contain; background: #fff; border-radius: 8px; padding: 6px; border: 1px solid var(--line); }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; align-items: center; }
.subcat { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--ink); font-size: .88rem; font-weight: 500; }
.subcat small { color: var(--muted); margin-left: 4px; }
.subcat:hover { border-color: var(--blue); text-decoration: none; }
.listing-layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; margin-top: 16px; align-items: start; }
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px 14px; position: sticky; top: 130px; max-height: calc(100vh - 150px); overflow: auto; }
.filters-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.filters-head h2 { margin: 0; font-size: 1.05rem; }
.filters-close { display: none; }
.facet { border-top: 1px solid var(--line); padding: 10px 0; }
.facet summary { font-weight: 700; cursor: pointer; margin-bottom: 6px; list-style: none; display: flex; justify-content: space-between; }
.facet summary::after { content: "▾"; color: var(--muted); }
.facet[open] summary::after { content: "▴"; }
.facet-opt, .facet-check { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--ink); font-size: .9rem; }
.facet-opt.on { font-weight: 700; color: var(--blue); }
.facet-check small, .facet-opt small { color: var(--muted); margin-left: auto; }
.facet-check .box { width: 16px; height: 16px; border: 1.5px solid #98a2b3; border-radius: 4px; flex: none; }
.facet-check.on .box { background: var(--blue); border-color: var(--blue); box-shadow: inset 0 0 0 3px #fff; }
.facet-check:hover, .facet-opt:hover { text-decoration: none; color: var(--blue); }
.facet-list.collapsed > a:nth-child(n+9) { display: none; }
.facet-more { background: none; border: 0; color: var(--blue); cursor: pointer; padding: 4px 0; font: inherit; font-size: .85rem; font-weight: 600; }
.price-form { display: flex; gap: 6px; margin-top: 8px; }
.price-form input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; }
.results-bar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-bottom: 10px; }
.filters-open { display: none; margin-right: auto; }
.sort-form select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; background: #fff; margin-left: 6px; }
.row-item { display: grid; grid-template-columns: 120px 1fr 220px; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.row-img { height: 110px; display: grid; place-items: center; }
.row-img img { max-height: 110px; object-fit: contain; }
.row-main h3 { font-size: 1.02rem; font-weight: 600; }
.row-main h3 a { color: var(--ink); }
.row-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; font-size: .88rem; }
.row-price { display: grid; gap: 6px; justify-items: end; text-align: right; }
.empty { text-align: center; padding: 50px 16px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; padding: 16px 0 30px; }
.pagination a { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; font-weight: 600; }
.backdrop { position: fixed; inset: 0; background: rgba(16, 24, 40, .45); z-index: 40; }

/* Product */
.product-top { display: grid; grid-template-columns: 380px 1fr; gap: 28px; margin-top: 6px; }
.product-gallery { display: grid; place-items: center; min-height: 340px; padding: 20px; }
.product-gallery img { max-height: 320px; object-fit: contain; }
.product-info h1 { font-size: 1.6rem; }
.best-box { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #fff; border: 2px solid var(--orange); border-radius: var(--radius); padding: 16px 20px; margin: 16px 0 8px; }
.best-price { font-size: 2.1rem; font-weight: 800; color: var(--orange-dark); line-height: 1.1; }
.best-box .btn-cta { padding: 13px 24px; font-size: 1.02rem; }
.variants { margin-top: 14px; }
.variant-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.variant { display: grid; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 12px; color: var(--ink); font-weight: 600; font-size: .9rem; }
.variant small { color: var(--muted); font-weight: 500; }
.variant.on { border: 2px solid var(--blue); }
.variant:hover { text-decoration: none; border-color: var(--blue); }
.offers { display: grid; gap: 8px; margin-bottom: 10px; }
.offer { display: grid; grid-template-columns: 170px 1fr 170px 170px; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.offer-best { border: 2px solid var(--green); }
.offer-oos { opacity: .65; }
.offer-logo { display: flex; align-items: center; height: 40px; font-weight: 700; color: var(--ink); }
.offer-logo img { max-height: 40px; max-width: 150px; object-fit: contain; }
.offer-title a { color: var(--ink); font-weight: 500; }
.offer-price { text-align: right; }
.offer-price strong { display: block; font-size: 1.35rem; color: var(--ink); font-weight: 800; }
.offer-best .offer-price strong { color: var(--green); }
.offer-price .old { text-decoration: line-through; color: var(--muted); font-size: .85rem; }
.offer-cta { display: grid; justify-items: end; gap: 4px; }
.best-label { font-size: .75rem; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: .04em; }
.stars { color: #f5a300; letter-spacing: 1px; }
.stars-off { color: #d0d5dd; }
.product-details { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-top: 16px; }
.description { white-space: normal; color: #344054; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; }

/* Index categorie & negozi */
.index-grid { columns: 3 320px; column-gap: 18px; }
.index-block { break-inside: avoid; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 18px; }
.index-block h2 a { color: var(--ink); }
.index-sub { padding: 4px 0; }
.index-sub-title { font-weight: 600; }
.index-sub small { color: var(--muted); font-weight: 400; }
.index-leaves { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .85rem; padding: 2px 0 4px 10px; }
.index-leaves a { color: var(--muted); }
.shops-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.shop-card { display: grid; gap: 4px; padding: 16px; color: var(--ink); justify-items: center; text-align: center; }
.shop-card:hover { text-decoration: none; border-color: var(--blue); }
.shop-card-logo { height: 60px; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; }
.shop-card-logo img { max-height: 56px; max-width: 170px; object-fit: contain; }

/* Footer */
.site-footer { background: #101828; color: #d0d5dd; margin-top: 40px; padding: 34px 0 18px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 28px; }
.site-footer h4 { color: #fff; margin: 0 0 8px; }
.site-footer a { color: #d0d5dd; display: block; padding: 2px 0; }
.logo-footer { color: #fff; margin-bottom: 8px; display: inline-flex; }
.copyright { border-top: 1px solid #344054; margin-top: 20px; padding-top: 14px; color: #98a2b3; }

/* Responsive */
@media (max-width: 1000px) {
  .offer { grid-template-columns: 1fr auto; }
  .offer-title { grid-column: 1 / -1; grid-row: 2; }
  .offer-price { grid-row: 3; text-align: left; }
  .offer-cta { grid-row: 3; }
}
@media (max-width: 900px) {
  .header-row { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .menu-toggle { display: block; }
  .header-links { display: none; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .catnav { display: none; }
  .catnav.open { display: block; }
  .catnav-row { flex-direction: column; }
  .listing-layout { grid-template-columns: 1fr; }
  .filters { position: fixed; top: 0; left: 0; bottom: 0; width: min(88vw, 340px); max-height: none; border-radius: 0; z-index: 50; transform: translateX(-105%); transition: transform .2s; }
  .filters.open { transform: none; }
  .filters-close, .filters-open { display: inline-flex; }
  .product-top { grid-template-columns: 1fr; }
  .product-gallery { min-height: 240px; }
  .product-details { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  h1 { font-size: 1.35rem; }
  .hero { padding: 30px 0 34px; }
  .hero h1 { font-size: 1.6rem; }
  .row-item { grid-template-columns: 84px 1fr; }
  .row-img { height: 84px; }
  .row-price { grid-column: 1 / -1; grid-template-columns: 1fr auto; justify-items: start; text-align: left; align-items: center; }
  .row-price .btn { grid-column: 2; grid-row: 1 / span 2; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-img { height: 140px; }
  .best-box { flex-direction: column; align-items: stretch; }
  .best-box .btn-cta { width: 100%; }
}

/* immagini non caricate: niente testo alternativo che sborda */
.card-img img, .row-img img, .product-gallery img, .suggest img { color: transparent; font-size: 0; }
