/* Reset e base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(180deg, #fff9f0 0%, #f9f5eb 100%);
  color: #4b3b1c;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: #fff;
  box-shadow: 0 4px 12px rgba(170, 108, 57, 0.1);
  position: sticky;
  top: 0;
  z-index: 1100;
}


.logo img {
  height: 80px;
  transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
}

.logo img:hover,
.logo img:focus {
  transform: scale(1.15);
  filter: brightness(1.1);
  box-shadow: 0 4px 10px rgba(170, 108, 57, 0.2);
  outline: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-family: 'Playfair Display', serif;
  transition: transform 0.3s ease;
}

.nav-link {
  color: #5e4b2b;
  text-decoration: none;
  font-size: 1.2rem;
  position: relative;
  padding-bottom: 6px;
  transition: color 0.3s ease;
}

.nav-link.active,
.nav-link:hover,
.nav-link:focus {
  color: #aa6c39;
  outline: none;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background: #aa6c39;
  transition: width 0.3s ease;
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Search Box */
.search-box input {
  height: 40px;
  border: 2px solid #c9b89e;
  border-radius: 9999px;
  font-size: 1rem;
  padding: 0 1rem;
  transition: border-color 0.3s ease;
  width: 200px;
}

.search-box input:focus {
  border-color: #aa6c39;
  outline: none;
}

@media (max-width: 768px) {
  .main-header {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
  }
  
  .search-box input {
    width: 100%;
    max-width: 400px;
  }
}

.lang-flags img.lang-flag {
  width: 28px;
  height: 20px;
  cursor: pointer;
  opacity: 0.7;
  border-radius: 3px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.lang-flags img.lang-flag.active,
.lang-flags img.lang-flag:hover,
.lang-flags img.lang-flag:focus {
  opacity: 1;
  transform: scale(1.15);
  outline: none;
}

#cartToggleBtn {
  font-size: 1.4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #5e4b2b;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease, transform 0.3s ease;
}

#cartToggleBtn:hover,
#cartToggleBtn:focus {
  color: #aa6c39;
  transform: scale(1.1);
  outline: none;
}

.cart-count {
  background: #aa6c39;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 9999px;
  transition: transform 0.3s ease;
}

#cartToggleBtn:hover .cart-count,
#cartToggleBtn:focus .cart-count {
  animation: bounce 0.3s ease;
}

/* Menu hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1200;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background: #aa6c39;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.nav-links.active {
  transform: translateX(0);
}

/* Breadcrumb */
.breadcrumb {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 1rem;
  font-size: 0.9rem;
  color: #5e4b2b;
}

.breadcrumb a {
  color: #aa6c39;
  text-decoration: none;
  transition: color 0.3s ease;
  outline: none;
}

.breadcrumb a:hover {
  color: #c78744;
  text-decoration: underline;
}

.breadcrumb span {
  margin: 0 0.5rem;
  color: #c9b89e;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 4rem 1.5rem;
  background: linear-gradient(135deg, #fff9f0 0%, #f9f5eb 100%);
  color: #4b3b1c;
  border-radius: 12px;
  margin: 2.5rem auto;
  max-width: 1200px;
  box-shadow: 0 4px 15px rgba(170, 108, 57, 0.1);
}

.hero-section h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #aa6c39;
}

.hero-section p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  color: #5e4b2b;
}

.cta-button {
  border: none; /* Rimuove il bordo */
  cursor: pointer; /* Aggiunge il cursore a manina */
  margin: 0 auto;
  background: #aa6c39;
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.3s ease;
  text-align: center;
}

.cta-button:hover,
.cta-button:focus {
  background: #c78744;
  transform: translateY(-2px);
  outline: none;
}

/* Products Section */
.products-section {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.products-section h1,
.products-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: #aa6c39;
  text-align: center;
  margin-bottom: 2rem;
}

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

.filters label {
  font-weight: 600;
  color: #5e4b2b;
}

