/* ========== PALETTE COLORI - TERRA DI TOSCANA ========== */
:root {
  /* Palette principale */
  --primary-color: #D4845C; /* Terracotta */
  --primary-dark: #B86F4D;
  --secondary-color: #7A9B76; /* Verde oliva */
  --accent-color: #E8B84D; /* Oro miele */
  --text-color: #4A3F35; /* Marrone scuro */
  --text-light: #6B5D52;
  --bg-light: #F5EFE6; /* Crema */
  --bg-white: #FDFBF7;
  
  /* Palette alternativa - Campagna Verde (commenta quella sopra e usa questa) */
  /*
  --primary-color: #8BA888;
  --primary-dark: #6F8C6C;
  --secondary-color: #A67C52;
  --accent-color: #D4A574;
  --text-color: #3D4A3E;
  --text-light: #5F7464;
  --bg-light: #FAF8F3;
  --bg-white: #FFFFFF;
  */
  
  /* Ombre e transizioni */
  --shadow-sm: 0 2px 8px rgba(74, 63, 53, 0.08);
  --shadow-md: 0 4px 12px rgba(74, 63, 53, 0.12);
  --shadow-lg: 0 8px 20px rgba(74, 63, 53, 0.15);
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--text-color);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.section-padding {
  padding: 80px 0;
}

.section-title {
  font-size: 2.3rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ========== NAVBAR ========== */
.navbar-custom {
  background-color: var(--bg-white) !important;
  box-shadow: var(--shadow-sm);
  padding: 0.8rem 0;
  border-bottom: 3px solid var(--primary-color);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-color) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand .text-warning {
  color: var(--accent-color) !important;
}

.logo-img {
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.navbar-nav .nav-link {
  font-size: 0.95rem;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: var(--transition);
  color: var(--text-color);
  position: relative;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
  width: 70%;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color);
}

/* ========== HERO CAROUSEL - IMMAGINI OTTIMIZZATE ========== */
.carousel.slide {
  margin-top: 70px;
}

.carousel-item {
  height: 70vh;
  min-height: 450px;
  position: relative;
  overflow: hidden;
}

/* ✅ SOLUZIONE: Immagini meno zoomate */
.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Aggiungi scale per ridurre lo zoom */
  transform: scale(0.95);
  object-position: center center;
  transition: transform 8s ease-in-out;
}

/* Effetto zoom al passaggio (opzionale) */
.carousel-item.active img {
  transform: scale(1);
}

/* Overlay scuro più leggero per vedere meglio l'immagine */
.carousel-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(74, 63, 53, 0.3), rgba(74, 63, 53, 0.6));
  z-index: 1;
}

.carousel-caption {
  bottom: 30%;
  z-index: 2;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.carousel-caption h1 {
  font-size: 2.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease;
  color: #fff;
}

.carousel-caption p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  animation: fadeInUp 1.2s ease;
  color: #fff;
}

/* Indicatori personalizzati */
.carousel-indicators [data-bs-target] {
  background-color: var(--accent-color);
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

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

/* ========== CHI SIAMO ========== */
#about {
  background-color: var(--bg-white);
}

.about-carousel {
  position: relative;
  height: 600px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.about-slide {
  display: none;
  width: 100%;
  height: 100%;
}

.about-slide.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

.about-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Riempie tutto lo spazio senza bande */
  object-position: center center;
  border-radius: 15px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(212, 132, 92, 0.8);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.carousel-btn:hover {
  background-color: var(--primary-color);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: 15px; }
.carousel-btn.next { right: 15px; }

/* Social Icons */
.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-social {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-social:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.btn-social.facebook { background-color: #3b5998; }
.btn-social.tiktok { background-color: #000; }
.btn-social.instagram { 
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); 
}
.btn-social.whatsapp { background-color: #25d366; }

/* ========== PRODOTTI - TUTTI VISIBILI ========== */
#products {
  background-color: var(--bg-light);
}

.product-info-grid {
  max-width: 900px;
  margin: 2rem auto;
  display: grid;
  gap: 1.2rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border-left: 4px solid var(--primary-color);
}

.info-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.info-item i {
  color: var(--primary-color);
  font-size: 1.5rem;
  min-width: 30px;
}

.info-item p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-light);
}

.info-item a {
  color: var(--primary-color);
  font-weight: 600;
  transition: color 0.2s;
}

.info-item a:hover {
  color: var(--primary-dark);
}

/* ✅ CARD PRODOTTI FLIPPABILI */
.products-carousel {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.product-card-wrapper {
  perspective: 1000px; /* Necessario per l'effetto 3D */
  height: 450px;
}

.product-card {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  cursor: pointer;
}

.product-card.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-white);
  box-shadow: var(--shadow-md);
  border: 2px solid transparent;
  transition: var(--transition);
}

/* FRONTE della card */
.card-front {
  display: flex;
  flex-direction: column;
}

.card-front:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.card-front img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: center center;
}

.card-front .product-info {
  padding: 1.5rem;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-front .product-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-front .product-info .price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0.5rem 0;
}

.btn-flip {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  margin-top: auto;
}

.btn-flip:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

