:root {
  --blue: #0a1cff;
  --blue-d: #0610c4;
  --cyan: #00d4ff;
  --ink: #0b1020;
  --muted: #5c6580;
  --line: #e4e8f4;
  --bg: #eef1f9;
  --card: #fff;
  --ok: #12a150;
  --warn: #e39a00;
  --bad: #d63b3b;
  --r: 22px;
  --shadow: 0 1px 2px rgba(11, 16, 32, .04), 0 10px 30px rgba(11, 16, 32, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink);
  background: radial-gradient(1200px 500px at 50% -120px, #dfe5ff 0%, transparent 70%), var(--bg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }

/* header */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 16px; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid rgba(228, 232, 244, .9);
}
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--blue), var(--cyan)); opacity: .9; }
.top img { height: 46px; width: auto; display: block; }
.top .pill { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--blue-d); background: #e6eaff; padding: 6px 12px; border-radius: 99px; text-align: center; line-height: 1.25; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 18px 16px 110px; display: grid; gap: 18px; }
@media (min-width: 900px) {
  .wrap { padding-bottom: 40px; }
  .wrap.phone { grid-template-columns: 1.1fr 1fr; align-items: start; gap: 26px; }
  .wrap.phone .viewer { position: sticky; top: 86px; }
}
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }

