:root {
  --rv-bg: #161514;
  --rv-bg2: #1e1d1b;
  --rv-border: #2e2c28;
  --rv-cream: #ebe8e2;
  --rv-muted: #9a948b;
  --rv-gold: #a39786;
  --rv-gold-h: #b5a896;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-display: "Lora", Georgia, serif;
  /* Liquid glass (vetro) — superfici leggibili su sfondi scuri */
  --rv-glass-tint: rgba(255, 255, 255, 0.09);
  --rv-glass-tint-deep: rgba(18, 17, 16, 0.42);
  --rv-glass-edge: rgba(255, 255, 255, 0.2);
  --rv-glass-inner: rgba(255, 255, 255, 0.12);
  --rv-label-field: #c9bfb0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
.rv-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--rv-bg);
  color: var(--rv-cream);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
}

.rv-body {
  padding-bottom: max(5rem, env(safe-area-inset-bottom, 0));
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

.rv-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding-left: max(1.35rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.35rem, env(safe-area-inset-right, 0px));
}

/* Telefoni grandi (es. iPhone Pro Max): colonna più “stretta”, margini più simmetrici */
@media (min-width: 390px) and (max-width: 767px) {
  .rv-inner {
    padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
  }
}

@media (min-width: 768px) {
  .rv-inner {
    padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
  }
}

.rv-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--rv-border);
  background: rgba(22, 21, 20, 0.92);
  backdrop-filter: blur(10px);
}

.rv-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.rv-logo {
  flex-shrink: 0;
}

.rv-logo .rv-logo-svg {
  display: block;
  width: clamp(9.5rem, 32vw, 14rem);
  height: auto;
  max-height: 5.65rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

@media (max-width: 480px) {
  .rv-logo .rv-logo-svg {
    width: clamp(8rem, 58vw, 11.5rem);
    max-height: 4.85rem;
  }
}

.rv-logo:focus-visible {
  outline: 2px solid var(--rv-gold);
  outline-offset: 4px;
  border-radius: 0.35rem;
}

/* Fallback testuale se manca logo-rivando.svg */
.rv-logo-mark {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.2em;
  color: var(--rv-gold);
}

.rv-logo-sub {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--rv-muted);
}

.rv-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.rv-lang-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-right: 0.25rem;
  padding-right: 0.65rem;
  border-right: 1px solid var(--rv-border);
}

.rv-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.28rem 0.4rem;
  border-radius: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--rv-muted);
  border: 1px solid transparent;
  text-transform: none;
}

.rv-lang-btn:hover {
  color: var(--rv-gold-h);
  border-color: rgba(163, 151, 134, 0.35);
  background: rgba(163, 151, 134, 0.08);
}

.rv-lang-btn--current {
  color: var(--rv-bg);
  background: var(--rv-gold);
  border-color: var(--rv-gold);
}

.rv-lang-btn--current:hover {
  color: var(--rv-bg);
  background: var(--rv-gold-h);
  border-color: var(--rv-gold-h);
}

.rv-nav a:hover {
  color: var(--rv-gold);
}

.rv-nav-home {
  font-weight: 600;
  color: var(--rv-cream);
}

.rv-nav-home:hover {
  color: var(--rv-gold-h);
}

.rv-btn-cart {
  border: 1px solid rgba(163, 151, 134, 0.4);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  color: var(--rv-gold);
}

.rv-btn-cart:hover {
  background: rgba(163, 151, 134, 0.1);
}

.rv-badge {
  display: inline-block;
  min-width: 1.25rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--rv-gold);
  color: var(--rv-bg);
  font-size: 0.65rem;
  font-weight: 600;
  vertical-align: middle;
}

.rv-main {
  flex: 1;
}

.rv-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rv-border);
  padding: 4rem 0 5rem;
}

.rv-hero-bg {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(90, 98, 92, 0.22) 0%, transparent 58%);
}

.rv-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--rv-gold);
}

.rv-h1 {
  margin: 1.25rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 500;
  line-height: 1.15;
  max-width: 40rem;
}

.rv-lead {
  margin-top: 1.25rem;
  max-width: 32rem;
  color: var(--rv-muted);
  font-size: 1.05rem;
}

.rv-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.rv-btn-primary {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  background: var(--rv-gold);
  color: #1a1917;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.rv-btn-primary:hover {
  background: var(--rv-gold-h);
}

