/* Blocca lo zoom al doppio tocco e velocizza i click */
html,
body {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%; /* Impedisce zoom del testo su rotazione */
}

/* Evita zoom automatico su input iOS */
input,
select,
textarea {
  font-size: 16px !important;
}
html {
  background-color: #232323;
}
body {
  background: #f8f9fa;
  min-height: 100vh;
}
.table-hover tbody tr:hover {
  background-color: #eef3ff;
}
.thumb-wrapper {
  width: 50px;
  height: 50px;
  background: #f3f3f3;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.thumb.loaded {
  opacity: 1;
}

/* Nasconde gli elementi finché Alpine non è pronto */
[x-cloak] {
  display: none !important;
}

.cursor-pointer {
  cursor: pointer;
}

.tabella_catalogo {
  margin-bottom: 100px;
}
/* ======================================== 
H: LOGIN
 ======================================== */
.pin-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin: 0 6px;
  border-radius: 50%;
  border: 2px solid #666;
  box-sizing: border-box;
  vertical-align: middle;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.pin-dot.filled {
  background-color: #ffffff;
  border-color: #ffffff;
}
/* ======================================== 
H: MINI CARRELLI
 ======================================== */
.carrello-top-desktop {
  position: sticky;
  top: 1rem;
  margin-left: auto;
  background: #fff;
  border-radius: 8px;
  width: 220px;
}

/* MOBILE/TABLET → barra fissa in basso */
.carrello-bottom-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffffee;
  backdrop-filter: blur(5px);
  border-top: 1px solid #ddd;
  z-index: 500;
  font-size: 0.85rem; /* più compatta */
}

@media (max-width: 576px) {
  .carrello-bottom-mobile {
    font-size: 0.8rem;
    padding: 0.6rem;
  }
}

/* Mostra il mini-carrello su DESKTOP e TABLET (>= 768px) */
@media (min-width: 768px) {
  .carrello-top-desktop {
    display: block;
  }
  .carrello-bottom-mobile {
    display: none;
  }
}

/* Mostra solo la barra mobile su tablet e smartphone */
@media (max-width: 767px) {
  .carrello-top-desktop {
    display: none;
  }
  .carrello-bottom-mobile {
    display: flex;
  }
}

/* ======================================== 
H: POPUP - SELEZIONE PRODOTTI
 ======================================== */

.popup-seleziona {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.popup-contenuto {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
}

.anim-add {
  animation: pulseAdd 0.3s ease-out;
}

@keyframes pulseAdd {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 transparent;
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 10px rgba(0, 150, 0, 0.3);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 transparent;
  }
}
/* ======================================== 
H: DETTAGLIO CARRELLO
 ======================================== */
/* overlay */
.carrello-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 4000;
}

/* contenitore */
.carrello-contenuto {
  background: #fff;
  width: 95%;
  max-width: 1100px; /* più largo su desktop */
  padding: 20px;
  border-radius: 12px;
  max-height: 95vh;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .carrello-contenuto {
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
    padding: 15px;
  }
}

/* ======================================== 
H: SLIDE IN CHECK OUT
 ======================================== */
/* Overlay (compatibile con Bootstrap) */
.checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  z-index: 1040; /* sopra modali BS */
}

/* Pannello slide-in */
.checkout-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;

  width: 95vw; /* quasi tutto lo schermo */
  min-width: 350px; /* limite minimo mobile */

  background: #fff;
  z-index: 1600;
  transform: translateX(100%);
  transition: transform 0.25s ease-out;
  box-shadow: -0.25rem 0 1rem rgba(0, 0, 0, 0.15);
}

.checkout-panel.show {
  transform: translateX(0);
}
