/* Rarelist — minimal design system (no build step) */

:root{
  --rl-bg: #0b0f14;
  --rl-surface: rgba(255,255,255,.06);
  --rl-surface-2: rgba(255,255,255,.10);
  --rl-border: rgba(255,255,255,.14);
  --rl-text: rgba(255,255,255,.92);
  --rl-muted: rgba(255,255,255,.68);
  --rl-soft: rgba(255,255,255,.78);

  --rl-radius-lg: 22px;
  --rl-radius-md: 16px;
  --rl-radius-sm: 12px;

  --rl-shadow-1: 0 12px 34px rgba(0,0,0,.35);
  --rl-shadow-2: 0 22px 60px rgba(0,0,0,.45);

  --rl-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --rl-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Variabili per categoria: generati da partials/category-palette-styles.php (data/category_palette.json) */

body{
  margin:0;
  font-family: var(--rl-font);
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(255,255,255,.08), transparent 55%),
    radial-gradient(900px 600px at 95% 0%, rgba(255,255,255,.06), transparent 52%),
    linear-gradient(180deg, var(--rl-tint-2, #0b0f14) 0%, var(--rl-bg) 70%);
  color: var(--rl-text);
}

a{ color: inherit; }
.rl-wrap{ max-width: 980px; margin: 0 auto; padding: 20px 18px 44px; }

.rl-header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(8,10,13,.62);
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.rl-header-inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.rl-header-cat{
  display: flex;
  align-items: center;
  gap: 10px;
}
.rl-header-cat__label{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.rl-header-cat__wrap{
  position: relative;
}
.rl-cat-select{
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  min-width: 168px;
  padding: 8px 32px 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.92);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .02em;
  box-shadow: 0 4px 18px rgba(0,0,0,.2);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.rl-cat-select option{
  color: #0D0D0D;
  background: #ffffff;
}
.rl-cat-select:hover{
  border-color: rgba(212,175,55,.35);
  background: rgba(255,255,255,.1);
}
.rl-cat-select:focus{
  outline: none;
  border-color: rgba(212,175,55,.55);
  box-shadow: 0 0 0 3px rgba(212,175,55,.15);
}
.rl-header-cat__wrap::after{
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -3px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid rgba(255,255,255,.55);
  pointer-events: none;
}
.rl-brand{
  display:flex;
  align-items:center;
  gap: 10px;
  text-decoration:none;
}
.rl-brand img{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  object-fit: cover;
  background: rgba(255,255,255,.06);
}
.rl-brand .name{
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(255,255,255,.90);
}

.rl-card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid var(--rl-border);
  border-radius: var(--rl-radius-lg);
  box-shadow: var(--rl-shadow-1);
  overflow: hidden;
}

.rl-pill{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--rl-soft);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .02em;
  text-decoration:none;
}
.rl-pill strong{ color: var(--rl-text); font-weight: 700; }

.rl-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration:none;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: var(--rl-text);
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}
.rl-btn:hover{ transform: translateY(-1px); }
.rl-btn:active{ transform: translateY(0); }
.rl-btn-primary{
  border-color: rgba(212,175,55,.55);
  background: #D4AF37;
  color: #0D0D0D;
  box-shadow: 0 16px 42px rgba(0,0,0,.40), 0 0 0 6px rgba(212,175,55,.10);
}
.rl-btn-primary .rl-dot{
  width:10px;height:10px;border-radius:99px;
  background: #0D0D0D;
  box-shadow: 0 0 0 6px rgba(0,0,0,.10);
}