.rv-btn-ghost {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  border: 1px solid var(--rv-border);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.rv-btn-ghost:hover {
  border-color: rgba(163, 151, 134, 0.45);
}

/** Secondario: ben visibile su sfondo scuro (es. «Aggiorna carrello») */
.rv-btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  border: 1px solid var(--rv-gold);
  color: var(--rv-cream);
  background: rgba(163, 151, 134, 0.14);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.rv-btn-secondary:hover {
  background: rgba(163, 151, 134, 0.26);
  border-color: var(--rv-gold-h);
}

.rv-section {
  padding: 4rem 0;
}

.rv-grid-3 {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .rv-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.rv-block {
  border-left: 2px solid rgba(163, 151, 134, 0.35);
  padding-left: 1.25rem;
}

.rv-block h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
}

.rv-block p {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--rv-muted);
}

.rv-section-alt {
  border-top: 1px solid var(--rv-border);
  background: var(--rv-bg2);
}

.rv-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.rv-platform-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .rv-platform-list {
    grid-template-columns: 1fr 1fr;
  }
}

.rv-platform-list a,
.rv-platform-list .rv-pl-inactive {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--rv-border);
  background: var(--rv-bg);
}

.rv-platform-list a:hover {
  border-color: rgba(163, 151, 134, 0.35);
}

.rv-pl-inactive {
  border-style: dashed;
  color: var(--rv-muted);
}

.rv-pl-go {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--rv-gold);
}

.rv-pl-soon {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.rv-page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
}

/* Checkout: conferma ordine */
.rv-order-success {
  text-align: center;
  max-width: 26rem;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 4rem;
}

.rv-order-success-title {
  margin-top: 0.5rem;
}

.rv-order-success-lead {
  margin-top: 1rem;
  max-width: none;
}

.rv-order-success-ref {
  margin: 1.75rem auto 0;
  padding: 1.15rem 1.35rem;
  max-width: 20rem;
  border-radius: 0.65rem;
  border: 1px solid var(--rv-border);
  background: var(--rv-bg2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.rv-order-success-ref-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--rv-muted);
  margin-bottom: 0.5rem;
}

.rv-order-success-ref-value {
  display: block;
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--rv-gold);
}

.rv-order-success-note {
  margin-top: 1rem;
  font-size: 0.85rem;
}

.rv-order-success-outro {
  margin-top: 1.5rem;
}

.rv-order-success-actions {
  margin-top: 2rem;
}

.rv-muted {
  color: var(--rv-muted);
}

.rv-product-grid {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 2rem;
  align-items: stretch;
}

.rv-product-grid > li {
  display: flex;
  min-width: 0;
}