/* visore */
.viewer { padding-bottom: 14px; }
#stage {
  position: relative; width: 100%; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
  background: radial-gradient(circle at 50% 35%, #ffffff 0%, #eef1fb 55%, #dde3f5 100%); overflow: hidden;
}
#stage.drag { cursor: grabbing; }
#stage.zoomed { cursor: move; touch-action: none; }
#cv { display: block; width: 100%; height: 100%; }
.loader { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(10, 28, 255, .1); transition: opacity .4s; }
.loader i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width .2s; }
.loader.done { opacity: 0; }
.hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center;
  background: rgba(11, 16, 32, .78); color: #fff; font-size: 13px; padding: 7px 15px; border-radius: 99px;
  pointer-events: none; white-space: nowrap; transition: opacity .5s; backdrop-filter: blur(6px);
}
.hint.off { opacity: 0; }
.badge360 {
  position: absolute; top: 14px; right: 14px; background: #fff; color: var(--blue-d); font-weight: 800; font-size: 12px;
  letter-spacing: .06em; padding: 5px 11px; border-radius: 99px; box-shadow: 0 2px 10px rgba(11, 16, 32, .12); pointer-events: none;
}
.ribbon {
  position: absolute; top: 22px; left: -44px; transform: rotate(-35deg); background: var(--bad); color: #fff;
  font-weight: 800; letter-spacing: .14em; padding: 7px 56px; font-size: 14px; z-index: 2; pointer-events: none;
}
.controls { display: flex; align-items: center; gap: 12px; padding: 14px 16px 2px; }
.controls input[type=range] { flex: 1; accent-color: var(--blue); height: 28px; }
.ctl {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(10, 28, 255, .3); transition: transform .12s;
}
.ctl:active { transform: scale(.94); }
.ctl.alt { background: #eef1ff; color: var(--blue-d); box-shadow: none; }
.ctl.alt.on { background: var(--blue); color: #fff; }
.ctl svg { width: 20px; height: 20px; fill: currentColor; }
.noimg { padding: 90px 20px; text-align: center; color: var(--muted); }

/* scheda */
.info { padding: 22px 20px 20px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 99px; background: #e6eaff; color: var(--blue-d); }
.badge.sold { background: #fde7e7; color: var(--bad); }
h1 { font-size: 30px; line-height: 1.12; margin: 12px 0 2px; letter-spacing: -.02em; }
.sub { margin: 0; color: var(--muted); font-size: 16px; }
.priceRow { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 6px; }
.price { font-size: 46px; line-height: 1; font-weight: 800; letter-spacing: -.03em; background: linear-gradient(100deg, var(--blue), #1fa2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.priceRow small { color: var(--muted); font-weight: 600; font-size: 13px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 12px; }
.tile { background: #f5f7fd; border-radius: 18px; padding: 14px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.tile .k { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.tile .v { font-weight: 800; font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.tile .s { font-size: 12.5px; color: var(--muted); }
.ico { width: 44px; height: 44px; border-radius: 14px; flex: none; display: grid; place-items: center; background: #e6eaff; color: var(--blue); }
.ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.g { font-weight: 800; font-size: 20px; }
.ring { width: 56px; height: 56px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .bg { stroke: #dfe4f3; }
.ring .fg { stroke-linecap: round; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; }
.tile.wide { grid-column: 1 / -1; }

.block { margin-top: 14px; }
.block h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { background: #eef1fb; border-radius: 99px; padding: 6px 14px; font-size: 14px; font-weight: 600; }
.chip.none { background: #e3f6ea; color: #0b7a3b; }
.notes { background: #fff8e6; border: 1px solid #f6e3a8; border-radius: 14px; padding: 12px 14px; color: #5a4300; font-size: 15px; white-space: pre-line; }
.plain { margin: 0; font-weight: 600; }

.cta { display: grid; gap: 10px; margin-top: 20px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 9px; text-decoration: none; font-weight: 800; padding: 15px 18px; border-radius: 16px; font-size: 16px; }
.btn svg { width: 22px; height: 22px; fill: currentColor; }
.btn.wa { background: #25d366; color: #04301a; box-shadow: 0 8px 20px rgba(37, 211, 102, .35); }
.btn.call { background: #fff; border: 2px solid var(--blue); color: var(--blue); }
.dock { display: none; }
@media (max-width: 899px) {
  .cta { display: none; }
  .dock {
    display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .dock .dp { font-weight: 800; font-size: 22px; line-height: 1.1; color: var(--blue); white-space: nowrap; }
  .dock .dp small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
  .dock .btn { flex: 1; padding: 13px 12px; font-size: 15px; }
}
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 0 16px 28px; }

/* catalogo */
.heroBox {
  border-radius: 26px; padding: 26px 22px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(120deg, #0610c4 0%, #0a1cff 45%, #12a9ff 100%); box-shadow: 0 16px 40px rgba(10, 28, 255, .25);
}
.heroBox::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.heroBox h1 { margin: 0; font-size: 30px; color: #fff; }
.heroBox p { margin: 6px 0 0; max-width: 520px; color: rgba(255, 255, 255, .9); }
.heroBox .count { display: inline-block; margin-top: 14px; background: rgba(255, 255, 255, .18); padding: 5px 14px; border-radius: 99px; font-weight: 700; font-size: 13px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.item { display: block; text-decoration: none; color: inherit; position: relative; transition: transform .15s, box-shadow .15s; }
.item:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(11, 16, 32, .05), 0 18px 40px rgba(11, 16, 32, .13); }
.item .im { position: relative; background: #eef1fb; }
.item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.item .gr { position: absolute; left: 12px; top: 12px; background: #fff; color: var(--blue-d); font-weight: 800; font-size: 12px; padding: 4px 11px; border-radius: 99px; box-shadow: 0 2px 8px rgba(11, 16, 32, .12); }
.item .r360 { position: absolute; right: 12px; bottom: 12px; background: rgba(11, 16, 32, .75); color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .06em; padding: 3px 9px; border-radius: 99px; }
.item .meta { padding: 14px 16px 16px; }
.item .name { font-weight: 800; font-size: 17px; line-height: 1.2; }
.item .line { color: var(--muted); font-size: 14px; margin-top: 2px; }
.item .bt { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; font-weight: 600; }
.item .bt i { flex: 1; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.item .bt i b { display: block; height: 100%; border-radius: 99px; }
.item .p { color: var(--blue); font-weight: 800; font-size: 25px; margin-top: 10px; letter-spacing: -.02em; }
.item.sold .im img { filter: grayscale(1); opacity: .55; }
.item.sold .p { color: var(--muted); text-decoration: line-through; }
.item .tag { position: absolute; left: 12px; top: 12px; z-index: 2; background: var(--bad); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 11px; border-radius: 99px; }
.item.sold .gr { display: none; }
.empty { text-align: center; color: var(--muted); padding: 50px 0; }

@media (max-width: 420px) {
  h1 { font-size: 26px; }
  .price { font-size: 40px; }
  .tile { padding: 12px 10px; gap: 10px; }
  .ico { width: 40px; height: 40px; }
}