.filters select {
  padding: 0.5rem;
  border: 2px solid #c9b89e;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.filters select:hover,
.filters select:focus {
  border-color: #aa6c39;
  outline: none;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  justify-items: center;
}

.product {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(170, 108, 57, 0.15);
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  border: 1px solid #e3d9bf;
}

.product:hover,
.product:focus-within {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(170, 108, 57, 0.25);
}

.product img {
  max-width: 100%;
  height: 300px;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.4s ease;
}

.product img:hover,
.product img:focus {
  transform: scale(1.1);
}

.product img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #f9f5eb;
  opacity: 0.5;
  animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
  to { opacity: 0; }
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Miglioramenti focus per accessibilità */
*:focus {
  outline: 2px solid #aa6c39;
  outline-offset: 2px;
}

/* Rimuovi outline marrone dai contenitori del carrello, ma lascialo su bottoni e link */
#cartSidebar *:focus,
#cartItems *:focus {
  outline: none !important;
  box-shadow: none !important;
}
#cartSidebar button:focus,
#cartSidebar button:focus-visible,
#cartSidebar [tabindex]:focus,
#cartSidebar [tabindex]:focus-visible {
  outline: 2px solid #aa6c39;
  outline-offset: 2px;
}

/* Disabilita outline marrone per logo, icone, hamburger, bandiere, menu */
.logo a:focus, .logo a:focus-visible,
.logo a img:focus, .logo a img:focus-visible,
.hamburger:focus, .hamburger:focus-visible,
.cart-icon:focus, .cart-icon:focus-visible,
.lang-flag:focus, .lang-flag:focus-visible,
.nav-link:focus, .nav-link:focus-visible,
.contact-icons a:focus img, .contact-icons a img:focus,
.contact-icons a:focus-visible img, .contact-icons a img:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  outline-offset: 0 !important;
}
.contact-icons a:focus,
.contact-icons a:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  outline-offset: 0 !important;
}

.nav-link:focus {
  outline: none;
}
.nav-link:focus-visible {
  outline: 2px solid #aa6c39;
  outline-offset: 2px;
  border-radius: 4px;
}
.lang-flag:focus {
  outline: none;
}
.lang-flag:focus-visible {
  outline: 2px solid #aa6c39;
  outline-offset: 2px;
  border-radius: 4px;
}
#cartToggleBtn:focus {
  outline: none;
}
#cartToggleBtn:focus-visible {
  outline: 2px solid #aa6c39;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Animazioni per feedback UX */
@keyframes bounce {
  0%, 20%, 60%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  80% {
    transform: translateY(-5px);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}

.product h3 {
  font-family: 'Playfair Display', serif;
  margin: 1rem 0 0.5rem;
  font-weight: 700;
  color: #5e4b2b;
}

.product p {
  font-weight: 600;
  color: #aa6c39;
  margin-bottom: 1rem;
}

.add-to-cart {
  background: #aa6c39;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.add-to-cart:hover,
.add-to-cart:focus {
  background: #c78744;
  transform: scale(1.05);
  outline: none;
}

.add-to-cart.added {
  background: #28a745;
  transform: scale(1.1);
  transition: background 0.3s ease, transform 0.3s ease;
}

.add-to-cart.added::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  color: white;
}

.add-to-cart::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.add-to-cart:active::after {
  width: 200px;
  height: 200px;
}

.color-select {
  margin: 0.5rem 0 1rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 1.5px solid #c9b89e;
  font-weight: 600;
  color: #5e4b2b;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.color-select:hover,
.color-select:focus {
  border-color: #aa6c39;
  outline: none;
}

/* Contacts Section */
.contacts-section {
  max-width: 350px;
  margin: 0 auto 5rem;
  text-align: center;
}

.contacts-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #aa6c39;
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.contact-icons a img {
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease;
}

.contact-icons a:hover img,
.contact-icons a:focus img {
  transform: scale(1.15);
  outline: none;
}

/* Footer */
footer {
  background: #f9f5eb;
  text-align: center;
  padding: 1.8rem 1rem;
  font-weight: 500;
  color: #6a5b3a;
  font-size: 0.9rem;
  box-shadow: inset 0 1px 2px rgba(170, 108, 57, 0.1);
  margin-top: auto;
}

/* Cart Sidebar */
#cartOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#cartOverlay.active {
  opacity: 1;
  pointer-events: auto;
  display: block;
}

#cartSidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  transition: transform 0.3s ease;
  transform: translateX(100%);
  visibility: hidden;
  z-index: 9999;
  overflow-y: auto;
}