@media (min-width: 640px) {
  .rv-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .rv-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Catalogo: pannello più venduti / sconti settimana + filtro merceologia */
.rv-catalog-hero-wrap {
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.rv-catalog-hero-block--promo .rv-catalog-hero-h {
  color: var(--rv-gold-h);
}

.rv-catalog-hero-h {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  letter-spacing: 0.02em;
}

.rv-catalog-carousel {
  position: relative;
  border-radius: 0.5rem;
  border: 1px solid var(--rv-border);
  background: linear-gradient(165deg, rgba(30, 29, 27, 0.95), rgba(22, 21, 20, 0.98));
  padding: 0.65rem 0.5rem;
  overflow: hidden;
}

.rv-catalog-carousel:focus-visible {
  outline: 2px solid var(--rv-gold);
  outline-offset: 2px;
}

.rv-catalog-carousel-track {
  display: flex;
  flex-direction: row;
  gap: 0.875rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.25rem 0.35rem 0.65rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.rv-catalog-carousel-track::-webkit-scrollbar {
  height: 6px;
}

.rv-catalog-carousel-track::-webkit-scrollbar-thumb {
  background: rgba(163, 151, 134, 0.35);
  border-radius: 3px;
}

.rv-catalog-hero-slide {
  flex: 0 0 min(11.5rem, 72vw);
  scroll-snap-align: start;
  min-width: 0;
}

.rv-catalog-hero-slide-link {
  display: block;
  border-radius: 0.4rem;
  overflow: hidden;
  border: 1px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
}

.rv-catalog-hero-slide-link:hover {
  border-color: rgba(163, 151, 134, 0.4);
  transform: translateY(-2px);
}

.rv-catalog-hero-img {
  position: relative;
  aspect-ratio: 3/4;
  background: #0003;
  overflow: hidden;
}

.rv-catalog-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rv-catalog-hero-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 8rem;
  font-size: 0.78rem;
  color: var(--rv-muted);
  padding: 0.5rem;
  text-align: center;
}

.rv-catalog-hero-badge {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.28rem 0.45rem;
  border-radius: 4px;
  background: linear-gradient(135deg, #5c3d2e, #3d2418);
  color: #f0e6dc;
  border: 1px solid rgba(255, 200, 160, 0.25);
  max-width: calc(100% - 0.9rem);
  text-align: center;
  line-height: 1.2;
}

.rv-catalog-hero-title {
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0.5rem 0.15rem 0.15rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rv-catalog-hero-price {
  margin: 0 0.15rem 0.35rem;
  font-size: 0.88rem;
  color: var(--rv-gold-h);
  font-variant-numeric: tabular-nums;
}

.rv-catalog-sector-panel {
  margin-top: 2rem;
  padding: 1.1rem 1.15rem 1.2rem;
  border-radius: 0.5rem;
  border: 1px solid var(--rv-border);
  background: linear-gradient(165deg, rgba(35, 34, 32, 0.98), rgba(22, 21, 20, 0.99));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.rv-catalog-sector-heading {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--rv-cream);
  margin: 0 0 0.85rem;
}

.rv-catalog-sector-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.65rem;
}

.rv-catalog-sector-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--rv-cream);
  border-radius: 0.45rem;
  border: 1px solid var(--rv-border);
  background: rgba(255, 255, 255, 0.04);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.rv-catalog-sector-btn:hover {
  border-color: rgba(163, 151, 134, 0.45);
  background: rgba(163, 151, 134, 0.12);
  color: #f5f2ed;
}

.rv-catalog-sector-btn:focus-visible {
  outline: 2px solid var(--rv-gold);
  outline-offset: 2px;
}

.rv-catalog-sector-btn--active {
  border-color: rgba(163, 151, 134, 0.65);
  background: linear-gradient(160deg, rgba(163, 151, 134, 0.22), rgba(80, 72, 64, 0.35));
  color: #faf8f5;
  box-shadow: 0 0 0 1px rgba(163, 151, 134, 0.15);
}

.rv-catalog-sector-btn--active:hover {
  border-color: rgba(181, 168, 150, 0.75);
  background: linear-gradient(160deg, rgba(163, 151, 134, 0.28), rgba(90, 82, 72, 0.4));
}

.rv-catalog-pick-sector {
  margin-top: 1.25rem;
  max-width: 40rem;
}

.rv-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--rv-border);
  background: var(--rv-bg2);
  transition: border-color 0.2s;
}

.rv-card:hover {
  border-color: rgba(163, 151, 134, 0.35);
}

.rv-card-img-wrap {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 3/4;
  background: #0003;
  overflow: hidden;
}

.rv-card-img {
  position: relative;
  flex-shrink: 0;
  display: block;
  height: 100%;
  min-height: 0;
}

.rv-card-img-wrap .rv-card-img {
  aspect-ratio: unset;
}

.rv-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rv-card-soldout-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: linear-gradient(
    145deg,
    rgba(18, 16, 14, 0.55) 0%,
    rgba(80, 20, 20, 0.5) 45%,
    rgba(18, 16, 14, 0.65) 100%
  );
}

.rv-sold-out-stamp {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4.5vw, 1.85rem);
  font-weight: 600;
  letter-spacing: 0.28em;
  color: #ff5252;
  text-transform: uppercase;
  text-shadow:
    0 0 22px rgba(255, 60, 60, 0.75),
    0 0 42px rgba(180, 30, 30, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.9);
  animation: rv-soldout-pulse 2.4s ease-in-out infinite;
}

@keyframes rv-soldout-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    opacity: 0.92;
    transform: scale(1.045);
    filter: brightness(1.12);
  }
}

.rv-card--soldout {
  border-color: rgba(120, 50, 50, 0.45);
}

.rv-card-soldout-msg {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--rv-border);
  font-size: 0.88rem;
}

.rv-sold-out-inline {
  color: #ff6b6b;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
  text-shadow: 0 0 12px rgba(255, 80, 80, 0.35);
}

.rv-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1rem;
}

.rv-card-body h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.rv-card-body h2 a:hover {
  color: var(--rv-gold);
}

.rv-card-body .rv-desc {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--rv-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rv-price {
  margin-top: 0.75rem;
  font-weight: 600;
  color: var(--rv-gold);
}

/* Catalogo: aggiungi al carrello dalla card */
.rv-card-cart {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--rv-border);
}

.rv-card-no-stock {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--rv-border);
  font-size: 0.85rem;
}

.rv-card-cart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.75rem;
  align-items: end;
}

@media (max-width: 420px) {
  .rv-card-cart-row {
    grid-template-columns: 1fr;
  }
}

.rv-card-cart .rv-card-cart-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  min-width: 0;
}

