/* ==========================================================================
   OTTICA VISTA PURA - COMPONENTS STYLESHEET
   Componenti: Quiz Interattivo, Catalogo Occhiali, Cookie Banner GDPR, Modal,
   e Layout Pagine Legali & Thank-You
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CATALOGO OCCHIALI (Vetrina & Filtri)
   -------------------------------------------------------------------------- */
.catalog-section {
  padding: 4.5rem 0;
}

.catalog-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

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

.product-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

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

.product-badge-group {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.badge-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.badge-italy {
  background: #0f2438;
  color: #ffffff;
}

.badge-feature {
  background: #e9f5ed;
  color: #166534;
}

.product-image-box {
  background: linear-gradient(135deg, #f8f7f4 0%, #f0ece3 100%);
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  padding: 8px;
  transition: transform 0.4s ease;
}

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

.product-image-box svg {
  width: 100%;
  max-width: 200px;
  height: auto;
  transition: transform 0.4s ease;
}

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

/* Team Avatar Real Photo */
.team-avatar-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
  box-shadow: var(--shadow-sm);
  display: block;
  border: 2px solid var(--color-accent);
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: #f4f1ea;
  border: 1px solid #e0d9cc;
  border-radius: 50px;
  padding: 2px;
  gap: 2px;
  flex-shrink: 0;
}

.lang-btn {
  background: transparent;
  border: none;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 50px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
}

.lang-btn:hover {
  color: var(--color-primary);
}

.lang-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 36, 56, 0.2);
}

.product-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.product-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.product-specs {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: flex;
  gap: 0.75rem;
}

.product-bottom-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
}

.product-price-block {
  display: flex;
  flex-direction: column;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.product-vat-info {
  font-size: 0.7rem;
  color: var(--text-light);
}

/* --------------------------------------------------------------------------
   2. QUIZ CONSULTAZIONE DELLA VISTA (Step-by-Step)
   -------------------------------------------------------------------------- */
.quiz-card-wrapper {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  padding: 3rem 2.5rem;
  max-width: 840px;
  margin: 0 auto;
}

.quiz-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: var(--bg-alt);
  border-radius: var(--radius-full);
  margin-bottom: 2rem;
  overflow: hidden;
  position: relative;
}

.quiz-progress-bar-fill {
  height: 100%;
  width: 15%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  transition: width 0.4s ease;
}

.quiz-step-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.quiz-step {
  display: none;
  animation: fadeInStep 0.35s ease forwards;
}

.quiz-step.active {
  display: block;
}

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

.quiz-question-title {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.quiz-question-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.quiz-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.quiz-option-card {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  cursor: pointer;
  background: var(--bg-main);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.quiz-option-card:hover {
  border-color: var(--color-accent);
  background: #ffffff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.quiz-option-card.selected {
  border-color: var(--color-primary);
  background: #f4f8fb;
  box-shadow: 0 0 0 1px var(--color-primary);
}

.quiz-option-icon {
  width: 48px;
  height: 48px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.quiz-option-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.35rem;
}

.quiz-option-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.quiz-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.quiz-result-summary {
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 2rem;
  border: 1px solid #e2e8f0;
}

.quiz-recommendation-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   3. COOKIE BANNER GDPR (Garante Privacy Conforme)
   -------------------------------------------------------------------------- */
.cookie-banner-wrapper {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 580px;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(10, 24, 38, 0.22);
  border: 1px solid var(--border-color);
  padding: 1.75rem;
  z-index: 9999;
  display: none;
  animation: slideUpCookie 0.35s ease forwards;
}

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

.cookie-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.cookie-header h4 {
  font-size: 1.1rem;
  color: var(--color-primary);
}

.cookie-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.cookie-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.cookie-actions .btn {
  flex: 1 1 auto;
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  min-width: 120px;
}

.cookie-settings-btn-floating {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 900;
  background: var(--color-primary);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.cookie-settings-btn-floating:hover {
  background: var(--color-accent);
  transform: scale(1.1);
}

/* Modal Preferenze Cookie */
.cookie-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 24, 38, 0.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.cookie-modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  max-height: 85vh;
  overflow-y: auto;
}

.cookie-preference-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
}

.cookie-preference-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.cookie-preference-header span {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.95rem;
}

.cookie-badge-required {
  font-size: 0.7rem;
  background: #e2e8f0;
  color: #475569;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   4. MODALE DETTAGLI PRODOTTO (Quick View)
   -------------------------------------------------------------------------- */
.product-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 24, 38, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9998;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.product-modal-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 760px;
  width: 100%;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: #e2e8f0;
  transform: rotate(90deg);
}

.product-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: center;
}

/* --------------------------------------------------------------------------
   5. PAGINA THANK YOU (grazie.html)
   -------------------------------------------------------------------------- */
.thankyou-wrapper {
  padding: 5rem 0;
  min-height: calc(80vh - 80px);
  display: flex;
  align-items: center;
}