#cartSidebar.active {
  transform: translateX(0);
  visibility: visible;
}


/* ✅ Versione desktop con larghezza fissa */
@media (min-width: 768px) {
  #cartSidebar {
    width: 400px;
  }
}


#cartSidebar.active {
  right: 0;
  animation: slideIn 0.4s ease forwards;
}

#cartSidebar:not(.active) {
  animation: slideOut 0.4s ease forwards;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #aa6c39;
  background: linear-gradient(90deg, #fff9f0 60%, #f9f5eb 100%);
  padding: 1.1rem 1.5rem 1.1rem 1.2rem;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 2px 10px rgba(170, 108, 57, 0.07);
  min-height: 56px;
}

/* Rimuovi outline dai prodotti (card) ma lascialo su bottoni/select/input */
.product:focus,
.product:focus-within {
  outline: none !important;
  box-shadow: none !important;
}
.product img:focus {
  outline: none !important;
  box-shadow: none !important;
}

#cartCloseBtn {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: #aa6c39;
  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;
}

#cartCloseBtn:hover,
#cartCloseBtn:focus {
  color: #c78744;
  transform: rotate(90deg) scale(1.3);
  outline: none;
}

#cartItems {
  flex-grow: 1;
  overflow-y: auto;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: #5e4b2b;
  min-height: 120px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  /* border-bottom: 1px solid #e3d9bf; */
  gap: 0.5rem;
}

.cart-item.removing {
  animation: fadeOut 0.3s ease forwards;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.cart-item-details {
  font-size: 0.85rem;
  color: #aa6c39;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.cart-qty-btn {
  background: #aa6c39;
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  transition: background 0.3s ease;
}

.cart-qty-btn:hover,
.cart-qty-btn:focus {
  background: #c78744;
  outline: none;
}

.cart-item-remove {
  background: transparent;
  border: none;
  color: #aa6c39;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.cart-item-remove:hover,
.cart-item-remove:focus {
  color: #c78744;
  outline: none;
}

#cartTotal {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #aa6c39;
  text-align: right;
}

#clearCartBtn,
#checkoutBtn {
  background: #aa6c39;
  border: none;
  color: white;
  padding: 0.6rem 1.2rem;
  width: 90%;
  max-width: 320px;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin: 0.5rem auto 0.8rem auto;
  display: block;
  transition: background 0.3s ease, transform 0.15s ease;
}

/* Separatore tra prodotti nel carrello */
.cart-item:not(:last-child) {
  border-bottom: 1.5px solid #e3d9bf;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
}

#clearCartBtn:hover,
#clearCartBtn:focus,
#checkoutBtn:hover,
#checkoutBtn:focus {
  background: #c78744;
  transform: scale(1.05);
  outline: none;
}

#checkoutBtn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Modal Spedizione */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: #fff9f0;
  box-shadow: 0 0 15px rgba(170, 108, 57, 0.3);
  padding: 2rem 2.5rem;
  width: 90%;
  max-width: 420px;
  border-radius: 10px;
  z-index: 1800;
  transition: transform 0.3s ease;
  pointer-events: none;
}

@media (max-width: 600px) {
  .modal {
    padding: 1rem 0.5rem 3.5rem 0.5rem !important; /* Più spazio in basso */
    max-width: 98vw !important;
    width: 98vw !important;
    font-size: 0.97rem !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) scale(0);
    border-radius: 7px !important;
    max-height: 95vh !important;
    overflow-y: auto !important; /* Scrollabile se serve */
    box-sizing: border-box;
  }
  .modal.active {
    transform: translate(-50%, -50%) scale(1) !important;
  }
  .modal label,
  .modal input {
    font-size: 1rem !important;
  }
  .form-buttons {
    flex-direction: column !important;
    gap: 0.7rem !important;
    margin-top: 1.2rem !important;
  }
  .form-buttons button {
    font-size: 1rem !important;
    padding: 0.7rem 0.2rem !important;
    width: 100% !important;
    margin: 0 !important;
  }
}