.rv-card-cart .rv-card-cart-field span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rv-label-field);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* iOS / Apple-style liquid glass — select nel catalogo e scheda prodotto */
.rv-glass-select {
  position: relative;
  display: block;
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid var(--rv-glass-edge);
  background:
    linear-gradient(155deg, var(--rv-glass-inner) 0%, transparent 42%),
    linear-gradient(0deg, var(--rv-glass-tint-deep) 0%, rgba(40, 38, 35, 0.55) 100%),
    var(--rv-glass-tint);
  backdrop-filter: blur(28px) saturate(1.75);
  -webkit-backdrop-filter: blur(28px) saturate(1.75);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 -1px 0 rgba(0, 0, 0, 0.18) inset,
    0 8px 28px rgba(0, 0, 0, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.2);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.18s ease;
}

.rv-glass-select:focus-within {
  border-color: rgba(181, 168, 150, 0.55);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 0 0 1px rgba(163, 151, 134, 0.28),
    0 12px 36px rgba(0, 0, 0, 0.42);
}

.rv-catalog-page .rv-glass-select:active {
  transform: scale(0.992);
}

.rv-glass-select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0.62rem 2.25rem 0.62rem 0.85rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--rv-cream);
  -webkit-text-fill-color: var(--rv-cream);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.35;
  cursor: pointer;
}

.rv-glass-select select option,
.rv-glass-select select optgroup {
  background: var(--rv-bg2);
  color: var(--rv-cream);
}

/* Lista tendina nativa: forza tema scuro (Safari/Chrome/Firefox — dove supportato) */
.rv-catalog-page .rv-glass-select,
.rv-store-form .rv-glass-select {
  color-scheme: dark;
}

.rv-catalog-page .rv-glass-select select,
.rv-store-form .rv-glass-select select {
  color-scheme: dark;
  background-color: rgba(16, 15, 13, 0.94) !important;
  -webkit-text-fill-color: var(--rv-cream);
}

.rv-catalog-page .rv-glass-select select option,
.rv-catalog-page .rv-glass-select select optgroup,
.rv-store-form .rv-glass-select select option,
.rv-store-form .rv-glass-select select optgroup {
  background-color: #141311;
  color: var(--rv-cream);
}

.rv-glass-select select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.rv-glass-select-chevron {
  position: absolute;
  right: 0.78rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: -0.22rem;
  border-right: 2px solid rgba(181, 168, 150, 0.95);
  border-bottom: 2px solid rgba(181, 168, 150, 0.95);
  transform: rotate(45deg);
  pointer-events: none;
  opacity: 0.92;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4));
}

.rv-glass-select--qty select {
  text-align: center;
  padding-left: 0.5rem;
  padding-right: 2rem;
}

/* Catalogo: lista nativa del select (tema coerente, leggibile) */
.rv-catalog-page .rv-catalog-select {
  color-scheme: dark;
}

.rv-catalog-page .rv-catalog-native-select {
  min-height: 2.35rem;
  border-radius: 0.65rem;
  accent-color: var(--rv-gold);
  background-color: rgba(16, 15, 13, 0.94) !important;
  color: var(--rv-cream);
  -webkit-text-fill-color: var(--rv-cream);
}

.rv-catalog-page .rv-catalog-native-select option,
.rv-catalog-page .rv-catalog-native-select optgroup {
  background-color: #141311;
  color: var(--rv-cream);
  padding: 0.4rem 0.5rem;
}

.rv-card-cart .rv-card-qty {
  max-width: 100%;
}

/* Pulsante acquisto — vetro (stile iOS / Apple) */
.rv-btn-glass-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.55rem;
  padding: 0.72rem 1.15rem;
  border: 1px solid var(--rv-glass-edge);
  border-radius: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rv-cream);
  -webkit-text-fill-color: var(--rv-cream);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.16) 0%, transparent 48%),
    linear-gradient(180deg, rgba(163, 151, 134, 0.35) 0%, rgba(90, 82, 72, 0.45) 100%);
  backdrop-filter: blur(22px) saturate(1.65);
  -webkit-backdrop-filter: blur(22px) saturate(1.65);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 -1px 0 rgba(0, 0, 0, 0.2) inset,
    0 10px 32px rgba(0, 0, 0, 0.38);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, filter 0.15s ease;
}

.rv-btn-glass-primary:hover {
  border-color: rgba(255, 255, 255, 0.32);
  filter: brightness(1.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.24) inset,
    0 14px 40px rgba(0, 0, 0, 0.45);
}

.rv-btn-glass-primary:active {
  transform: scale(0.988);
}