/* RETRO della card */
.card-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-details {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-details h3 {
  font-size: 1.3rem;
  color: var(--text-color);
  margin-bottom: 1rem;
  text-align: center;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.details-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* ✅ Allinea tutto in alto */
  gap: 1rem; /* Spazio uniforme tra gli elementi */
}

.details-content .description {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 0; /* ✅ Rimosso margine */
  text-align: justify;
}

.details-content .price-detail {
  font-size: 1.1rem;
  color: var(--text-color);
  text-align: center;
  margin-bottom: 0; /* ✅ Rimosso margine */
  margin-top: auto; /* ✅ Spinge il prezzo verso il basso */
}

.details-content .price-detail strong {
  color: var(--primary-color);
  font-size: 1.3rem;
}

.btn-flip-back {
  background: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.btn-flip-back:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

/* ========== CONTATTI ========== */
#contact {
  background: var(--bg-white);
}

.contact-card {
  background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
  padding: 2.5rem 1.5rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--primary-color);
  transition: var(--transition);
  height: 100%;
}

.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-dark);
}

.contact-card i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  transition: transform 0.3s;
}

.contact-card:hover i {
  transform: scale(1.15) rotate(5deg);
}

.contact-card .fa-phone { color: var(--accent-color); }
.contact-card .fa-envelope { color: var(--primary-color); }
.contact-card .fa-whatsapp { color: #25d366; }

.contact-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.contact-card p {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.contact-card a {
  color: var(--primary-color);
  transition: color 0.2s;
}

.contact-card a:hover {
  color: var(--primary-dark);
}

.contact-card .btn-success {
  background-color: #25d366;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  margin-top: 1rem;
  transition: var(--transition);
  font-weight: 600;
}

.contact-card .btn-success:hover {
  background-color: #1ebe5b;
  transform: scale(1.05);
}

/* ========== FOOTER ========== */
footer {
  padding: 2rem 0;
  background: linear-gradient(135deg, var(--text-color) 0%, var(--primary-dark) 100%);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.btn-social-footer {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  transition: var(--transition);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-social-footer:hover {
  transform: translateY(-5px) scale(1.1);
  border-color: #fff;
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.btn-social-footer.facebook { background-color: #3b5998; }
.btn-social-footer.tiktok { background-color: #000; }
.btn-social-footer.instagram { 
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); 
}
.btn-social-footer.whatsapp { background-color: #25d366; }

.footer-links a {
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent-color) !important;
}

/* ========== PRIVACY PAGES ========== */
.privacy-section {
  background: var(--bg-white);
  min-height: 100vh;
  padding-top: 120px;
}

.privacy-content {
  background: #fff;
  padding: 3rem;
  border-radius: 15px;
  box-shadow: var(--shadow-md);
}

.privacy-content h2 {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

.privacy-content h3 {
  color: var(--text-color);
  font-size: 1.3rem;
  margin-top: 1.5rem;
}

.privacy-content p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.privacy-content ul {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.privacy-content ul li {
  margin-bottom: 0.5rem;
}

.privacy-content a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.privacy-content a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.privacy-content .btn-primary {
  background: var(--primary-color);
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 25px;
  transition: var(--transition);
  color:  #fff;
}

.privacy-content .btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: #fff;
}

@media (max-width: 767px) {
  .privacy-content {
    padding: 1.5rem;
  }
  
  .privacy-content h2 {
    font-size: 1.5rem;
  }
}

/* ========== RESPONSIVE ========== */

/* Desktop grande - 5 prodotti per riga */
@media (min-width: 1400px) {
  .products-carousel {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Desktop - 5 prodotti per riga (leggermente più stretti) */
@media (min-width: 992px) and (max-width: 1399px) {
  .products-carousel {
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
  }
  
  .product-card img {
    height: 200px;
  }
  
  .product-info {
    padding: 1rem;
  }
  
  .product-info h3 {
    font-size: 1rem;
  }
}

/* Tablet - 2 prodotti per riga */
@media (max-width: 991px) {
  .section-title {
    font-size: 2rem;
  }

  .carousel-caption h1 {
    font-size: 2rem;
  }

  .carousel-caption p {
    font-size: 1rem;
  }

  .carousel-item {
    height: 60vh;
  }

  .about-carousel {
    height: 600px;
    margin-bottom: 2rem;
  }

  .products-carousel {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  .product-card-wrapper {
    height: 420px;
  }

  .card-front img {
    height: 220px;
  }
}

/* Mobile - 1 prodotto per riga */
@media (max-width: 767px) {
  .section-padding {
    padding: 50px 0;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .carousel-item {
    height: 50vh;
    min-height: 350px;
  }

  .carousel-item img {
    transform: scale(0.9);
  }

  .carousel-caption {
    bottom: 15%;
  }

  .carousel-caption h1 {
    font-size: 1.5rem;
  }

  .carousel-caption p {
    font-size: 0.9rem;
  }

  .about-carousel {
    height: 400px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .social-icons {
    justify-content: center;
  }

  .product-info-grid {
    gap: 1rem;
  }

  .info-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .products-carousel {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .product-card-wrapper {
    height: 450px;
  }

  .card-front img {
    height: 200px;
  }

  .product-details {
    padding: 1rem;
  }

  .details-content .description {
    font-size: 0.85rem;
  }
}

/* Mobile molto piccoli */
@media (max-width: 480px) {
  .navbar-brand {
    font-size: 1.2rem;
  }

  .carousel-caption h1 {
    font-size: 1.2rem;
  }

  .carousel-caption p {
    display: none; /* Nascondi su schermi molto piccoli */
  }
}