/* Ricerca - Paoloni */
:root {
  --psr-accent: #1f1d1a;
  --psr-bg: #ffffff;
  --psr-ink: #1f1d1a;
  --psr-muted: #7a746c;
  --psr-line: #e8e4de;
  --psr-soft: #f5f2ee;
  --psr-sale: #b4432b;
  --psr-special: #f06c3c;
  --psr-instock: #22c55e;
  --psr-button: #feae00;
  --psr-ok: #3f6b4a;
  --psr-radius: 2px;
}

/* Il pannello di Sober non serve più quando la nuova ricerca è attiva. */
body.psr-active #search-modal,
body.psr-active .search-modal { display: none !important; }

html.psr-open, html.psr-open body { overflow: hidden !important; }

.psr[hidden] { display: none !important; }
.psr {
  position: fixed; inset: 0; z-index: 999999;
  font-family: inherit; color: var(--psr-ink); line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
.psr *, .psr *::before, .psr *::after { box-sizing: border-box; }
.psr__backdrop {
  position: absolute; inset: 0; background: rgba(31, 29, 26, .45);
  opacity: 0; transition: opacity .18s ease;
}
.psr__sheet {
  position: relative; background: var(--psr-bg);
  /* A tutto schermo, come il pannello di ricerca di Sober: niente pagina che spunta sotto. */
  height: 100vh; height: 100dvh; max-height: none; display: flex; flex-direction: column;
  transform: translateY(-12px); opacity: 0;
  transition: transform .22s ease, opacity .18s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
}
.psr.is-open .psr__backdrop { opacity: 1; }
.psr.is-open .psr__sheet { transform: none; opacity: 1; }

.psr__test {
  background: #fff4d6; color: #6b5200; font-size: 12px; text-align: center; padding: 6px 16px;
}

.psr__bar, .psr__body > * { width: 100%; max-width: 1280px; margin-inline: auto; }
.psr__bar {
  display: flex; align-items: center; gap: 24px;
  padding: 28px max(24px, env(safe-area-inset-right)) 20px max(24px, env(safe-area-inset-left));
}
.psr__field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px;
  border-bottom: 2px solid var(--psr-ink); padding-bottom: 10px;
}
.psr__field > svg, .psr svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; flex: none; }
.psr .psr__input {
  flex: 1 1 0; width: 0 !important; min-width: 0; border: 0 !important; outline: 0 !important; box-shadow: none !important;
  background: transparent !important; padding: 0 !important; margin: 0 !important; height: auto !important;
  font: inherit; font-size: clamp(20px, 2.4vw, 30px) !important; letter-spacing: -.01em; color: var(--psr-ink) !important;
  -webkit-appearance: none; appearance: none;
}
.psr .psr__input::-webkit-search-cancel-button { display: none; }
.psr .psr__input::placeholder { color: #b5afa6; }
.psr button.psr__clear, .psr button.psr__close {
  background: none !important; border: 0 !important; padding: 6px !important; margin: 0 !important; cursor: pointer;
  color: var(--psr-muted) !important; min-height: 0 !important; line-height: 1 !important; box-shadow: none !important;
}
.psr button.psr__close { font-size: 12px !important; letter-spacing: .12em; text-transform: uppercase; color: var(--psr-ink) !important; }
.psr button.psr__clear svg { width: 18px; height: 18px; }

.psr__body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 8px max(24px, env(safe-area-inset-right)) 32px max(24px, env(safe-area-inset-left));
}
.psr__loading { color: var(--psr-muted); padding: 24px 0; }

/* sezioni */
.psr-sec + .psr-sec { margin-top: 28px; }
.psr .psr-sec__title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-family: inherit; font-size: 11px !important; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--psr-muted); margin: 0 0 12px !important; padding: 0 !important; line-height: 1.4;
}
.psr button.psr-link { background: none !important; border: 0 !important; padding: 0 !important; color: var(--psr-muted) !important; font-size: 11px !important; text-decoration: underline; cursor: pointer; letter-spacing: .08em; }