.rv-card-add-btn.rv-btn-glass-primary {
  width: 100%;
  margin-top: 0.5rem;
}

.rv-card-cart button[type="submit"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Catalogo: modal quantità (sostituisce alert) */
body.rv-modal-open {
  overflow: hidden;
}

.rv-modal[hidden] {
  display: none !important;
}

.rv-modal:not([hidden]) {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0));
  box-sizing: border-box;
}

.rv-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 7, 6, 0.52);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
}

.rv-modal-panel--verify-email {
  width: min(26rem, calc(100vw - 2.5rem));
  max-width: calc(100vw - 2rem);
}

.rv-modal-panel {
  position: relative;
  z-index: 1;
  width: min(22rem, 100%);
  padding: 1.5rem 1.35rem 1.35rem;
  border-radius: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(34, 32, 29, 0.78);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 24px 56px rgba(0, 0, 0, 0.48);
  animation: rv-catalog-modal-in 0.24s ease;
}

/* Admin magazzino: modal anagrafica fornitori — largo, basso scroll interno, azioni sempre visibili */
.rv-modal-panel--suppliers {
  width: min(52rem, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
  max-height: min(88vh, calc(100dvh - 2rem));
  padding: 1rem 1.15rem 0.85rem;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.rv-suppliers-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.2rem;
  margin-right: -0.2rem;
}

.rv-suppliers-modal-scroll .rv-form label {
  margin-bottom: 0.5rem;
}

.rv-suppliers-modal-scroll .rv-form label:last-of-type {
  margin-bottom: 0;
}

.rv-supplier-form-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.85rem;
}

@media (max-width: 36rem) {
  .rv-supplier-form-cols {
    grid-template-columns: 1fr;
  }
}

.rv-suppliers-modal-actions {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.75rem 0 0;
  margin-top: 0.65rem;
  border-top: 1px solid var(--rv-border);
}

.rv-suppliers-modal-actions .rv-btn-primary {
  margin: 0;
}

@media (max-width: 28rem) {
  .rv-suppliers-modal-actions {
    grid-template-columns: 1fr;
  }
}

@keyframes rv-catalog-modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.rv-modal-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.3;
}

.rv-modal-msg {
  margin: 0 0 1.2rem;
  font-size: 0.9rem;
  color: var(--rv-muted);
  line-height: 1.55;
}

.rv-modal-ok {
  width: 100%;
  border: 0;
  cursor: pointer;
}

/* Toast “aggiunto al carrello” (catalogo, senza ricaricare) */
.rv-catalog-toast {
  position: fixed;
  z-index: 250;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0));
  transform: translate3d(-50%, calc(100% + 2rem), 0);
  max-width: min(22rem, calc(100% - 2rem));
  padding: 0.8rem 1.35rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(34, 32, 29, 0.94);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  color: var(--rv-cream);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.rv-catalog-toast--visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

/* Carrello: rimuovi riga */
.rv-btn-cart-remove {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(180, 100, 100, 0.6);
  background: rgba(80, 35, 35, 0.35);
  color: #e8b4b4;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.rv-btn-cart-remove:hover {
  background: rgba(100, 45, 45, 0.5);
  border-color: rgba(220, 140, 140, 0.55);
  color: #fff;
}

/* Carrello: input quantità — glass minimale (allineato al catalogo) */
.rv-table td.rv-table-qty {
  vertical-align: middle;
  white-space: nowrap;
}

.rv-glass-qty {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  min-width: 4.25rem;
  max-width: 5.5rem;
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid var(--rv-glass-edge);
  background:
    linear-gradient(155deg, var(--rv-glass-inner) 0%, transparent 42%),
    linear-gradient(0deg, var(--rv-glass-tint-deep) 0%, rgba(40, 38, 35, 0.55) 100%),
    var(--rv-glass-tint);
  backdrop-filter: blur(28px) saturate(1.75);
  -webkit-backdrop-filter: blur(28px) saturate(1.75);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 -1px 0 rgba(0, 0, 0, 0.18) inset,
    0 8px 28px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rv-glass-qty:focus-within {
  border-color: rgba(181, 168, 150, 0.55);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 0 0 1px rgba(163, 151, 134, 0.28),
    0 12px 36px rgba(0, 0, 0, 0.42);
}

.rv-glass-qty .rv-cart-qty {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0.48rem 0.45rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--rv-cream);
  font-family: inherit;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  line-height: 1.35;
}

.rv-glass-qty .rv-cart-qty::placeholder {
  color: var(--rv-muted);
}