.thankyou-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 3.5rem 2.5rem;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.thankyou-icon {
  width: 80px;
  height: 80px;
  background: #dcfce7;
  color: #15803d;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.thankyou-title {
  font-size: 2.2rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.thankyou-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.next-steps-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
  margin: 2.5rem 0;
  padding: 1.75rem;
  background: var(--bg-main);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.timeline-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.timeline-step-num {
  width: 28px;
  height: 28px;
  background: var(--color-accent);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.timeline-step-content h4 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.timeline-step-content p {
  font-size: 0.85rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   6. PAGINE LEGALI (Privacy, Termini, Cookie, Disclaimer)
   -------------------------------------------------------------------------- */
.legal-page-header {
  padding: 3.5rem 0 2.5rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-color);
}

.legal-content-wrap {
  padding: 4rem 0;
}

.legal-article {
  background: #ffffff;
  padding: 3rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.75;
}

.legal-article h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-light);
}

.legal-article h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-article ul {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

.legal-article li {
  margin-bottom: 0.4rem;
}

.legal-callout-box {
  background: #f8fafc;
  border-left: 4px solid var(--color-primary);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.legal-callout-box.medical {
  border-left-color: #d97706;
  background: #fffbeb;
}

/* Tabella Cookie Informativa */
.cookie-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.cookie-table th, .cookie-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
}

.cookie-table th {
  background: var(--bg-alt);
  color: var(--color-primary);
  font-weight: 600;
}

@media (max-width: 768px) {
  .product-modal-grid {
    grid-template-columns: 1fr;
  }
  .quiz-card-wrapper {
    padding: 2rem 1.25rem;
  }
  .legal-article {
    padding: 1.75rem 1.25rem;
  }
  .cookie-banner-wrapper {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
}

/* ==========================================================================
   PAGINA PRODOTTO & DISPONIBILITÀ MAGAZZINO (LIVE INVENTORY)
   ========================================================================== */

.breadcrumb-nav {
  padding: 1.25rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.breadcrumb-list a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb-list a:hover {
  color: var(--color-primary);
}

.breadcrumb-separator {
  color: #cbd5e1;
}

.product-detail-section {
  padding: 2rem 0 4.5rem;
  background: #ffffff;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

.product-detail-gallery {
  position: sticky;
  top: 90px;
}

.product-detail-main-img-box {
  position: relative;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 2.5rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.product-detail-main-img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #ffffff;
  padding: 12px;
  border-radius: var(--radius-md);
  transition: transform 0.3s ease;
}

.product-detail-main-img:hover {
  transform: scale(1.02);
}

.product-detail-trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.product-detail-trust-item {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.6rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-main);
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.product-detail-trust-item svg {
  color: var(--color-accent);
}

/* Info Colonna Destra */
.product-detail-category-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.product-detail-title {
  font-size: 2.25rem;
  font-family: var(--font-heading);
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.product-detail-rating-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.product-detail-stars {
  color: #f59e0b;
}

.product-detail-price-box {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.product-detail-price {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.product-detail-price-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.product-detail-tax-badge {
  color: #059669;
  font-weight: 600;
}

.product-detail-desc {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

/* BOX DISPONIBILITÀ A MAGAZZINO (LIVE INVENTORY) */
.stock-availability-box {
  background: #f0fdf4;
  border: 2px solid #86efac;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.08);
}

.stock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stock-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #dcfce7;
  color: #15803d;
  padding: 0.4rem 0.85rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
}

.stock-pulse-dot {
  width: 10px;
  height: 10px;
  background: #22c55e;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.stock-pulse-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid #22c55e;
  animation: pulseGreen 1.6s infinite ease-in-out;
}

@keyframes pulseGreen {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.stock-sku {
  font-size: 0.8rem;
  color: #4b5563;
  font-family: monospace;
}

.stock-locations-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
  border-top: 1px solid #bbf7d0;
  border-bottom: 1px solid #bbf7d0;
  padding: 1rem 0;
}

.stock-location-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.stock-location-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #1f2937;
  font-weight: 600;
}

.stock-location-qty {
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.82rem;
}

.stock-timer-note {
  font-size: 0.82rem;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-weight: 500;
}

/* Tabella Specifiche Tecniche */
.product-specs-table-wrap {
  margin-bottom: 2rem;
}

.product-specs-table-wrap h4 {
  font-size: 1.05rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.product-specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.product-specs-table tr:nth-child(even) {
  background: #f8fafc;
}

.product-specs-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.product-specs-table td:first-child {
  font-weight: 600;
  color: var(--text-muted);
  width: 40%;
}

.product-specs-table td:last-child {
  color: var(--text-main);
  font-weight: 500;
}

/* Pulsanti Azione */
.product-action-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

@media (max-width: 992px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .product-detail-gallery {
    position: static;
  }
}

/* ==========================================================================
   CARRELLO DELLA SPESA & CHECKOUT DRAWER (SHOPPING CART)
   ========================================================================== */

.header-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--color-primary);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  flex-shrink: 0;
}

.header-cart-btn:hover {
  background: #faf8f5;
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 36, 56, 0.08);
}

.cart-badge-count {
  position: absolute;
  top: -4px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #c49a6c;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

/* Overlay */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Drawer panel */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.cart-drawer.active {
  transform: translateX(0);
}

.cart-drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.cart-drawer-header h3 {
  font-size: 1.15rem;
  color: var(--color-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-close-btn {
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  transition: var(--transition);
}

.cart-close-btn:hover {
  background: #e2e8f0;
  transform: rotate(90deg);
}

/* Delivery notice bar in drawer */
.cart-shipping-notice {
  background: #f0fdf4;
  color: #166534;
  padding: 0.65rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-bottom: 1px solid #bbf7d0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Drawer body */
.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}

/* Cart Items List */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item-row {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #ffffff;
  position: relative;
  align-items: center;
}

.cart-item-img {
  width: 80px;
  height: 60px;
  object-fit: contain;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 4px;
  border: 1px solid #e2e8f0;
}

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

.cart-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.2rem;
}

.cart-item-variant {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
}

.cart-qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f8fafc;
  margin-top: 0.4rem;
}

.cart-qty-btn {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  transition: var(--transition);
}

.cart-qty-btn:hover {
  background: #e2e8f0;
}

.cart-qty-val {
  min-width: 28px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.cart-item-remove-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: var(--transition);
}

.cart-item-remove-btn:hover {
  color: #dc2626;
  background: #fee2e2;
}

/* Empty State */
.cart-empty-box {
  text-align: center;
  padding: 3.5rem 1rem;
}

.cart-empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  color: #cbd5e1;
}

.cart-empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.cart-empty-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Drawer Footer */
.cart-drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-main);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.cart-summary-row.total {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  border-top: 1px dashed var(--border-color);
  padding-top: 0.6rem;
  margin-top: 0.6rem;
}

.cart-vat-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: -0.3rem;
  margin-bottom: 1rem;
}

/* Checkout Lead Form in Drawer */
.cart-checkout-section {
  display: none;
}

.cart-checkout-section.active {
  display: block;
}

.cart-form-group {
  margin-bottom: 0.85rem;
}

.cart-form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.cart-form-input, .cart-form-select, .cart-form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-main);
  background: #ffffff;
  transition: var(--transition);
  font-family: inherit;
}

