/* ============================================
   FONT BALOO 2 (self-hosted)
   Caricato dal sito stesso invece che da Google Fonts: il Garante
   Privacy italiano ha segnalato che caricare font da Google trasmette
   l'indirizzo IP dei visitatori senza base legale. Il file .woff2 e'
   in assets/fonts/.
   ============================================ */
@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/Baloo2-Bold.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================
   VARIABILI CSS - PALETTE PREMIUM
   ============================================ */
:root {
  --primary-dark: #1a1a1a;
  --accent-natural: #b9a184;
  --primary-light: #f7f4ef;
  --accent-warm: #8b7355;
  --text-dark: #333333;
  --text-light: #666666;
  --border-light: #e0e0e0;
  --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.12);
  --shadow-strong: 0 12px 35px rgba(0, 0, 0, 0.15);
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   RESET E STILI GLOBALI
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  background-color: var(--primary-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================================
   TIPOGRAFIA PREMIUM
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--primary-dark);
}

h1 {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

p {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.8;
}

/* ============================================
   HEADER E NAVIGAZIONE
   ============================================ */
header {
  background: white;
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition-smooth);
}

.navbar {
  padding: 1rem 0;
}

.navbar {
  position: relative;
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-dark) !important;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--primary-dark);
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem 0.5rem;
}

.brand-logo {
  height: 76px;
  width: 76px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin-right: 0.75rem;
}

.nav-link {
  color: var(--text-dark) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  position: relative;
  transition: var(--transition-smooth);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-natural);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--accent-natural) !important;
}

/* ============================================
   HERO BANNER PREMIUM
   ============================================ */
.hero-banner {
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--accent-warm) 100%
  );
  background-attachment: fixed;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Versione compatta per pagine di servizio (login, contatti, ecc.):
   l'utente deve arrivare al modulo/contenuto senza dover scorrere. */
.hero-banner.hero-compact {
  height: 30vh;
}

.hero-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--hero-bg-image, url("../assets/img/image0.jpeg")) center/cover;
  opacity: 0.15;
  z-index: 1;
}

.hero-banner .inner-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  animation: fadeInUp 1s ease-out;
}

.hero-banner h1 {
  color: white;
  font-size: 4rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-banner h1.font-baloo {
  font-family: "Baloo 2", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
}

.hero-banner p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.3rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-banner .btn-primary {
  background: var(--accent-natural);
  border: none;
  color: var(--primary-dark);
  padding: 15px 45px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-medium);
  animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-banner .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
  background: #c7b294;
}

/* ============================================
   SEZIONI GENERICHE
   ============================================ */
section {
  padding: 5rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.title-content {
  text-align: center;
  margin-bottom: 3rem;
}

.title-content h2 {
  position: relative;
  display: inline-block;
}

.title-content h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent-natural);
  border-radius: 2px;
}

.title-content p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-top: 1rem;
}

/* ============================================
   SEZIONE VANTAGGI
   ============================================ */
.features-section {
  background: white;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-box {
  padding: 2.5rem;
  background: var(--primary-light);
  border-left: 4px solid var(--accent-natural);
  border-radius: 8px;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-soft);
}

.feature-box:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-medium);
}

.feature-box h3 {
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.feature-box p {
  color: var(--text-light);
  line-height: 1.8;
}

/* ============================================
   SEZIONE PRODOTTI
   ============================================ */
.products-section {
  background: white;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
  border: 1px solid var(--border-light);
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-strong);
}

.product-image {
  position: relative;
  overflow: hidden;
  height: 280px;
  background: var(--primary-light);
}