.rv-glass-qty .rv-cart-qty::-webkit-outer-spin-button,
.rv-glass-qty .rv-cart-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.rv-glass-qty .rv-cart-qty[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.rv-product-layout {
  margin-top: 2rem;
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .rv-product-layout {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.rv-product-title {
  font-size: clamp(1.5rem, 5vw, 2rem);
}

.rv-product-img {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--rv-border);
  background: #0003;
}

.rv-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rv-product-gallery-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rv-product-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rv-product-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.35rem;
  overflow: hidden;
  background: none;
  cursor: pointer;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

.rv-product-thumb.active {
  border-color: var(--rv-gold);
}

.rv-product-thumb img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  display: block;
}

.rv-admin-gallery-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.rv-admin-gallery-preview img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--rv-border);
}

.rv-admin-product-table thead th {
  background: var(--rv-bg);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rv-muted);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.rv-admin-product-table tbody td {
  vertical-align: middle;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.rv-form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

/* Admin modifica prodotto: interruttore catalogo online (non usare checkbox grezzo) */
.rv-product-publish {
  margin: 1.25rem 0 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rv-border);
}

.rv-form .rv-product-publish label.rv-switch {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.45rem;
  cursor: pointer;
  user-select: none;
}

.rv-switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.rv-switch-track {
  position: relative;
  flex-shrink: 0;
  width: 3.15rem;
  height: 1.78rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--rv-border);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rv-switch-track::after {
  content: "";
  position: absolute;
  width: 1.38rem;
  height: 1.38rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #f5f2ec 0%, #ddd8cf 100%);
  top: 0.18rem;
  left: 0.22rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.rv-switch-input:checked + .rv-switch-track {
  background: rgba(163, 151, 134, 0.42);
  border-color: rgba(163, 151, 134, 0.75);
}

.rv-switch-input:checked + .rv-switch-track::after {
  transform: translateX(1.35rem);
}

.rv-switch-input:focus-visible + .rv-switch-track {
  box-shadow: 0 0 0 2px rgba(163, 151, 134, 0.45);
}

.rv-form .rv-product-publish .rv-switch-text {
  display: inline;
  margin: 0;
  padding: 0;
  color: var(--rv-cream);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.35;
}

.rv-switch-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--rv-muted);
  line-height: 1.45;
  max-width: 28rem;
}

/* Etichette campo (es. «Nome») — non applicare a .rv-switch-track / .rv-switch-text o il toggle si sballa */
.rv-form label:not(.rv-switch) > span {
  display: block;
  color: var(--rv-muted);
  margin-bottom: 0.35rem;
}

/* Negozio: etichette (Taglia, Qtà) sempre visibili — non ereditare grigi/bianchi illeggibili sul vetro */
.rv-store-form label > span {
  color: var(--rv-label-field);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.rv-catalog-page .rv-card-cart.rv-store-form .rv-card-cart-field > span {
  color: var(--rv-label-field);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.rv-form input,
.rv-form textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--rv-border);
  border-radius: 0.35rem;
  background: var(--rv-bg2);
  color: var(--rv-cream);
  font: inherit;
}

.rv-alert {
  padding: 0.75rem 1rem;
  border-radius: 0.35rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.rv-alert-error {
  background: #3d1818;
  color: #f5c2c2;
}

.rv-alert-ok {
  background: #1a2e1a;
  color: #c2f5c2;
}

.rv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.rv-table th,
.rv-table td {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--rv-border);
  text-align: left;
}

.rv-footer {
  border-top: 1px solid var(--rv-border);
  background: var(--rv-bg2);
  margin-top: auto;
}

.rv-footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2.5rem 0;
}

@media (min-width: 768px) {
  .rv-footer-inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.rv-footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  color: var(--rv-gold);
}

.rv-footer-text {
  margin: 0.35rem 0 0;
  max-width: 22rem;
  font-size: 0.9rem;
  color: var(--rv-muted);
}

.rv-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.9rem;
  color: var(--rv-muted);
}

.rv-footer-links a:hover {
  color: var(--rv-gold);
}

.rv-footer-admin {
  font-size: 0.75rem;
  opacity: 0.6;
}

.rv-footer-legal {
  border-top: 1px solid var(--rv-border);
  padding-top: 1.5rem;
  padding-bottom: 0;
  display: grid;
  gap: 1.25rem;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--rv-muted);
}