.modal.active {
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.modal h2 {
  font-family: 'Playfair Display', serif;
  color: #aa6c39;
  margin-bottom: 1.2rem;
  text-align: center;
}

.modal label {
  font-weight: 600;
  color: #5e4b2b;
  display: block;
  margin: 0.6rem 0 0.3rem;
}

.modal input {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  border: 1.8px solid #c9b89e;
  font-size: 1rem;
  color: #5e4b2b;
  transition: border-color 0.3s ease;
}

.modal input:focus {
  border-color: #aa6c39;
  outline: none;
}

.form-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 1.6rem;
}

.form-buttons button {
  flex: 1;
  margin: 0 0.3rem;
  background: #aa6c39;
  border: none;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.6rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.15s ease;
}

.form-buttons button:hover,
.form-buttons button:focus {
  background: #c78744;
  transform: scale(1.05);
  outline: none;
}

#shippingSubmitBtn {
  display: flex;
  align-items: center;
  justify-content: center;
}

#shippingSubmitBtn img {
  height: 20px;
  margin-right: 10px;
  vertical-align: middle;
}

/* Messaggio di caricamento */
#loadingMessage {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff9f0;
  padding: 1.5rem 2rem;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(170, 108, 57, 0.3);
  z-index: 2000;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #5e4b2b;
  display: none;
}

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  cursor: pointer;
}

#lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(170, 108, 57, 0.9);
}

/* Alert Overlay */
#alertOverlay {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #aa6c39cc;
  color: #fff;
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#alertOverlay.active {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* Tipi di alert diversi */
#alertOverlay.alert-success {
  background: #28a745cc;
}

#alertOverlay.alert-error {
  background: #dc3545cc;
}

#alertOverlay.alert-warning {
  background: #ffc107cc;
  color: #212529;
}

#alertOverlay.alert-info {
  background: #aa6c39cc;
}

/* Animazione immagine che "vola" al carrello */
.flying-image {
  position: fixed;
  z-index: 2000;
  pointer-events: none;
  transition: all 0.6s ease;
}

/* Keyframes per animazioni */
@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

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

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* Alert sempre verde */
#alertOverlay,
#alertOverlay.alert-success,
#alertOverlay.alert-warning,
#alertOverlay.alert-info,
#alertOverlay.alert-error {
  background: #28a745 !important;
  color: #fff !important;
}