.product-image img {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  object-fit: contain;
  padding: 0.6rem;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

.product-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.product-card:hover .product-image::after {
  left: 100%;
}

.product-info {
  padding: 1.5rem;
}

.product-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.product-price {
  font-size: 1.5rem;
  color: var(--accent-natural);
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.price-contact-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: var(--transition-smooth);
}

.price-contact-link:hover {
  color: var(--primary-dark);
}

.product-description {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.btn-cart {
  width: 100%;
  padding: 12px;
  background: var(--primary-dark);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.btn-cart:hover {
  background: var(--accent-natural);
  color: var(--primary-dark);
  transform: translateY(-2px);
}

/* ============================================
   SEZIONE TESTIMONIALI
   ============================================ */
.testimonials-section {
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--accent-warm) 100%
  );
  color: white;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
}

.stars {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.testimonial-text {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.95);
}

.testimonial-author {
  font-weight: 600;
  color: var(--accent-natural);
  font-size: 0.95rem;
}

/* ============================================
   SEZIONE NEWSLETTER
   ============================================ */
.newsletter-section {
  background: white;
  padding: 4rem 2rem;
}

.newsletter-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-content h2 {
  margin-bottom: 1rem;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-form input {
  flex: 1;
  min-width: 250px;
  padding: 15px 20px;
  border: 2px solid var(--border-light);
  border-radius: 6px;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--accent-natural);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.newsletter-form button {
  padding: 15px 40px;
  background: var(--accent-natural);
  color: var(--primary-dark);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.newsletter-form button:hover {
  background: #c7b294;
  transform: translateY(-2px);
}

/* ============================================
   SEZIONE CTA (Call To Action)
   ============================================ */
.cta-section {
  background: linear-gradient(
    135deg,
    var(--accent-natural) 0%,
    var(--accent-warm) 100%
  );
  color: white;
  text-align: center;
  padding: 4rem 2rem;
}

.cta-section h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.cta-section .btn-primary {
  background: var(--primary-dark);
  color: white;
  padding: 15px 45px;
  border: 2px solid white;
  transition: var(--transition-smooth);
}

.cta-section .btn-primary:hover {
  background: white;
  color: var(--primary-dark);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--primary-dark);
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
}

footer p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

footer a {
  color: var(--accent-natural);
  text-decoration: none;
  transition: var(--transition-smooth);
}

footer a:hover {
  text-decoration: underline;
}

/* ============================================
   CHATBOT WIDGET
   ============================================ */
.chatbot-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 350px;
  /* Altezza fissa (non solo massima): con tanti messaggi in chat,
     "max-height" da sola non basta a far scorrere la lista messaggi
     internamente in tutti i browser - il riquadro finiva per crescere
     comunque, spingendo l'intestazione (e la "x" per chiudere) fuori
     dallo schermo. Con un'altezza fissa i figli flessibili hanno un
     riferimento certo e lo scroll interno funziona sempre. */
  height: min(520px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-strong);
  /* Deve stare sopra la barra di navigazione in alto (z-index: 1000,
     position: sticky), altrimenti quando il riquadro e' alto la sua
     intestazione finisce coperta dalla barra. */
  z-index: 1001;
  overflow: hidden;
  animation: slideInUp 0.4s ease-out;
  transition: width 0.25s ease;
}

/* Stato "chiuso": solo un pulsante rotondo, non copre il contenuto sotto.
   Un leggero effetto pulsante attira l'occhio senza essere fastidioso. */
.chatbot-widget.collapsed {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: var(--shadow-medium);
  animation: chatbotPulse 2.5s ease-out infinite;
}

@keyframes chatbotPulse {
  0% {
    box-shadow: var(--shadow-medium), 0 0 0 0 rgba(185, 161, 132, 0.55);
  }
  70% {
    box-shadow: var(--shadow-medium), 0 0 0 14px rgba(185, 161, 132, 0);
  }
  100% {
    box-shadow: var(--shadow-medium), 0 0 0 0 rgba(185, 161, 132, 0);
  }
}

/* Fumetto suggerimento che compare una volta a chi arriva sul sito,
   per far notare che il chatbot esiste. */
.chatbot-hint {
  position: fixed;
  bottom: 86px;
  right: 20px;
  max-width: 220px;
  background: white;
  color: var(--primary-dark);
  padding: 0.7rem 1rem;
  border-radius: 14px 14px 4px 14px;
  box-shadow: var(--shadow-strong);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  z-index: 1002;
  animation: fadeInUp 0.4s ease-out;
}

.chatbot-widget.collapsed .chatbot-body {
  display: none !important;
}

.chatbot-widget.collapsed .chatbot-header {
  width: 56px;
  height: 56px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}

.chatbot-widget.collapsed .chatbot-header span {
  display: none;
}

.chatbot-widget.collapsed .chatbot-header button {
  font-size: 1.5rem;
}

.chatbot-header {
  background: var(--accent-natural);
  color: var(--primary-dark);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.chatbot-header button {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem;
  cursor: pointer;
  color: var(--primary-dark);
  transition: var(--transition-smooth);
}

.chatbot-header button:hover {
  transform: scale(1.2);
}

.chatbot-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0; /* permette alla lista messaggi di scorrere invece di spingere fuori l'intestazione */
}

.chatbot-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
  background: var(--primary-light);
}

