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

/* 🎨 PALETTE UFFICIALE "IL RIGENERATORE" */
:root {
  --blu-profondo: #0f172a;
  --blu: #003F73;
  --azzurro: #38bdf8;
  --azzurro-scuro: #0ea5e9;
  --grigio-chiaro: #f4f6f8;
  --grigio: #e3e6ea;
  --grigio-scuro: #374151;
  --bianco: #ffffff;
  --arancio: #f97316;
  --arancio-scuro: #ea580c;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial,
    sans-serif;
  background: var(--grigio-chiaro);
  color: #222;
}

/* HEADER */
.header {
  background: var(--blu-profondo);
  color: var(--bianco);
  padding: 10px 20px 15px;
  border-bottom: 3px solid var(--azzurro);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  max-height: 70px;
  border-radius: 8px;
  object-fit: cover;
}

.logo-text h1 {
  font-size: 24px;
}

.tagline {
  font-size: 13px;
  color: #cbd5f5;
}

.main-nav {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.main-nav a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 15px;
  padding: 6px 10px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--azzurro);
  color: var(--blu-profondo);
}

/* BARRA COSTRUZIONE */
.construction-bar {
  margin-top: 10px;
  background: #fef3c7;
  color: #92400e;
  padding: 8px 12px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.construction-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;              /* spazio tra luci e testo */
  padding: 0.5rem 1rem;
  font-weight: 600;
}

.warning-light {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffd94a;       /* giallo lampeggiante */
  box-shadow: 0 0 0 rgba(255, 217, 74, 0.8);
  animation: warning-blink 1s infinite ease-in-out;
}

/* Bagliore esterno */
.warning-light::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  box-shadow: 0 0 8px rgba(255, 217, 74, 0.9);
  opacity: 0;
  animation: warning-glow 1s infinite ease-in-out;
}

@keyframes warning-blink {
  0%, 100% {
    opacity: 0.2;
    transform: scale(0.9);
    box-shadow: 0 0 0 rgba(255, 217, 74, 0.5);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
    box-shadow: 0 0 12px rgba(255, 217, 74, 1);
  }
}

@keyframes warning-glow {
  0%, 100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}


.reactivate-btn {
  margin-top: 8px;
}

/* BOTTONI */
.btn,
.btn-small {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 600;
}

.btn {
  background: var(--azzurro);
  color: var(--blu-profondo);
  padding: 10px 18px;
  font-size: 16px;
}

.btn:hover {
  background: var(--azzurro-scuro);
}

.btn-small {
  background: var(--blu);
  color: var(--bianco);
  padding: 6px 10px;
}

.btn-small:hover {
  background: var(--azzurro-scuro);
}

.reset-btn {
  background: var(--arancio);
}

.reset-btn:hover {
  background: var(--arancio-scuro);
}

/* MAIN */
main {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto 40px;
}

/* HERO */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 25px;
}

.hero-text h2 {
  font-size: 26px;
  margin-bottom: 10px;
}

.hero-text p {
  margin-bottom: 12px;
  color: var(--grigio-scuro);
}

.hero-image-wrapper {
  text-align: center;
}

.hero-image {
  max-width: 100%;
  border-radius: 15px;
  object-fit: cover;
}

/* FILTRI CATALOGO */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
}

#searchBar,
#filterCategory,
#filterBrand,
#minPrice,
#maxPrice {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

/* SLIDER PRODOTTI */
.featured {
  margin-top: 10px;
  margin-bottom: 25px;
}

.featured h2 {
  font-size: 22px;
  margin-bottom: 10px;
}

.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 12px;
  padding: 8px 0;
}

.slider::-webkit-scrollbar {
  height: 6px;
}

.slider::-webkit-scrollbar-thumb {
  background: #9ca3af;
  border-radius: 999px;
}

.product-card {
  min-width: 180px;
  max-width: 200px;
  background: white;
  border-radius: 14px;
  padding: 10px;
  text-decoration: none;
  color: #111827;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-card img {
  width: 100%;
  height: 130px;          /* stessa altezza delle card catalogo */
  object-fit: contain;    /* nessun taglio */
  background: #f3f4f6;
  border-radius: 10px;
}
.product-card h3 {
  font-size: 15px;
}

.product-tag {
  font-size: 12px;
  color: #6b7280;
}

.slider-arrow {
  border-radius: 999px;
  border: none;
  background: #e5e7eb;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 18px;
}

/* ANIMAZIONE INGRESSO */
.slide-in {
  opacity: 0;
  transform: translateY(10px);
  animation: slideIn 0.4s ease forwards;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }

}
/* LISTA PRODOTTI */
.product-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.product {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #111827;
  background: white;
  border-radius: 14px;
  padding: 10px;
  width: 190px; /* riquadro un po' più largo */
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  position: relative;
}