.cart-form-input:focus, .cart-form-select:focus, .cart-form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(30, 91, 168, 0.12);
}

.cart-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.cart-payment-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.cart-payment-choice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #f8fafc;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.cart-payment-choice:has(input:checked) {
  border-color: var(--color-accent);
  background: #eff6ff;
  color: var(--color-accent);
}

/* Toast */
.cart-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0f172a;
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 10005;
  font-size: 0.9rem;
  font-weight: 600;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   SEZIONE CERTIFICAZIONI UFFICIALI (SCREENSHOT MATCHING)
   ========================================================================== */

.cert-section {
  padding: 4.5rem 0 5.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  min-height: calc(100vh - 120px);
}

.cert-main-box {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06);
  padding: 3.5rem 3rem;
  max-width: 980px;
  margin: 0 auto;
}

.cert-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.cert-header-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #2563eb;
  background: #dbeafe;
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.cert-title {
  font-size: 2.35rem;
  font-family: var(--font-heading);
  color: #0f172a;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.cert-subtitle {
  font-size: 1.08rem;
  color: #64748b;
  line-height: 1.6;
}

/* Griglia 2x2 esatta allo screenshot */
.cert-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.cert-card-item {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
}

.cert-card-item:hover {
  border-color: #93c5fd;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -6px rgba(37, 99, 235, 0.1);
}

/* Carta attiva / selezionata con bordo blu come nello screenshot */
.cert-card-item.active {
  border: 2px solid #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15), 0 10px 25px -5px rgba(37, 99, 235, 0.1);
}

.cert-circle-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.28);
}

.cert-circle-icon svg {
  width: 36px;
  height: 36px;
}

.cert-card-heading {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.85rem;
}

.cert-card-paragraph {
  font-size: 0.93rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

/* Modulo di richiesta certificato / detrazione */
.cert-form-box {
  margin-top: 3.5rem;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 2.5rem;
}

.cert-form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.cert-form-header h3 {
  font-size: 1.4rem;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.cert-form-header p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .cert-grid-2x2 {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .cert-main-box {
    padding: 2rem 1.25rem;
  }
  .cert-title {
    font-size: 1.8rem;
  }
  .cart-drawer {
    max-width: 100% !important;
    width: 100% !important;
  }
}

@media (max-width: 640px) {
  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .product-card {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
  }
  .cart-drawer-header {
    padding: 1rem 1.25rem;
  }
  .cart-drawer-body {
    padding: 1rem 0.85rem;
  }
  .cart-form-row {
    grid-template-columns: 1fr !important;
    gap: 0.5rem;
  }
  .cart-form-input {
    font-size: 16px !important;
  }
}