/* Responsive */
/* Regole per schermi più piccoli */
@media (max-width: 768px) {
  /* ... altre regole per schermi più piccoli ... */

  /* Miglioramento carrello mobile */
  #cartSidebar {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    right: 0;
    left: 0;
    border-radius: 0;
    padding: 0 0 32px 0;
    box-shadow: none;
  }
  .cart-header {
    position: sticky;
    top: 0;
    background: #fff9f0;
    z-index: 1002;
    padding: 1.2rem 2.5rem 1.2rem 1.2rem;
    border-bottom: 1px solid #e3d9bf;
    min-height: 60px;
  }
  #cartCloseBtn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1003;
    font-size: 2.2rem;
    background: none;
    border: none;
    color: #aa6c39;
    padding: 0.2em 0.5em;
    line-height: 1;
  }
  #cartItems {
    padding: 1rem 0.5rem 0.5rem 0.5rem;
    min-height: 120px;
  }
  .cart-item {
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0;
  }
  .cart-item img {
    width: 48px;
    height: 48px;
  }
  .cart-item-info {
    width: 100%;
  }
  .cart-item-qty {
    margin-top: 0.3rem;
  }
  #cartTotal {
    font-size: 1rem;
    padding: 0.5rem 0.5rem 0 0.5rem;
    text-align: left;
  }
  #clearCartBtn, #checkoutBtn {
    font-size: 1rem;
    padding: 0.7rem;
    margin-bottom: 0;
  }

  /* Assicurati che il pulsante hamburger sia visibile e ben posizionato */
  .hamburger {
    display: flex; /* Mostra il pulsante hamburger solo su mobile */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100; /* Deve essere visibile sopra l'header */
  }

  /* Stile delle "linee" del menu hamburger */
  .hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #4b3b1c; /* Colore delle linee */
    border-radius: 10px;
    transition: all 0.3s ease;
  }

  /* Trasforma l'hamburger in una 'X' quando è attivo */
  .hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Stili del menu di navigazione mobile */
  .nav-links {
    flex-direction: column;
    position: fixed;
    top: 0;
    /* CAMBIATO: Posiziona il menu completamente fuori schermo a destra */
    left: 100%;
    width: 180px; /* Ridotto per migliorare la visibilità della X in mobile */
    height: 100%; /* Altezza piena della viewport */
    background: #fff9f0; /* Sfondo del menu */
    padding-top: 8rem; /* Spazio per l'header per evitare sovrapposizioni */
    box-shadow: -4px 0 12px rgba(170, 108, 57, 0.3);
    /* CAMBIATO: Transizione per la proprietà 'transform' */
    transition: transform 0.3s ease-out;
    /* CAMBIATO: Z-index più alto dell'header per farlo apparire sopra */
    z-index: 1200;
    align-items: flex-start;
    gap: 1.5rem;
    overflow-y: auto; /* Abilita lo scroll se ci sono troppi link */
    
    /* Assicurati che sia inizialmente invisibile ma pronto per l'animazione */
    opacity: 0; 
    visibility: hidden;
  }

  /* Stili del menu di navigazione quando è attivo (aperto) */
  .nav-links.active {
    /* Sposta il menu verso sinistra del 100% della sua larghezza per farlo entrare nello schermo */
    transform: translateX(-100%);
    opacity: 1; /* Rendi visibile */
    visibility: visible; /* Rendi visibile */
  }

  /* Stili per i singoli link all'interno del menu mobile */
  .nav-links .nav-link {
    width: 100%;
    padding: 1rem 2rem;
    text-align: left;
    color: #4b3b1c;
    text-decoration: none;
    font-size: 1.2rem;
  }
}
  .nav-link {
    font-size: 1.5rem;
    padding: 1rem 0;
  }
  .main-header {
    padding: 1rem;
  }
  .logo img {
    height: 60px;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }



@media (max-width: 640px) {
  .main-header {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  .hero-section {
    padding: 2rem 1rem;
  }
}

/* Scrollbar Custom */
#cartItems::-webkit-scrollbar {
  width: 7px;
}

#cartItems::-webkit-scrollbar-thumb {
  background: #aa6c39cc;
  border-radius: 4px;
}

#cartItems::-webkit-scrollbar-track {
  background: #fff9f0;
}

.fragrance-select {
  margin: 0.5rem 0 1rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 1.5px solid #c9b89e;
  font-weight: 600;
  color: #5e4b2b;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.fragrance-select:hover,
.fragrance-select:focus {
  border-color: #aa6c39;
  outline: none;
}

.product label {
  display: block;
  margin-top: 10px;
  font-weight: 500;
}

.product select {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 6px;
}

.cart-total-subtotal,
.cart-total-shipping,
.cart-total-grand {
  font-weight: 600;
  font-size: 1rem;
  color: #5e4b2b;
  text-align: right;
  margin: 0.3rem 0;
}

.cart-total-grand {
  font-weight: 700;
  font-size: 1.1rem;
  color: #aa6c39;
}



.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(170, 108, 57, 0.1);
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: #5e4b2b;
}

.cart-item-details {
  font-size: 0.85rem;
  color: #aa6c39;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.cart-qty-btn {
  background: #aa6c39;
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  transition: background 0.3s ease;
}

.cart-qty-btn:hover,
.cart-qty-btn:focus {
  background: #c78744;
  outline: none;
}