.message {
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  animation: fadeInUp 0.3s ease-out;
}

.bot-message {
  background: var(--primary-dark);
  color: white;
  border-radius: 8px 8px 8px 0;
}

.bot-message p {
  color: white;
  margin: 0;
}

.user-message {
  background: var(--accent-natural);
  color: var(--primary-dark);
  margin-left: auto;
  max-width: 80%;
  border-radius: 8px 8px 0 8px;
}

.user-message p {
  color: var(--primary-dark);
  margin: 0;
}

/* Modulo "lascia la tua email" proposto dal bot quando non trova una
   risposta buona alle parole chiave, dentro il fumetto del bot. */
.chatbot-lead-form {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.chatbot-lead-form input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.6rem;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
}

.chatbot-lead-form button {
  padding: 0.5rem 0.8rem;
  background: var(--accent-natural);
  color: var(--primary-dark);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
}

.chatbot-lead-form button:hover {
  background: #c7b294;
}

.bot-message p.chatbot-lead-status {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.chatbot-input {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid var(--border-light);
  background: white;
  flex-shrink: 0; /* non deve mai essere schiacciato dal flex layout */
}

.chatbot-input input {
  flex: 1;
  padding: 0.8rem;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.chatbot-input input:focus {
  outline: none;
  border-color: var(--accent-natural);
}

.chatbot-input button {
  padding: 0.8rem 1.2rem;
  background: var(--accent-natural);
  color: var(--primary-dark);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chatbot-input button:hover {
  background: #c7b294;
}

/* ============================================
   ANIMAZIONI
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* ============================================
   CLASSI UTILITY
   ============================================ */
.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-nav {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
}

.price-label {
  margin-top: 1rem;
  color: var(--accent-natural);
  font-weight: 600;
}

#chatbotToggle {
  background: none;
  border: none;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 1.5rem;
}

#chatbotBody {
  display: none;
}

#chatbotBody.open {
  display: flex;
}

.title-content.white {
  color: white;
}

.title-content.white h2 {
  color: white;
}

.title-content.white p {
  color: rgba(255, 255, 255, 0.9);
}

.btn-link-primary {
  display: inline-block;
  padding: 15px 45px;
  text-decoration: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.2rem;
  }

  .brand-logo {
    height: 46px;
    width: 46px;
    margin-right: 0.5rem;
  }

  .navbar-toggle {
    display: block;
  }

  .navbar-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    background: white;
    position: absolute;
    top: 100%;
    left: 0;
    padding: 1.5rem;
    box-shadow: var(--shadow-medium);
    z-index: 500;
  }

  .navbar-nav.open {
    display: flex;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-banner h1 {
    font-size: 2.5rem;
  }

  .hero-banner p {
    font-size: 1.1rem;
  }

  .hero-banner .btn-primary {
    padding: 12px 30px;
    font-size: 1rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
  }

  .chatbot-widget {
    width: 90%;
    max-width: 350px;
    bottom: 10px;
    right: 10px;
    left: 10px;
  }

  .chatbot-widget.collapsed {
    width: 56px;
    left: auto;
  }

  .chatbot-hint {
    bottom: 76px;
    right: 10px;
    max-width: 180px;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
  }

  section {
    padding: 3rem 0;
  }

  .container {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero-banner {
    height: 60vh;
  }

  .hero-banner h1 {
    font-size: 1.8rem;
  }

  .hero-banner p {
    font-size: 1rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   UTILITÀ
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.text-center {
  text-align: center;
}

.mt-3 {
  margin-top: 3rem;
}

.mb-3 {
  margin-bottom: 3rem;
}

/* ============================================
   CARRELLO
   ============================================ */
.cart-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent-natural);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.cart-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary-dark);
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-medium);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 4000;
}

