:root {
  /* Colori del logo BassiPrezzi */
  --brand-black: #111111;
  --brand-lime: #c2d342;
  --lime-hover: #b3c43a;
  --lime-soft: #f2f6d8;
  --olive: #5c690b;         /* link e testi verdi su bianco (contrasto 6:1) */
  --price: #4d5a00;         /* prezzi (contrasto 7,5:1) */
  --primary: var(--brand-black);
  --primary-hover: #2c2c2c;
  --green: #1a7f37;
  --red: #c62828;
  --ink: #111111;
  --muted: #5f6368;
  --line: #e2e4da;
  --bg: #f5f6f1;
  --card: #fff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(17, 17, 17, .05), 0 1px 3px rgba(17, 17, 17, .07);
}
* { 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(--olive); 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: var(--lime-soft); color: #3f4a00; 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(--primary); background: #fff; color: var(--primary); font-weight: 600; padding: 9px 16px; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap; }
.btn:hover { background: #f0f1ec; text-decoration: none; }
.btn-compare { background: var(--primary); color: #fff; }
.btn-compare:hover { background: var(--primary-hover); }
.btn-cta { background: var(--brand-lime); border-color: var(--brand-lime); color: var(--brand-black); }
.btn-cta:hover { background: var(--lime-hover); border-color: var(--lime-hover); }
.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; flex: none; }
.logo img { height: 44px; width: auto; display: block; }
.logo:hover { text-decoration: none; }
.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(--primary); border-right: 0; border-radius: 10px 0 0 10px; padding: 10px 14px; font: inherit; outline: none; }
.search button { border: 0; background: var(--brand-lime); color: var(--brand-black); 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: var(--lime-soft); 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(--price); 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(--primary); }
.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, .catnav-item:hover > a { background: rgba(255, 255, 255, .08); color: var(--brand-lime); text-decoration: none; }
.mega { display: none; position: absolute; left: 0; right: 0; background: #fff; border-bottom: 3px solid var(--brand-lime); box-shadow: 0 16px 30px rgba(17, 17, 17, .14); }
.mega-inner { max-width: 1240px; margin: 0 auto; padding: 18px 16px 20px; }
.mega-title { font-weight: 800; font-size: 1.05rem; margin-bottom: 8px; }
.mega-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 24px; }
.mega-links a { color: var(--ink); padding: 6px 0; border-bottom: 1px solid var(--line); }
.mega-links a:hover { color: var(--olive); text-decoration: none; }
.mega-all { display: inline-block; margin-top: 12px; }
@media (hover: hover) and (min-width: 900px) { .catnav-item:hover .mega { display: block; } }

/* Hero */
.hero { background: radial-gradient(circle at 85% 20%, rgba(194, 211, 66, .28), transparent 45%), var(--brand-black); color: #fff; padding: 46px 0 52px; }
.hero h1 { font-size: 2.3rem; font-weight: 800; }
.hero h1 span { color: var(--brand-lime); }
.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(--brand-lime); color: var(--brand-black); 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(--price); 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(--brand-lime); color: var(--brand-black); }
.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(--primary); 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(--olive); }
.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(--primary); border-color: var(--primary); box-shadow: inset 0 0 0 3px #fff; }
.facet-check:hover, .facet-opt:hover { text-decoration: none; color: var(--olive); }
.facet-list.collapsed > a:nth-child(n+9) { display: none; }
.facet-more { background: none; border: 0; color: var(--olive); 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(--brand-lime); border-radius: var(--radius); padding: 16px 20px; margin: 16px 0 8px; }
.best-price { font-size: 2.1rem; font-weight: 800; color: var(--price); 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(--primary); }
.variant:hover { text-decoration: none; border-color: var(--primary); }
.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(--brand-lime); }
.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(--price); }
.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: .72rem; font-weight: 800; color: var(--brand-black); background: var(--brand-lime); border-radius: 6px; padding: 2px 8px; 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(--primary); }
.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: var(--brand-black); 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; }
.site-footer a:hover { color: var(--brand-lime); }
.logo-footer { margin-bottom: 10px; }
.logo-footer img { height: 40px; }
.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; }

/* Sottocategorie secondarie (pagina categoria) */
.more-subcats { margin: 6px 0 0; }
.more-subcats summary { cursor: pointer; color: var(--olive); font-weight: 600; font-size: .9rem; }
.more-subcats .subcats { margin-top: 8px; }
.subcat-small { padding: 4px 10px; font-size: .82rem; }
.index-more { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.index-more a { color: var(--muted); }

/* Banner cookie */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100; display: flex; justify-content: center; }
.consent[hidden] { display: none; }
.consent-box { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--brand-lime); border-radius: 14px; box-shadow: 0 18px 40px rgba(17, 17, 17, .22); padding: 16px 18px; max-width: 760px; width: 100%; }
.consent-box p { margin: 0 0 10px; font-size: .92rem; }
.consent-options { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 12px; font-size: .9rem; }
.consent-options[hidden] { display: none; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.consent-actions [hidden] { display: none; }
@media (max-width: 640px) {
  .consent { left: 8px; right: 8px; bottom: 8px; }
  .consent-actions .btn { flex: 1 1 auto; }
  .logo img { height: 36px; }
}
@media (max-width: 900px) {
  .mega { display: none !important; }
}
.tile-more { color: var(--olive) !important; font-weight: 600; }