@media (min-width: 768px) {
  .rv-footer-legal {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.rv-footer-legal-title {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rv-cream);
}

.rv-footer-legal-text {
  margin: 0;
}

.rv-footer-legal a {
  color: var(--rv-gold);
}

.rv-footer-legal a:hover {
  text-decoration: underline;
}

.rv-footer-copy {
  border-top: 1px solid var(--rv-border);
  padding: 1rem max(1.35rem, env(safe-area-inset-left, 0px)) 1rem max(1.35rem, env(safe-area-inset-right, 0px));
  text-align: center;
  font-size: 0.7rem;
  color: var(--rv-muted);
}

@media (min-width: 390px) and (max-width: 767px) {
  .rv-footer-copy {
    padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
  }
}

@media (min-width: 768px) {
  .rv-footer-copy {
    padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
  }
}

/* Pagina Contatti */
.rv-contact-page {
  padding-bottom: 3rem;
}

.rv-contact-grid {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .rv-contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.rv-contact-card {
  border: 1px solid var(--rv-border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  background: var(--rv-bg2);
}

.rv-contact-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--rv-gold);
}

.rv-contact-card-role {
  margin: 0.35rem 0 1rem;
  font-size: 0.8rem;
  color: var(--rv-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rv-contact-address {
  margin: 0 0 1rem;
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--rv-cream);
}

.rv-contact-line {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--rv-muted);
}

.rv-contact-line a {
  color: var(--rv-gold);
}

.rv-contact-line a:hover {
  text-decoration: underline;
}

@media (min-width: 900px) {
  .rv-contact-grid--3 {
    grid-template-columns: 1.15fr 1fr 1fr;
    align-items: start;
  }
}

.rv-contact-card--form .rv-contact-form {
  margin-top: 0.5rem;
}

/* Floating contatti (telefono + WhatsApp) */
.rv-fab-wrap {
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right, 0));
  bottom: max(0.75rem, env(safe-area-inset-bottom, 0));
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.rv-body--admin .rv-fab-wrap {
  display: none;
}

.rv-fab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rv-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.rv-fab-ico {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.rv-fab-label {
  white-space: nowrap;
}

.rv-fab--phone {
  background: var(--rv-bg2);
  color: var(--rv-cream);
  border: 1px solid var(--rv-border);
}

.rv-fab--phone:hover {
  border-color: rgba(163, 151, 134, 0.45);
  color: var(--rv-gold-h);
}

.rv-fab--wa {
  background: #2d4f3f;
  color: #e8f0ec;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.rv-fab--wa:hover {
  background: #355a48;
  color: #fff;
}

/* Admin — acquisto magazzino: select curati */
.rv-select-wrap {
  position: relative;
  display: block;
  min-width: 7rem;
  max-width: 100%;
}

.rv-select-wrap--wide {
  min-width: 11rem;
  max-width: 16rem;
}

/* Form admin (nuovo prodotto, modifica prodotto, fornitori): select a tutta larghezza etichetta */
.rv-body--admin .rv-form label .rv-select-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.rv-body--admin .rv-form label .rv-select-wrap.rv-select-wrap--wide {
  max-width: 100%;
}

.rv-select-wrap::after {
  content: "";
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--rv-gold);
  pointer-events: none;
  opacity: 0.8;
}

.rv-select-wrap select.rv-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border-radius: 0.45rem;
  border: 1px solid var(--rv-border);
  background: var(--rv-bg);
  color: var(--rv-cream);
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rv-select-wrap select.rv-select:hover {
  border-color: rgba(163, 151, 134, 0.5);
}

.rv-select-wrap select.rv-select:focus {
  outline: none;
  border-color: var(--rv-gold);
  box-shadow: 0 0 0 2px rgba(163, 151, 134, 0.2);
}

.rv-sp-input {
  width: 100%;
  max-width: 6.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.4rem;
  border: 1px solid var(--rv-border);
  background: var(--rv-bg);
  color: var(--rv-cream);
  font-family: inherit;
  font-size: 0.82rem;
}

.rv-sp-input:focus {
  outline: none;
  border-color: var(--rv-gold);
  box-shadow: 0 0 0 2px rgba(163, 151, 134, 0.15);
}

.rv-sp-input--num {
  max-width: 4rem;
}