.cart-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}

.cart-item-row img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-info .cart-item-name {
  font-weight: 600;
  color: var(--primary-dark);
}

.cart-item-qty {
  width: 60px;
  padding: 0.4rem;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  text-align: center;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #c62828;
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
}

.cart-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  padding-top: 0.6rem;
  border-top: 2px solid var(--border-light);
  margin-top: 0.6rem;
}

.payment-option {
  display: block;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.8rem;
  cursor: pointer;
}

.payment-option input {
  margin-right: 0.6rem;
}

/* ============================================
   MODULO ORDINE PRODOTTO
   ============================================ */
.order-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 1rem;
}

.order-modal-overlay.active {
  display: flex;
}

.order-modal {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.25);
}

.order-modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

.order-modal h3 {
  margin-bottom: 0.3rem;
  color: var(--primary-dark);
}

.order-modal .order-product-name {
  color: var(--accent-natural);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.order-modal .form-group {
  margin-bottom: 1.2rem;
}

.order-modal label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.95rem;
}

.order-modal input,
.order-modal textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

.order-modal input:focus,
.order-modal textarea:focus {
  outline: none;
  border-color: var(--accent-natural);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.order-modal textarea {
  min-height: 90px;
  resize: vertical;
}

.order-modal-submit {
  width: 100%;
  padding: 14px;
  background: var(--accent-natural);
  color: var(--primary-dark);
  border: none;
  border-radius: 6px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.order-modal-submit:hover {
  background: #c7b294;
}

.order-modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.order-modal-status {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.95rem;
}

.order-modal input[type="number"] {
  max-width: 120px;
}

.order-total {
  font-weight: 600;
  color: var(--primary-dark);
  background: #f5f5f5;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

/* ============================================
   MODULI GENERICI (Contatti, Login, Registrazione, Account)
   ============================================ */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #1a1a1a;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-natural);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.form-submit {
  width: 100%;
  padding: 15px;
  background: var(--accent-natural);
  color: #1a1a1a;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.form-submit:hover {
  background: #c7b294;
  transform: translateY(-2px);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.95rem;
}

.form-footnote {
  text-align: center;
  margin-top: 1.5rem;
  color: #666;
}

.form-footnote a {
  color: var(--accent-natural);
  font-weight: 600;
  text-decoration: none;
}

.form-footnote a:hover {
  text-decoration: underline;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.contact-item {
  text-align: center;
  padding: 2rem;
  background: #f5f5f5;
  border-radius: 12px;
}

.contact-item h3 {
  color: var(--accent-natural);
  margin-bottom: 1rem;
}

.contact-item p {
  color: #666;
}

/* Tabelle (usate nel pannello Admin e nell'Area Utente) */
.data-table-wrapper {
  overflow-x: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.data-table th,
.data-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
}

.data-table th {
  background: #f5f5f5;
  color: var(--primary-dark);
  font-weight: 600;
}

.data-table select {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-family: inherit;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.stat-card .stat-value {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-natural);
}

.stat-card .stat-label {
  color: #666;
  margin-top: 0.3rem;
}

/* ============================================
   TAG STATO ORDINE
   ============================================ */
.status-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.status-tag--in-attesa {
  background: #fff3cd;
  color: #856404;
}

.status-tag--ordinato {
  background: #cfe2ff;
  color: #084298;
}

.status-tag--spedito {
  background: #cff4fc;
  color: #055160;
}

.status-tag--incassato {
  background: #d1e7dd;
  color: #0f5132;
}

.status-tag--annullato {
  background: #f8d7da;
  color: #842029;
}

.order-tracking {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.6;
}