.product img {
  width: 100%;
  height: 130px;          /* un po' più bassa */
  object-fit: contain;    /* mostra tutta l'immagine senza tagliarla */
  background: #f3f4f6;    /* leggero grigio dietro alle bande vuote */
  border-radius: 10px;
  margin-bottom: 5px;
  transition: transform 0.25s ease;

}

.product:hover {
  transform: translateY(-6px);
  box-shadow:
    0 0 16px rgba(56, 189, 248, 0.55),
    0 8px 20px rgba(15, 23, 42, 0.25);
}

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


.price {
  font-weight: bold;
  color: var(--azzurro);
  padding: 5px 0;
  display: block;
}

/* PAGINAZIONE */
.pagination {
  display: flex;
  gap: 6px;
  margin-top: 20px;
}

.page-btn {
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background: var(--grigio);
  cursor: pointer;
}

.page-btn.active {
  background: var(--azzurro);
  color: white;
}

/* SEZIONI */
.section {
  margin-top: 30px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section h2 {
  font-size: 22px;
  margin-bottom: 12px;
}

.section-content {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.section-image {
  max-width: 100%;
  border-radius: 16px;
  object-fit: cover;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.section-image:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

/* PAGINA PRODOTTO */
.product-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.product-gallery img {
  width: 120px;
  height: 180px;
  object-fit: contain;  /* mostra la foto intera + logo */
  background: #f3f4f6;
  border-radius: 12px;
  cursor: zoom-in;
  transition: transform 0.25s;
}
.product-gallery img:hover {
  transform: scale(1.1);
}

.product-gallery img.placeholder,
.product-thumb.placeholder {
  object-fit: contain;
  background: #e5e7eb;
}

.product-gallery-item {
  position: relative;
  width: 120px;
  height: 120px;
}

.product-gallery-item .product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  cursor: zoom-in;
  transition: transform 0.25s;
}

.product-gallery-item .product-img:hover {
  transform: scale(1.1);
}

/* FOOTER */
.footer {
  background: var(--blu-profondo);
  color: #9ca3af;
  text-align: center;
  padding: 12px;
  font-size: 13px;
}

.brand-logo {
  height: 10px;
  vertical-align: auto;
  margin-left: 8px;
  opacity: 0.85;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.2));
  transition: 0.2s ease;
}
#product-page h2 .brand-logo {
  height: 20px;       /* prova 14–24px finché ti piace */
  width: auto;
  margin-left: 8px;   /* spazio dal nome */
  vertical-align: middle;
  /* Logo brand nel CATALOGO, sotto al prodotto */
.brand-logo-card {
  width: 10px;      /* prova 40–60px finché non ti piace */
  height: 10px;
  display: block;
  margin: 8px auto 4px; /* lo centra sotto il prodotto */
}

}

.brand-logo:hover {
  opacity: 1;
  transform: scale(1.1);
}

.brand-mini {
  height: 10px;
  vertical-align: middle;
  margin-right: 4px;
  opacity: 0.85;
}
/* Logo brand sotto al prodotto nel catalogo */
#products-container .brand-mini {
  width: 85px;     /* prova 40–60px finché ti piace */
  height: auto;
  display: block;
  margin: 8px auto 4px; /* lo centra sotto al prodotto */
}
/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0f172a;
  color: white;
  padding: 14px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  z-index: 9999;
  border-top: 3px solid var(--azzurro);
}

.cookie-banner a {
  color: var(--azzurro);
  text-decoration: underline;
}