.psr a { text-decoration: none !important; color: inherit !important; }
.psr a.psr-hit { outline: none; transition: background-color .12s ease; }
.psr a.psr-hit:focus-visible, .psr a.psr-hit.is-active { box-shadow: inset 0 0 0 2px var(--psr-accent, #1f1d1a); }
.psr mark { background: none !important; color: inherit !important; font-weight: 700; padding: 0; }

.psr-grid { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 40px; align-items: start; }
.psr-grid--single { grid-template-columns: minmax(0, 1fr); }
.psr-side { min-width: 0; order: -1; }
.psr-main { min-width: 0; }

/* chips */
.psr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.psr button.psr-chip {
  border: 1px solid var(--psr-line) !important; background: var(--psr-bg) !important; color: var(--psr-ink) !important;
  border-radius: 999px !important; padding: 8px 14px !important; font-size: 14px !important; cursor: pointer; line-height: 1.2 !important;
  min-height: 0 !important; text-transform: none !important; letter-spacing: 0 !important; font-weight: 400 !important;
}
.psr button.psr-chip:hover { border-color: var(--psr-ink) !important; }

/* collezioni */
.psr-colls { display: grid; gap: 10px; }
.psr a.psr-coll { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; padding: 6px; margin: -6px; border-radius: var(--psr-radius); }
.psr a.psr-coll:hover { background: var(--psr-soft); }
.psr-coll__img { aspect-ratio: 16 / 10; background: var(--psr-soft); overflow: hidden; display: block; max-width: 100%; }
.psr-coll__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.psr a.psr-coll:hover .psr-coll__img img { transform: scale(1.04); }
.psr-coll__name { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.005em; }
.psr-coll__meta { display: block; font-size: 12px; color: var(--psr-muted); margin-top: 2px; }

.psr-colls--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.psr-colls--wide a.psr-coll { grid-template-columns: 1fr; margin: 0; padding: 0; gap: 10px; }
.psr-colls--wide a.psr-coll:hover { background: none; }
.psr-colls--wide .psr-coll__img { aspect-ratio: 2 / 1; }

/* marchi: nome ben leggibile */
.psr-brands { display: flex; flex-direction: column; }
.psr a.psr-brand { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 6px; margin: 0 -6px; border-bottom: 1px solid var(--psr-line); }
.psr a.psr-brand:hover { background: var(--psr-soft); }
.psr-brand__name { font-size: 15px; font-weight: 600; }
.psr-brand__meta { font-size: 12px; color: var(--psr-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* categorie */
.psr-cats { display: flex; flex-direction: column; }
.psr a.psr-cat { display: flex; justify-content: space-between; gap: 12px; padding: 9px 6px; margin: 0 -6px; border-bottom: 1px solid var(--psr-line); font-size: 15px; }
.psr a.psr-cat:hover { background: var(--psr-soft); }
.psr a.psr-cat small { color: var(--psr-muted); font-size: 12px; margin-left: 4px; }
.psr a.psr-cat em { font-style: normal; color: var(--psr-muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* prodotti */
.psr-prods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
.psr a.psr-prod { display: flex; flex-direction: column; gap: 10px; border-radius: var(--psr-radius); }
.psr-prod__img { position: relative; display: block; aspect-ratio: 1; background: var(--psr-soft); overflow: hidden; max-width: 100%; }
.psr-prod__img img { width: 100%; height: 100%; object-fit: contain; display: block; mix-blend-mode: multiply; transition: transform .4s ease; }
.psr a.psr-prod:hover .psr-prod__img img { transform: scale(1.04); }
.psr-badges { position: absolute; left: 8px; top: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
/* Come l'etichetta del sito: bianco, grassetto, 9pt, 6px 8px */
.psr-badge { color: #fff; font-size: 12px; font-weight: 700; padding: 6px 8px; line-height: 1.1; text-transform: uppercase; letter-spacing: 0; }
.psr-badge--special { background: var(--psr-special, #f06c3c); }
/* "In Stock" come nel sito: pallino verde + testo grassetto */
.psr-instock { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: #333; }
.psr-instock i { width: 8px; height: 8px; border-radius: 50%; background: var(--psr-instock, #22c55e); display: inline-block; }
/* Riquadro Special price nella schermata iniziale */
.psr-promo__img { background: var(--psr-special, #f06c3c) !important; display: flex !important; align-items: center; justify-content: center; }
.psr-promo__img span { color: #fff; font-weight: 700; text-transform: uppercase; font-size: clamp(16px, 2vw, 24px); letter-spacing: .04em; text-align: center; padding: 0 12px; }
.psr-prod__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.psr-prod__brand { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--psr-muted); }
.psr-prod__name {
  font-size: 14px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.psr-prod__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 2px; }
.psr-price { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.psr .psr-price, .psr .psr-price * { color: var(--psr-ink) !important; background: none !important; box-shadow: none !important; }
.psr .psr-price del, .psr .psr-price del * { color: var(--psr-muted) !important; font-weight: 400; font-size: 13px; }
.psr .psr-price del { margin-right: 4px; }
.psr .psr-price ins { text-decoration: none !important; font-weight: 600; }
.psr-price .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.psr-stock { font-size: 11px; color: var(--psr-muted); }
.psr-stock--out { color: var(--psr-sale); }

.psr a.psr-all {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; padding: 14px 22px;
  background: var(--psr-accent, #1f1d1a); color: #fff !important; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}
.psr a.psr-all svg { width: 18px; height: 18px; }
.psr a.psr-all.is-active, .psr a.psr-all:focus-visible { box-shadow: 0 0 0 3px var(--psr-bg), 0 0 0 5px var(--psr-accent, #1f1d1a); }

/* "Vedi tutti": link nel titolo e barra fissa in fondo al pannello */
.psr a.psr-seeall { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .08em; color: var(--psr-ink) !important; text-decoration: underline !important; text-underline-offset: 3px; }
.psr a.psr-seeall svg { width: 16px; height: 16px; }
.psr__foot { flex: none; position: relative; z-index: 2; border-top: 1px solid var(--psr-line); background: var(--psr-bg); }
.psr__foot[hidden] { display: none !important; }
.psr a.psr-foot__btn {
  display: flex !important; visibility: visible !important; opacity: 1 !important; box-sizing: border-box; align-items: center; justify-content: center; gap: 12px; max-width: 1280px; margin: 12px auto;
  width: calc(100% - 48px); padding: 15px 22px; background: var(--psr-button, #feae00); color: #fff !important;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.psr a.psr-foot__btn em { font-style: normal; text-transform: none; letter-spacing: 0; opacity: .8; }
.psr a.psr-foot__btn:hover { filter: brightness(1.15); }
.psr a.psr-foot__btn svg { width: 18px; height: 18px; flex: none; }

/* banner "mobili su misura" */
.psr-custom {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start;
  background: var(--psr-soft); border-left: 3px solid var(--psr-button, #feae00); padding: 22px 24px; margin-bottom: 28px;
}
.psr-custom__icon { width: 44px; height: 44px; border-radius: 50%; background: var(--psr-bg); display: flex; align-items: center; justify-content: center; color: var(--psr-button, #feae00); }
.psr-custom__icon svg { width: 22px; height: 22px; }
.psr .psr-custom p { margin: 0; }
.psr .psr-custom__ask { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--psr-muted); margin-bottom: 4px !important; }
.psr .psr-custom__title { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 6px !important; }
.psr .psr-custom__text { font-size: 14px; line-height: 1.55; max-width: 62ch; color: var(--psr-ink); }
.psr-custom__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 14px; }
.psr a.psr-custom__btn { display: inline-flex; align-items: center; gap: 10px; background: var(--psr-button, #feae00); color: #fff !important; font-weight: 600; padding: 11px 18px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.psr a.psr-custom__btn svg { width: 16px; height: 16px; }
.psr-custom__phone { font-size: 14px; }
.psr-custom--compact { padding: 18px 20px; }
.psr-custom--compact .psr-custom__title { font-size: 17px; }

/* nessun risultato */
.psr-none { max-width: 640px; padding: 12px 0 8px; }
.psr-none__title { font-size: 22px; margin: 0 0 8px; }
.psr-none__hint { color: var(--psr-muted); margin: 0 0 20px; }
.psr-none__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 28px; }
.psr a.psr-btn { background: var(--psr-accent, #1f1d1a); color: #fff !important; padding: 12px 20px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.psr-none__phone { font-size: 15px; }

/* shortcode [paoloni_ricerca] */
.psr-inline { max-width: 640px; }
.psr-inline__input { width: 100%; }

/* tablet */
@media (max-width: 1100px) {
  .psr-prods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .psr-grid { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 28px; }
}

/* telefono: schermo intero, liste compatte */
@media (max-width: 767px) {
  .psr__sheet { height: 100%; height: 100dvh; max-height: none; transform: none; }
  .psr__bar { gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 16px 12px; }
  .psr__field { gap: 10px; padding-bottom: 8px; }
  .psr .psr__input { font-size: 18px !important; }
  .psr__body { padding: 4px 16px calc(24px + env(safe-area-inset-bottom)); }
  .psr-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .psr-side { order: 2; }
  .psr-prods { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .psr a.psr-prod { flex-direction: row; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--psr-line); border-radius: 0; }
  .psr-prod__img { width: 76px; flex: none; }
  .psr-badges { left: 4px; top: 4px; }
  .psr-custom { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px; margin-bottom: 16px; }
  .psr-custom__icon { display: none; }
  .psr .psr-custom--compact .psr-custom__text { font-size: 13px; }
  .psr-badge { font-size: 8px; padding: 3px 5px; }
  .psr a.psr-foot__btn { width: calc(100% - 32px); margin: 10px auto calc(10px + env(safe-area-inset-bottom)); }
  .psr a.psr-foot__btn em { display: none; }
  .psr-prod__name { -webkit-line-clamp: 2; }
  .psr-colls { display: flex; overflow-x: auto; gap: 12px; margin: 0 -16px; padding: 0 16px 4px; scroll-snap-type: x mandatory; }
  .psr a.psr-coll { flex: 0 0 64%; grid-template-columns: 1fr; margin: 0; padding: 0; gap: 8px; scroll-snap-align: start; }
  .psr a.psr-coll:hover { background: none; }
  .psr-coll__img { aspect-ratio: 3 / 2; }
  .psr-colls--wide { grid-template-columns: none; }
  .psr a.psr-all { display: flex; justify-content: center; margin-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .psr__sheet, .psr__backdrop, .psr img { transition: none !important; }
}
