/* ============================================================
   AUTOCENTO — enhancements.css  (aggiunte sopra il sito originale)
   ============================================================ */

/* ---------- 9) Cursore stile Rolls-Royce ---------- */
@media (hover: hover) and (pointer: fine) {
  .rr-cursor-on, .rr-cursor-on a, .rr-cursor-on button,
  .rr-cursor-on .btn, .rr-cursor-on input, .rr-cursor-on select,
  .rr-cursor-on textarea, .rr-cursor-on [role="button"] { cursor: none; }
  .rr-cursor-ring, .rr-cursor-dot {
    position: fixed; top: 0; left: 0; z-index: 99999;
    pointer-events: none; border-radius: 50%;
    margin-left: -50%; transform: translate(-100px, -100px);
    transition: opacity .25s ease;
  }
  .rr-cursor-ring {
    width: 34px; height: 34px; margin: -17px 0 0 -17px;
    border: 1px solid rgba(185, 154, 109, .9);
    transition: width .25s ease, height .25s ease, margin .25s ease,
                background-color .25s ease, opacity .25s ease;
  }
  .rr-cursor-dot {
    width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
    background: #b99a6d;
  }
  .rr-hover .rr-cursor-ring {
    width: 52px; height: 52px; margin: -26px 0 0 -26px;
    background: rgba(185, 154, 109, .12);
  }
  .rr-down .rr-cursor-ring { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
}

/* ---------- 1) Frecce foto nelle card ---------- */
.car-gallery { position: absolute; inset: 0; }
.car-gallery .car-photo { opacity: 0; transition: opacity .35s ease; }
.car-gallery .car-photo.is-on { opacity: 1; }
.car-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; display: grid; place-items: center;
  border: none; border-radius: 50%; cursor: pointer; z-index: 3;
  background: rgba(10, 13, 18, .5); color: #f6f5f2;
  opacity: 0; transition: opacity .25s ease, background-color .2s ease;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.car-nav svg { width: 20px; height: 20px; }
.car-nav--prev { left: 12px; }
.car-nav--next { right: 12px; }
.car-card__media:hover .car-nav { opacity: 1; }
.car-nav:hover { background: rgba(185, 154, 109, .92); }
.car-dots {
  position: absolute; bottom: 12px; left: 0; right: 0; z-index: 3;
  display: flex; gap: 6px; justify-content: center; pointer-events: none;
}
.car-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(246, 245, 242, .45); transition: background-color .2s ease; }
.car-dots i.on { background: #b99a6d; }
@media (hover: none) { .car-nav { opacity: 1; background: rgba(10,13,18,.42); } }

/* ---------- 5) Banner cookie ---------- */
.ck-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
  background: #10141b; color: #f6f5f2;
  border-top: 1px solid rgba(185, 154, 109, .35);
  transform: translateY(110%); transition: transform .4s ease;
}
.ck-banner.show { transform: translateY(0); }
.ck-inner {
  max-width: 1180px; margin: 0 auto; padding: 18px 22px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: space-between;
}
.ck-text { font-size: .9rem; line-height: 1.55; max-width: 70ch; color: rgba(246, 245, 242, .82); }
.ck-text strong { display: block; color: #f6f5f2; margin-bottom: 4px; font-size: .95rem; }
.ck-text a { color: #b99a6d; text-decoration: underline; text-underline-offset: 2px; }
.ck-btns { display: flex; gap: 10px; flex-shrink: 0; }
@media (max-width: 720px) { .ck-btns { width: 100%; } .ck-btns .btn { flex: 1; } }

/* ---------- 8) Social nel footer ---------- */
.footer__social {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 0 4px; flex-wrap: wrap;
}
.footer__social-label {
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(246, 245, 242, .55);
}
.footer__social-row { display: flex; gap: 10px; }
.footer__social .soc {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid rgba(246, 245, 242, .18); border-radius: 50%;
  color: rgba(246, 245, 242, .8); transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.footer__social .soc:hover { border-color: #b99a6d; color: #0a0d12; background: #b99a6d; }
.footer__social .soc svg { width: 20px; height: 20px; }

/* ---------- 3) Calcolatore finanziamento ---------- */
.fin-section { background: #f6f5f2; }
.fin-wrap { max-width: 640px; margin: 40px auto 0; }
.fin-calc { padding: 30px; }
.fin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; margin-top: 6px; }
.fin-field { display: flex; flex-direction: column; gap: 7px; }
.fin-field label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #6b7280; }
.fin-field label strong { color: #0a0d12; }
.fin-field input[type="number"] {
  width: 100%; padding: 11px 12px; border: 1px solid rgba(10, 13, 18, .18);
  background: #fff; font-size: .95rem; border-radius: 0;
}
.fin-field input[type="range"] { width: 100%; accent-color: #b99a6d; }
.fin-out {
  display: flex; gap: 16px; margin-top: 22px; padding-top: 20px;
  border-top: 1px solid rgba(10, 13, 18, .1); flex-wrap: wrap;
}
.fin-out > div { flex: 1; min-width: 140px; }
.fin-out span { display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #6b7280; }
.fin-out strong { font-family: "Marcellus", Georgia, serif; font-size: 1.7rem; color: #0a0d12; }
.fin-out .fin-monthly { color: #a3855a; }
.fin-cta { width: 100%; margin-top: 22px; justify-content: center; }
.fin-note { margin-top: 14px; font-size: .72rem; line-height: 1.5; color: #8e95a0; }
@media (max-width: 560px) { .fin-grid { grid-template-columns: 1fr; } .fin-calc { padding: 22px; } }

/* ---------- Pagine legali (layout leggibile) ---------- */
.legal-page { padding: 120px 0 70px; }
.legal-page .legal-body { max-width: 760px; margin: 28px auto 0; }
.legal-page .legal-body h2 { font-family: "Marcellus", Georgia, serif; font-size: 1.4rem; color: #0a0d12; margin: 30px 0 10px; }
.legal-page .legal-body p { color: #3a3f47; line-height: 1.7; margin-top: 10px; }
.legal-page .legal-body ul { margin: 10px 0 0 1.2rem; color: #3a3f47; line-height: 1.7; }
.legal-page .legal-body li { margin-top: 6px; }
.legal-page .legal-body a { color: #a3855a; text-decoration: underline; }
.legal-page .legal-note { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(10,13,18,.1); font-size: .8rem; color: #8e95a0; }
.legal-page .btn-cookie { background: none; border: none; color: #a3855a; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

/* ---------- Galleria pagina annuncio (tutte le foto) ---------- */
.vd__main { position: relative; }
.vd__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.vd__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; display: grid; place-items: center;
  border: none; border-radius: 50%; cursor: pointer; z-index: 4;
  background: rgba(10, 13, 18, .55); color: #f6f5f2;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background-color .2s ease;
}
.vd__nav:hover { background: rgba(185, 154, 109, .95); }
.vd__nav svg { width: 22px; height: 22px; }
.vd__nav--prev { left: 14px; }
.vd__nav--next { right: 14px; }
.vd__count {
  position: absolute; right: 14px; bottom: 14px; z-index: 4;
  background: rgba(10, 13, 18, .6); color: #f6f5f2;
  font-size: .78rem; letter-spacing: .04em; padding: 5px 11px; border-radius: 999px;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.vd__count b { color: #b99a6d; font-weight: 600; }
.vd__thumbs {
  display: flex !important; grid-template-columns: none !important;
  gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 6px; scroll-behavior: smooth;
}
.vd__thumb {
  flex: 0 0 auto !important; width: 104px; height: 70px; padding: 0;
  border: 2px solid transparent; border-radius: 6px; overflow: hidden;
  cursor: pointer; background: #e9e7e2; position: relative;
  transition: border-color .2s ease;
}
.vd__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vd__thumb.active { border-color: #b99a6d; }
.vd__thumb:hover { border-color: rgba(185, 154, 109, .55); }
@media (max-width: 560px) {
  .vd__thumb { width: 84px; height: 58px; }
  .vd__nav { width: 40px; height: 40px; }
}

/* ---------- FIX dimensioni galleria annuncio ----------
   Impedisce l'allargamento della colonna (grid blowout) causato dalla
   striscia di anteprime: la colonna mantiene la larghezza prevista e i
   thumbnail scorrono al suo interno. Senza questo, la foto principale
   si ingrandiva a tutta pagina. */
.vd__layout { min-width: 0; }
.vd__layout > * { min-width: 0; max-width: 100%; }
.vd__gallery { width: 100%; min-width: 0; max-width: 100%; }
.vd__main { width: 100%; max-width: 100%; aspect-ratio: 16 / 10; }
.vd__thumbs { max-width: 100%; }

/* ---------- Consenso privacy (GDPR) + errori inline ---------- */
.consent-check {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .82rem; line-height: 1.5; color: #4a5159; margin: 4px 0 14px;
}
.consent-check input { margin-top: 3px; accent-color: #b99a6d; flex: 0 0 auto; }
.consent-check a { color: #a3855a; text-decoration: underline; }
.consent-check.invalid { color: #b4452f; }
.consent-check.invalid a { color: #b4452f; }
.form-error {
  background: #fbeae6; color: #8f2f1c; border: 1px solid #e6b8ac;
  padding: 10px 12px; font-size: .85rem; margin: 0 0 14px;
}
/* Footer consent label (dark footers) inherits readable color */
.footer .consent-check { color: rgba(246,245,242,.7); }

/* ---------- Recensioni oneste (no rating inventato) ---------- */
.reviews-empty {
  grid-column: 1 / -1; text-align: center; max-width: 640px; margin: 0 auto;
  padding: 8px 0;
}
.reviews-empty p { color: #5a616a; line-height: 1.6; margin-bottom: 18px; }
.reviews__cta { white-space: nowrap; }

/* ---------- Pagina annuncio: disponibilità + CTA ---------- */
.vd__avail {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  font-size: .8rem; letter-spacing: .03em; color: rgba(246,245,242,.82);
}
.vd__avail-dot { width: 8px; height: 8px; border-radius: 50%; background: #57b36b; box-shadow: 0 0 0 3px rgba(87,179,107,.2); }
.vd__reserve svg { color: currentColor; }
.vd__finance { display: inline-flex; align-self: flex-start; margin-top: 2px; font-size: .82rem; }

/* ---------- Accessibilità: focus visibile ---------- */
a:focus-visible, button:focus-visible,
.car-nav:focus-visible, .vd__nav:focus-visible, .vd__thumb:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #b99a6d; outline-offset: 2px; border-radius: 2px;
}
.car-nav:focus-visible, .vd__nav:focus-visible { opacity: 1; }

/* ---------- Header mobile: evita affollamento/overflow su telefoni ---------- */
@media (max-width: 600px) {
  .header__inner { gap: 8px; height: 62px; }
  .header.is-solid .header__inner { height: 56px; }
  .logo__mark { width: 32px; height: 32px; }
  .logo__name { font-size: .82rem !important; letter-spacing: .12em !important; }
  .logo__tag { display: none; }
  .menu-btn { letter-spacing: .12em; gap: 8px; padding: 8px 4px 8px 0; }
  .header__actions { gap: 4px; }
  .hicon { width: 36px; height: 36px; }
}
@media (max-width: 380px) {
  .menu-btn { font-size: .6rem; }
  .header__phone { display: none; } /* su schermi piccolissimi resta WhatsApp */
}

/* ---------- Upload foto nel modulo (anteprime) ---------- */
.upload-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.upload-thumb {
  width: 64px; height: 64px; border-radius: 6px;
  background: #e9e7e2 center/cover no-repeat; border: 1px solid rgba(10,13,18,.12); position: relative;
}
.upload-thumb.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px;
  border: 2px solid #b99a6d; border-top-color: transparent; border-radius: 50%; animation: ac-spin .8s linear infinite;
}
@keyframes ac-spin { to { transform: rotate(360deg); } }

/* ---------- Tabelle nelle pagine legali ---------- */
.legal-body .legal-table-wrap { overflow-x: auto; margin: 18px 0; }
.legal-body table.legal-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 640px; }
.legal-body table.legal-table th, .legal-body table.legal-table td { border: 1px solid rgba(10,13,18,.12); padding: 10px 12px; text-align: left; vertical-align: top; }
.legal-body table.legal-table th { background: #f6f5f2; font-weight: 600; font-size: .8rem; letter-spacing: .02em; }
.legal-updated { color: #8e95a0; font-size: .82rem; margin: 6px 0 0; }
.legal-toc { background:#f6f5f2; border:1px solid rgba(10,13,18,.08); padding:18px 22px; margin:24px 0; }
.legal-toc h2 { margin:0 0 10px; font-size:1rem; }
.legal-toc ul { margin:0; padding-left:18px; }
.legal-toc a { color:#a3855a; }
.btn-cookieprefs { display:inline-block; margin-top:6px; background:#0a0d12; color:#f6f5f2; border:0; padding:12px 20px; font-size:.82rem; letter-spacing:.04em; cursor:pointer; }
.btn-cookieprefs:hover { background:#b99a6d; color:#0a0d12; }

/* ---------- Barra azioni mobile (Chiama / WhatsApp / Prenota) ---------- */
#ac-mobilebar { display: none; }
@media (max-width: 880px) {
  #ac-mobilebar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 940;
    gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid rgba(10,13,18,.1);
    box-shadow: 0 -8px 24px -12px rgba(10,13,18,.35);
  }
  #ac-mobilebar .acmb__btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 10px; font-size: .85rem; font-weight: 600; letter-spacing: .02em;
    text-decoration: none; border-radius: 2px;
  }
  #ac-mobilebar .acmb__btn svg { width: 18px; height: 18px; }
  #ac-mobilebar .acmb__call { background: #0a0d12; color: #f6f5f2; }
  #ac-mobilebar .acmb__wa { background: #25D366; color: #0a0d12; }
  #ac-mobilebar .acmb__reserve { background: #b99a6d; color: #0a0d12; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ---------- Recensioni Google (live, lette lato server) ---------- */
.gr-stars { position: relative; display: inline-block; color: #dcdcdc; font-size: 20px; line-height: 1; letter-spacing: 3px; white-space: nowrap; vertical-align: middle; }
.gr-stars--sm { font-size: 15px; letter-spacing: 2px; }
.gr-stars__fill { position: absolute; left: 0; top: 0; overflow: hidden; color: #f5a623; white-space: nowrap; }
.gr-sum { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1rem; }
.gr-sum b { font-size: 1.25rem; }
.gr-sum__n { color: #8e95a0; font-size: .85rem; }
.gr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 8px; }
.gr-card { background: #fff; border: 1px solid rgba(10,13,18,.1); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.gr-card__h { display: flex; align-items: center; gap: 12px; }
.gr-card__av { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.gr-card__av--i { display: flex; align-items: center; justify-content: center; background: #0a0d12; color: #f6f5f2; font-family: Marcellus, Georgia, serif; font-size: 1.1rem; }
.gr-card__h strong { display: block; font-size: .95rem; }
.gr-card__t { color: #8e95a0; font-size: .78rem; }
.gr-card__txt { margin: 0; font-size: .92rem; line-height: 1.6; color: #3a3f47; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.gr-card__link { font-size: .8rem; color: #a3855a; text-decoration: none; letter-spacing: .02em; }
.gr-card__link:hover { text-decoration: underline; }
.gr-attrib { grid-column: 1 / -1; margin: 6px 0 0; color: #8e95a0; font-size: .78rem; text-align: center; }