.rv-sp-table td {
  vertical-align: middle;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Chosen-style: prodotto in acquisto fornitore */
.rv-combobox--wide {
  min-width: 12rem;
  max-width: 22rem;
}

.rv-chosen--size {
  min-width: 5.5rem;
  max-width: 11rem;
}

.rv-chosen {
  position: relative;
  width: 100%;
}

.rv-chosen-field {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 0.45rem;
  border: 1px solid var(--rv-border);
  background: var(--rv-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rv-chosen--open .rv-chosen-field,
.rv-chosen-field:focus-within {
  border-color: var(--rv-gold);
  box-shadow: 0 0 0 2px rgba(163, 151, 134, 0.2);
}

.rv-chosen-input {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0.5rem 0.45rem 0.5rem 0.75rem !important;
  margin: 0;
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--rv-cream);
  border-radius: 0.45rem;
}

.rv-chosen-input::placeholder {
  color: var(--rv-muted);
  opacity: 0.9;
}

.rv-chosen-input:focus {
  outline: none;
}

.rv-chosen-clear {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  margin-right: 0;
  padding: 0;
  border: none;
  border-radius: 0.3rem;
  background: transparent;
  color: var(--rv-muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rv-chosen-clear:hover {
  color: #e8a0a0;
  background: rgba(102, 51, 51, 0.2);
}

.rv-chosen-arrow {
  flex-shrink: 0;
  width: 0;
  height: 0;
  margin-right: 0.65rem;
  margin-left: 0.1rem;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--rv-gold);
  opacity: 0.75;
  pointer-events: none;
}

.rv-chosen--filled .rv-chosen-arrow {
  opacity: 0.45;
}

.rv-chosen-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 100;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  max-height: 16rem;
  overflow-y: auto;
  border-radius: 0.45rem;
  border: 1px solid rgba(163, 151, 134, 0.35);
  background: var(--rv-bg2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* Magazzino: lista ancorata al viewport (evita clip da overflow-x sul contenitore tabella) */
.rv-chosen-dropdown.rv-chosen-dropdown--fixed {
  right: auto;
  z-index: 100000 !important;
}

/* Acquisto fornitore: campo prodotto leggibile; tendina sopra la tabella (JS append a body + fixed) */
.rv-sp-scroll-wrap {
  position: relative;
}

.rv-sp-table .rv-chosen[data-rv-chosen] {
  min-width: 15rem;
  max-width: 22rem;
}

.rv-sp-table .rv-chosen-field {
  min-height: 2.35rem;
  align-items: center;
}

.rv-sp-table .rv-chosen-input {
  font-size: 0.84rem;
  line-height: 1.35;
}

.rv-chosen-option {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  line-height: 1.4;
  cursor: pointer;
  color: var(--rv-cream);
  border-left: 3px solid transparent;
}

.rv-chosen-option:hover {
  background: rgba(163, 151, 134, 0.08);
}

.rv-chosen-option--active {
  background: rgba(163, 151, 134, 0.18);
  border-left-color: var(--rv-gold);
}

.rv-chosen-line-name {
  font-weight: 500;
}

.rv-chosen-line-sep {
  color: var(--rv-muted);
  font-weight: 400;
}

.rv-chosen-line-sku {
  color: var(--rv-muted);
  font-size: 0.76rem;
  font-family: ui-monospace, monospace;
}

.rv-chosen-match {
  padding: 0 0.05em;
  margin: 0 -0.05em;
  border-radius: 0.15rem;
  background: rgba(163, 151, 134, 0.45);
  color: var(--rv-bg);
  font-weight: 600;
}

.rv-sp-vat-cell {
  min-width: 9.5rem;
}

.rv-sp-vat-out {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--rv-muted);
}

.rv-sp-vat-out strong {
  color: var(--rv-cream);
  font-weight: 600;
}

/* ========== Responsive (layout mobile / tablet) ========== */
.rv-checkout-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
  grid-template-columns: 1fr;
  max-width: 900px;
}

@media (min-width: 900px) {
  .rv-checkout-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    align-items: start;
  }
}

.rv-form-row-2 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .rv-form-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.rv-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 2rem;
}

.rv-cart-table {
  min-width: 580px;
}

.rv-cart-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: flex-end;
  align-items: center;
}

@media (max-width: 540px) {
  .rv-cart-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .rv-cart-actions .rv-btn-primary,
  .rv-cart-actions .rv-btn-secondary {
    text-align: center;
  }
}

@media (max-width: 640px) {
  .rv-header-inner {
    flex-wrap: wrap;
    row-gap: 0.75rem;
  }

  .rv-lang-switch {
    width: 100%;
    justify-content: flex-end;
    border-right: 0;
    padding-right: 0;
    margin-right: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rv-border);
  }

  .rv-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem 0.85rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .rv-hero {
    padding: 2.5rem 0 3rem;
  }

  .rv-section {
    padding: 2.5rem 0;
  }

  .rv-page-title {
    font-size: clamp(1.65rem, 7vw, 2.5rem);
  }
}

@media (max-width: 380px) {
  .rv-btn-primary,
  .rv-btn-ghost,
  .rv-btn-secondary {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}