.cookie-banner button {
  background: var(--azzurro);
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.cookie-banner button:hover {
  background: var(--azzurro-scuro);
}

/* POPUP COOKIE */
.cookie-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.cookie-popup-box {
  background: var(--blu-profondo);
  color: white;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 430px;
  text-align: center;
  border: 3px solid var(--azzurro);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.cookie-popup-box h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.cookie-popup-box p {
  margin-bottom: 10px;
  font-size: 14px;
  color: #dbeafe;
}

.cookie-popup-box a {
  color: var(--azzurro);
  text-decoration: underline;
}
/* LISTA SERVIZI CON ICONA */
.service-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.4s ease forwards;
}

.service-list li:nth-child(1) { animation-delay: 0.1s; }
.service-list li:nth-child(2) { animation-delay: 0.2s; }
.service-list li:nth-child(3) { animation-delay: 0.3s; }
.service-list li:nth-child(4) { animation-delay: 0.4s; }
.service-list li:nth-child(5) { animation-delay: 0.5s; }
.service-list li:nth-child(6) { animation-delay: 0.6s; }
.service-list li:nth-child(7) { animation-delay: 0.7s; }

.icon {
  width: 22px;
  height: 22px;
  fill: var(--azzurro);
  flex-shrink: 0;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* FORM CONTATTI */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.small-note {
  font-size: 12px;
  margin-top: 8px;
  color: #6b7280;
}

/* RESPONSIVE */
@media (max-width: 800px) {
  .header-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .section-content {
    grid-template-columns: 1fr;
  }

  main {
    padding: 16px;
  }
}

@media (max-width: 600px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  #searchBar,
  #filterCategory,
  #filterBrand,
  #minPrice,
  #maxPrice {
    width: 100%;
  }

  .product-list {
    justify-content: space-between;
  }
 }

.img-with-logo {
  position: relative;
  display: inline-block;
}

/* Logo sovrapposto nell’angolo basso a destra */
.img-with-logo::after {
  content: "";
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 50px;          /* regola la dimensione del logo */
  height: 50px;
  background-image: url("/img/logo-watermark.png");  /* percorso del tuo logo */
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.7;        /* trasparenza tipo watermark */
  pointer-events: none; /* non blocca i click sull’immagine */
}
.construction-message {
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
/* ============================
   STILI SPECIFICI PAGINA PRIVACY
   ============================ */

/* Contenitore principale della pagina policy */
.section-policy-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  font-size: 0.9rem;   /* base leggermente ridotta */
  line-height: 1.6;
}

/* Tutti gli elementi con class o id dentro la sezione:
   testo un filo più piccolo ovunque */
.section-policy-page [class],
.section-policy-page [id] {
  font-size: 0.95em;
}

/* Blocco del testo della policy */
.section-policy-page
.policy-content {
  /* opzionale: se vuoi un po' di stacco visivo */
  /* background-color: #ffffff;
  border-radius: 4px;
  box-shadow: 0 0 4px rgba(0,0,0,0.04); */
}

/* TITOLI PIÙ COMPATTI SOLO NELLA POLICY */
.section-policy-page h2 {
  font-size: 0.8rem;   /* ~17–18px */
  line-height: 1.3;
  margin-top: 1.4em;
  margin-bottom: 0.4em;
}

.section-policy-page h3 {
  font-size: 0.8rem;    /* ~15–16px */
  line-height: 1.3;
  margin-top: 1em;
  margin-bottom: 0.3em;
}

.section-policy-page h4 {
  font-size: 0.8rem;
  line-height: 1.3;
  margin-top: 0.8em;
  margin-bottom: 0.25em;
}

/* Paragrafi e liste */
.section-policy-page p,
.section-policy-page li {
  font-size: 0.8rem;
  margin-bottom: 0.6em;
}
/* Contenitore generale */
#help-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Bottone "Hai bisogno?" */
#help-widget-toggle {
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  cursor: pointer;
  font-size: 14px;
  background: #2563eb;      /* blu */
  color: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

#help-widget-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  background: #1d4ed8;
}

/* Finestra di chat */
#help-widget-window {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 320px;
  height: 380px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  overflow: hidden;
  display: none;             /* nascosta di default */
  display: flex;
  flex-direction: column;
}

/* Header */
#help-widget-window .hw-header {
  background: #2563eb;
  color: #fff;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

#help-widget-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* Corpo messaggi */
#help-widget-window .hw-body {
  flex: 1;
  padding: 10px;
  background: #f9fafb;
  overflow-y: auto;
  font-size: 13px;
}

/* Messaggi */
.hw-message {
  max-width: 80%;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  line-height: 1.3;
}

.hw-message-bot {
  background: #e5e7eb;
  align-self: flex-start;
}

.hw-message-user {
  background: #2563eb;
  color: white;
  align-self: flex-end;
}

/* Footer input */
#help-widget-window .hw-footer {
  padding: 8px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 6px;
}

#help-widget-input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
}

#help-widget-input:focus {
  border-color: #2563eb;
}

#help-widget-send {
  border: none;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
  background: #2563eb;
  color: white;
}


/* Liste con un po' di rientro */
.section-policy-page ul {
  padding-left: 1.2rem;
}

/* Tabella cookie compatta e leggibile */
.section-policy-page .cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.85rem;
}

.section-policy-page .cookie-table th,
.section-policy-page .cookie-table td {
  border: 1px solid #ddd;
  padding: 0.4rem 0.5rem;
  text-align: left;
}

.section-policy-page .cookie-table th {
  font-weight: 600;
}