.rl-footer{
  margin-top: 18px;
  text-align:center;
  color: var(--rl-muted);
  font-size: .88rem;
  line-height: 1.55;
}
.rl-footer a{ color: var(--rl-accent-2, #F2EDE4); text-decoration:none; border-bottom: 1px dashed rgba(255,255,255,.22); }
.rl-footer a:hover{ border-bottom-color: rgba(255,255,255,.45); }

/* Homepage — Pinterest-style board */
.home-page .rl-header-inner{ max-width: 1400px; }
.home-page .rl-wrap--wide{ max-width: 1400px; width: 100%; box-sizing: border-box; }
.home-intro{ padding: 12px 0 28px; }
.home-intro h1{
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  letter-spacing: -.03em;
  line-height: 1.15;
  font-weight: 800;
  color: rgba(255,255,255,.94);
}
.home-intro p{
  margin: 0;
  color: var(--rl-muted);
  line-height: 1.65;
  font-size: clamp(.98rem, 1.35vw, 1.08rem);
  max-width: 68ch;
}

/* Griglia esplicita: righe da 5 colonne su desktop (no masonry a colonne che “balla” tra 4 e 5). */
.pin-board{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
@media (max-width: 1020px){
  .pin-board{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px){
  .pin-board{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Mobile: sempre 2 card per riga (no colonna singola su schermi stretti). */
@media (max-width: 520px){
  .pin-board{ gap: 12px; }
}

/* Griglie testuali / insight: 2 colonne su telefono, poi auto-fit come prima. */
.rl-grid-insights{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.rl-grid-insights--compact{
  gap: 10px;
}
@media (min-width: 520px){
  .rl-grid-insights{
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

.home-load-more-wrap{
  display: flex;
  justify-content: center;
  padding: 28px 0 8px;
}
.home-load-more{
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.06);
  color: var(--rl-text);
  font-weight: 700;
  font-size: .95rem;
  padding: 12px 22px;
  border-radius: 999px;
}
.home-load-more:hover{ background: rgba(255,255,255,.1); }
.home-load-more[hidden]{ display: none; }

.pin-card-link{
  display: block;
  text-decoration: none;
  color: inherit;
}
.pin-card-link:focus-visible{
  outline: 2px solid rgba(212,175,55,.75);
  outline-offset: 3px;
  border-radius: var(--rl-radius-lg);
}

.pin-card{
  margin-bottom: 0;
  border-radius: var(--rl-radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--rl-shadow-1);
  background: #0a0c0e;
  --pin-cta: #D4AF37;
  --pin-pill-bg: rgba(0,0,0,.55);
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s ease, border-color .35s ease;
}
.pin-card-link:hover .pin-card{
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(0,0,0,.42), 0 0 0 1px rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.18);
}
.pin-card-link:hover .pin-card__visual::after{
  opacity: 1;
}

/* Homepage — prime 5 card: sola sovraesposizione leggera sulla foto (::before); resto come le altre */
.pin-card-link--hero .pin-card__visual{
  overflow: hidden;
}
.pin-card-link--hero .pin-card__visual::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--pin-cover);
  background-size: cover;
  background-position: center;
  filter: brightness(0.9);
  transition: filter 0.45s ease;
  pointer-events: none;
}
.pin-card-link--hero:hover .pin-card__visual::before{
  filter: brightness(1.1);
}
.pin-card-link--hero .pin-card__inset{
  z-index: 1;
}
.pin-card-link--hero .pin-card__grad{
  z-index: 1;
}
.pin-card-link--hero .pin-card__overlay{
  z-index: 2;
}

@media (prefers-reduced-motion: reduce){
  .pin-card-link--hero .pin-card__visual::before{
    transition: none;
  }
}

.pin-card__visual{
  position: relative;
  min-height: 420px;
  background-size: cover;
  background-position: center;
}
.pin-card__visual::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255,255,255,.12) 0%, transparent 42%, transparent 58%, rgba(255,255,255,.04) 100%);
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: none;
  z-index: 1;
}
.pin-card__inset{
  position: absolute;
  inset: 0.65rem;
  border-radius: 18px;
  box-shadow: inset 0 0 0 2px var(--pin-inset, rgba(255,255,255,.22));
  pointer-events: none;
  z-index: 0;
}

/* Lot page: cleaner card (no border) */
.lot-page .rl-card{
  border: 0;
}
.lot-page .lot-top-cta{
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
}
.lot-page .rl-cta-note{
  margin-top: 6px;
  display: block;
  font-size: .76rem;
  line-height: 1.3;
  color: var(--rl-muted);
}
.lot-page .cta-block .rl-cta-note{
  margin-top: 4px;
  display: block;
}
.lot-page .lot-no-reserve-badge{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(212,175,55,.45);
  background: rgba(212,175,55,.14);
  color: rgba(255,255,255,.9);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.lot-page .lot-realized{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(212,175,55,.45);
  background: linear-gradient(180deg, rgba(212,175,55,.22), rgba(212,175,55,.12));
  box-shadow: 0 14px 34px rgba(0,0,0,.35);
}
.lot-page .lot-realized .k{
  font-size:.75rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  color: rgba(255,255,255,.62);
  font-weight:700;
}
.lot-page .lot-realized .v{
  font-variant-numeric: tabular-nums;
  font-weight:800;
  color: rgba(255,255,255,.94);
}
.lot-page .lot-details{
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.10);
}
.lot-page .lot-details-title{
  margin: 0 0 10px;
  font-size: 1rem;
  letter-spacing: .01em;
}
.lot-page .lot-details-table{
  width:100%;
  border-collapse: collapse;
}
.lot-page .lot-details-table th,
.lot-page .lot-details-table td{
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  vertical-align: top;
}
.lot-page .lot-details-table th{
  width: 42%;
  color: rgba(255,255,255,.72);
  font-weight: 700;
  text-transform: none;
}
.lot-page .lot-details-table td{
  color: rgba(255,255,255,.9);
}
.pin-card__grad{
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, transparent 34%, rgba(0,0,0,.08) 58%, rgba(0,0,0,.62) 100%);
  pointer-events: none;
  z-index: 1;
}
.pin-card__overlay{
  position: absolute;
  inset: 0;
  padding: 14px 14px 64px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}
.pin-card__testid{
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.82);
  margin: 0;
  text-shadow: 0 2px 14px rgba(0,0,0,.55);
  text-align: center;
  width: 100%;
}
.pin-card__title{
  margin: 0;
  font-size: clamp(1.05rem, 1.65vw, 1.22rem);
  font-weight: 100 !important;
  line-height: 1.18;
  letter-spacing: -.02em;
  color: rgba(255,255,255,.96);
  text-shadow: 0 2px 18px rgba(0,0,0,.55);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: center;
}

.pin-card__footer{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 54px;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: #D4AF37;
  color: #0D0D0D;
}
.pin-card__footer-left{
  font-weight: 400;
  font-size: .82rem;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pin-card__footer-right{
  font-weight: 900;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.12);
  transition: background .18s ease, filter .18s ease, border-color .18s ease;
  cursor: pointer;
}
.pin-card-link:hover .pin-card__footer-right{
  background: rgba(255,255,255,.28);
  border-color: rgba(255,255,255,.28);
}
.pin-card__footer-right:hover{
  background: rgba(255,255,255,.34);
  border-color: rgba(255,255,255,.34);
}

.pin-card-link--hidden{ display: none !important; }
.pin-card-link--filter-hidden{ display: none !important; }

.home-empty{
  padding: 28px 16px;
  text-align: center;
  color: var(--rl-muted);
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: var(--rl-radius-md);
}