.cart-item-remove {
  background: #ff4d4d;
  border: none;
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.cart-item-remove:hover,
.cart-item-remove:focus {
  background: #cc0000;
  outline: none;
}


/* Aggiungi queste nuove regole CSS al file style.css */

.seasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  justify-items: center;
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.season-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(170, 108, 57, 0.15);
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  border: 1px solid #e3d9bf;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* Mantenuto per coerenza */
}

.season-card:hover,
.season-card:focus-within {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(170, 108, 57, 0.25);
}

.season-card img {
  /* Assicurati che queste proprietà siano già presenti o aggiungile */
  max-width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
  
  /* Nuove proprietà per l'ingrandimento al passaggio del mouse */
  transition: transform 0.3s ease; /* Transizione fluida */
}

.season-card img:hover {
  transform: scale(1.05); /* Ingrandisce l'immagine del 5% */
}

.season-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: #5e4b2b;
  margin-bottom: 0.8rem;
}

.season-card p {
  color: #6a5b3a;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1; /* Permette al paragrafo di occupare spazio */
}

.season-card .cta-button {
  display: block;
  width: fit-content;
  margin: 0 auto; /* Centra il pulsante */
}


/* Regole per schermi più piccoli */
@media (max-width: 768px) {
  .seasons-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Regole per il menu hamburger sui nuovi link */
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 220px;
    height: 100%;
    background: #fff9f0;
    padding-top: 8rem;
    box-shadow: -4px 0 12px rgba(170, 108, 57, 0.3);
    transition: transform 0.3s ease;
    z-index: 1000;
    align-items: flex-start;
    gap: 1.5rem;
    overflow-y: auto; /* Per lo scroll se ci sono molti link */
  }

  .nav-links.active {
    transform: translateX(-100%);
  }

  .nav-link {
    padding: 0.8rem 2rem;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid #e3d9bf;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .hamburger {
    display: flex; /* Mostra l'hamburger */
  }
}

#cartSidebar {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden; /* ✅ Nasconde scrollbar orizzontale */
  box-sizing: border-box;
}

#cartItems {
  flex-grow: 1;
  padding: 16px;
  overflow-x: hidden; /* ✅ Stop barra orizzontale */
}



.cart-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  max-width: 100vw;
  background: #ffffff;
  border-top: 1px solid #ddd;
  padding: 8px 0 8px 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  z-index: 1000;
  box-sizing: border-box;
}

.cart-actions button {
  flex: 1;
  padding: 10px 0;
  font-size: 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  margin: 0 8px;
  max-width: calc(50% - 16px);
  box-sizing: border-box;
}

#clearCartBtn {
  background-color: #ddd;
  color: #333;
}

#checkoutBtn {
  background-color: #222;
  color: white;
  margin-bottom: 2.5rem;
}

/* Rimuovi outline marrone su click/focus per logo, icone, hamburger, bandiere, menu */
.logo a:focus img,
.logo a img:focus,
.hamburger:focus,
.cart-icon:focus,
.lang-flag:focus,
.nav-link:focus,
.contact-icons a:focus img,
.contact-icons a img:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Privacy e Cookie Policy link nel footer */
footer a#openPrivacyPolicy,
footer a#openCookiePolicy {
  color: #6a5b3a !important;
  text-decoration: underline !important;
  font-weight: 600;
  transition: color 0.2s;
}
footer a#openPrivacyPolicy:hover,
footer a#openCookiePolicy:hover,
footer a#openPrivacyPolicy:focus,
footer a#openCookiePolicy:focus {
  color: #aa6c39 !important;
}

/* Responsive fix per barra di ricerca prodotti su mobile */
@media (max-width: 480px) {
  #product-search-form,
  #product-search {
    width: 90% !important;
    max-width: 90vw !important;
    margin: 0 auto 1rem auto !important;
    font-size: 1rem !important;
  }
}

/* Search box improvements */
#product-search-form {
  position: relative;
}

#product-search {
  padding-right: 2.5rem;
}

#product-search-form button {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0;
}

#product-search-form button i {
  transform: scaleX(-1);
}
