/* ==========================================================================
   ke-menu.css – Restyling menù cliente (da QR/link, ottimizzato per telefono)
   Solo stile: stesso flusso d'ordine e stessa logica slot. Micro-transizioni leggere.
   ========================================================================== */
:root {
  --km-brand: #9a6534;
  --km-brand-strong: #7a4e27;
  --km-ink: #1f1a15;
  --km-muted: #5c5248;
  --km-line: #ece3d7;
  --km-bg: #faf7f2;
}
body { background-color: var(--km-bg) !important; color: var(--km-ink); -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 3px solid #d9a86c !important; outline-offset: 2px; }

/* Transizioni brevi */
.transition-all, .transition, .transition-colors, .transition-transform { transition-duration: 150ms !important; }
.duration-300, .duration-500 { transition-duration: 180ms !important; }
/* Niente animazioni decorative (restano spinner e indicatori rossi) */
.animate-bounce, .animate-pulse:not([class*="red"]), .animate-ping:not([class*="red"]) { animation: none !important; }

/* Card prodotto */
.menu-card {
  border-color: var(--km-line) !important;
  border-radius: 18px !important;
  box-shadow: 0 1px 2px rgba(31, 26, 21, .04), 0 8px 20px -14px rgba(74, 47, 23, .25) !important;
}
.menu-card:hover { border-color: #e0cbb0 !important; transform: none !important; }
.menu-card:active { transform: scale(.995); }
.menu-card img { transition: transform .3s ease; }
@media (hover: hover) { .menu-card:hover img { transform: scale(1.03); } }
.menu-card button { min-height: 44px; }

/* Barra categorie: scorrimento orizzontale fluido */
.sticky.top-14 { border-bottom-color: var(--km-line) !important; background: rgba(250, 247, 242, .96) !important; }
.sticky.top-14 .overflow-x-auto { scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.sticky.top-14 .overflow-x-auto > * { scroll-snap-align: start; }
.sticky.top-14 button, .sticky.top-14 a { min-height: 40px; }

/* Barra carrello fluttuante */
#floating-cart > div { box-shadow: 0 14px 32px -12px rgba(122, 78, 39, .55) !important; }
#floating-cart button { min-height: 48px; }
#cart-badge-count { display: inline-block; }
.ke-bump { animation: keBump .32s cubic-bezier(.2, .8, .3, 1.4); }
@keyframes keBump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.ke-added { animation: keAdded .45s ease; }
@keyframes keAdded { 0% { box-shadow: 0 0 0 0 rgba(154, 101, 52, .45); } 100% { box-shadow: 0 0 0 10px rgba(154, 101, 52, 0); } }

/* Form checkout: campi comodi e senza zoom automatico su iPhone */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: 16px !important; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px rgba(154, 101, 52, .15) !important; border-color: var(--km-brand) !important; outline: none; }

/* Modali come pannelli dal basso sul telefono */
@media (max-width: 639px) {
  /* solo i pannelli che stanno davvero in fondo allo schermo; quelli al centro restano arrotondati (21/11) */
  .fixed.inset-0:not(.items-center) > .rounded-3xl, .fixed.inset-0:not(.items-center) > .rounded-2xl { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
}

/* Avvisi al centro (maxi ordini, aggiungi alla Home): restano arrotondati sotto e stanno sempre nello schermo (21/11) */
#maxi-ordini-sheet, #pwa-install-sheet { border-radius: 24px !important; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }

/* Scheda del prodotto e ricerca ingredienti: stanno al centro, quindi arrotondate anche sotto (21/11) */
#product-detail-sheet, #ingredient-search-sheet { border-radius: 24px !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .menu-card:hover img { transform: none; }
}
