@font-face {
  font-family: 'OPPOSans';
  src: url('https://www.oppo.com/content/dam/oppo/common/fonts/OPPOSans-Ver2-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: 'OPPOSans', Arial, Helvetica, sans-serif;
  background: #f5f5f5;
  color: #111;
}

header {
  display: none;
}

.sticky-tools {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  width: 100%;
  padding: 8px 20px 12px;
  background: rgba(245, 245, 245, .97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.page-logo {
  width: 100%;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 8px;
}

.page-logo-oppo {
  display: block;
  width: 200px !important;
  height: 70px !important;
  object-fit: contain;
}

.sticky-tools-spacer {
  width: 100%;
  height: 210px;
}

.search-box {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #777;
  pointer-events: none;
  display: block;
}

.search {
  display: block;
  width: 100%;
  height: 48px;
  padding: 12px 18px 12px 46px;
  margin: 0;
  border: 1px solid #ddd;
  border-radius: 28px;
  background: rgba(255, 255, 255, .98);
  font-family: 'OPPOSans', Arial, Helvetica, sans-serif;
  font-size: 15px;
  color: #111;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search::placeholder {
  font-size: 13px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.40);
  letter-spacing: 0.2px;
}

.search:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .06);
}

.search:focus + .search-icon,
.search-box:focus-within .search-icon {
  color: #111;
}


/* ===================================================
   NAVIGAZIONE MACROSEZIONI:
   - SU PC / DESKTOP: Posizionata in alto nell'header
   - SU SMARTPHONE: Pillola fluttuante in basso con blur iOS
   =================================================== */

.macro-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 540px;
  margin: 0 auto 10px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 28px;
  transition: all 0.25s ease;
}

.macro-button {
  flex: 1 1 33.333%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 38px;
  padding: 6px 12px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: #666;
  font-family: 'OPPOSans', Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s cubic-bezier(0.2, 0.9, 0.3, 1),
              color 0.2s,
              box-shadow 0.2s,
              transform 0.15s;
  white-space: nowrap;
}

.macro-button:active {
  transform: scale(0.97);
}

/* Pulsante attivo sempre BIANCO */
.macro-button.active {
  background: #ffffff !important;
  color: #111111 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12) !important;
}

/* Stile fluttuante in basso con blur (applicato via JS su mobile o via media query) */
.macro-nav.mobile-floating {
  position: fixed !important;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  left: 50% !important;
  top: auto !important;
  transform: translateX(-50%) !important;
  z-index: 9999 !important;
  width: calc(100% - 32px) !important;
  max-width: 360px !important;
  margin: 0 !important;
  padding: 5px !important;
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.05) !important;
  border-radius: 40px !important;
  gap: 6px !important;
}

.macro-nav.mobile-floating {
  max-width: 380px !important;
  padding: 4px !important;
  gap: 4px !important;
}

.macro-nav.mobile-floating .macro-button {
  flex: 1 1 33.333% !important;
  height: 40px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 5px 8px !important;
  border-radius: 28px !important;
  color: #555 !important;
}

.macro-nav.mobile-floating .macro-button.active {
  background: #ffffff !important;
  color: #111111 !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15) !important;
}

@media screen and (max-width: 640px) {
  .macro-nav {
    position: fixed !important;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
    left: 50% !important;
    top: auto !important;
    transform: translateX(-50%) !important;
    z-index: 9999 !important;
    width: calc(100% - 32px) !important;
    max-width: 360px !important;
    margin: 0 !important;
    padding: 5px !important;
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(28px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    border-radius: 40px !important;
    gap: 6px !important;
  }

  .macro-nav {
    max-width: 380px !important;
    padding: 4px !important;
    gap: 4px !important;
  }

  .macro-button {
    flex: 1 1 33.333% !important;
    height: 40px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 5px 8px !important;
    border-radius: 28px !important;
    color: #555 !important;
  }

  .macro-button.active {
    background: #ffffff !important;
    color: #111111 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15) !important;
  }

  .container {
    padding-bottom: calc(95px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .copy-toast {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
  }
}


/* Barra filtri serie */
.series-filters {
  display: flex;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  gap: 8px;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 4px;
}

.series-filters::-webkit-scrollbar {
  display: none;
}

.series-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 8px 17px;
  border: 1px solid #ddd;
  border-radius: 22px;
  background: #fff;
  color: #333;
  font-family: 'OPPOSans', Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background .15s,
    color .15s,
    border-color .15s,
    transform .1s;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .05);
}

.series-button:hover {
  background: #f1f1f1;
  border-color: #ccc;
}

.series-button:active {
  transform: scale(.97);
}

.series-button.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

@media screen and (min-width: 768px) {
  .series-filters {
    justify-content: center;
  }
}

.container {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

/* ===================================================
   SUDDIVISIONE PER SERIE (STRUTTURA ORIGINALE)
   =================================================== */

.series-section {
  width: 100%;
  margin-bottom: 30px;
  position: relative;
}

.series-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 21px;
  font-weight: 600;
}

.series-title::before {
  content: '';
  width: 4px;
  height: 22px;
  border-radius: 4px;
  background: #111;
  flex: 0 0 auto;
}

.products-wrapper {
  position: relative;
  width: 100%;
  min-width: 0;
}

.products {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 18px;
  width: 100%;
  max-width: 100%;
  padding: 2px 2px 14px;
  margin: 0;
  align-items: flex-start;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.products::-webkit-scrollbar {
  display: none;
}

.products .card {
  flex: 0 0 calc(25% - 14px);
  width: calc(25% - 14px);
  min-width: calc(25% - 14px);
  max-width: calc(25% - 14px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* ===================================================
   FRECCE DI SCORRIMENTO (AVANTI E INDIETRO)
   =================================================== */

.scroll-arrow {
  display: none;
  position: absolute;
  top: 120px; /* Centrata sopra l'area immagine, non copre il titolo del prodotto né il badge fine serie */
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: #111;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 20;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    opacity .2s,
    transform .2s;
}

.scroll-arrow-next {
  right: 8px;
}

.scroll-arrow-prev {
  left: 8px;
}

.scroll-arrow:hover {
  transform: translateY(-50%) scale(1.05);
}

.scroll-arrow.hidden {
  display: none !important;
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, .07);
  overflow: hidden;
  min-width: 0;
}

/* ===================================================
   IMMAGINI: STESSA RESA PERFETTA DELLO SMARTPHONE
   =================================================== */

.product-image-wrapper {
  width: 100%;
  height: 200px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: #fff;
  position: relative;
  padding: 4px;
}

.product-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center center;
  margin: 0 auto;
}

/* ===================================================
   TITOLO PRODOTTO E BANNER "FINE SERIE"
   =================================================== */

.product-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.product-title-row h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  flex: 1;
}

.badge-fine-serie {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 3px 8px;
  background: rgba(239, 68, 68, 0.12);
  color: #c5221f;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.2;
  white-space: nowrap;
  user-select: none;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.color-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 16px;
}

.color-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px 9px 9px;
  background: #fafafa;
  border: 1px solid #e4e4e4;
  border-radius: 12px;
  cursor: pointer;
  transition:
    background .15s,
    border-color .15s,
    transform .1s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.color-option:hover {
  background: #f2f2f2;
  border-color: #d4d4d4;
}

.color-option:active {
  transform: scale(.985);
}

.color-circle {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #ddd;
  box-shadow:
    0 1px 4px rgba(0, 0, 0, .18),
    inset 0 0 0 2px rgba(255, 255, 255, .45);
}

.color-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  flex: 1;
}

.color-name {
  font-size: 12px;
  color: #333;
  line-height: 1.2;
  margin-bottom: 3px;
}

.color-code-value {
  font-size: 14px;
  color: #111;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-all;
}

.copy-hint {
  font-size: 10px;
  color: #888;
  margin-left: auto;
  white-space: nowrap;
}

/* ===================================================
   BANNER PROMO / BUNDLE CON SPAZIATURA RISPETTO AL TASTO
   =================================================== */

.card-banners {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  margin-bottom: 16px;
}

.bundle-banner,
.promo-banner {
  width: 100%;
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.bundle-banner {
  background: rgba(255, 216, 0, .28);
  color: #111;
}

.promo-banner {
  background: rgba(46, 204, 113, .22);
  color: #14532d;
}

/* ===================================================
   BOTTONI AZIONE AFFIANCATI E PANNELLI A SCOMPARSA
   =================================================== */

.card-action-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.action-btn,
.details-toggle,
.keypoints-toggle {
  flex: 1 1 50%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 11px;
  background: #fafafa;
  color: #111;
  font-family: 'OPPOSans', Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.details-toggle:hover {
  background: #f0f0f0;
  border-color: #d2d2d2;
}

.details-toggle.open {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Stile dedicato "Verde OPPO trasparente" per Punti Chiave */
.keypoints-toggle {
  background: rgba(0, 139, 94, 0.12);
  border-color: rgba(0, 139, 94, 0.28);
  color: #007a50;
}

.keypoints-toggle:hover {
  background: rgba(0, 139, 94, 0.20);
  border-color: rgba(0, 139, 94, 0.40);
  color: #00603f;
}

.keypoints-toggle.open {
  background: #008b5e;
  color: #ffffff;
  border-color: #008b5e;
}

.details-arrow {
  display: block;
  flex: 0 0 auto;
  margin-left: 4px;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.action-btn.open .details-arrow,
.details-toggle.open .details-arrow,
.keypoints-toggle.open .details-arrow {
  transform: rotate(180deg);
}

/* Pannelli a scomparsa (CHIUSI DI DEFAULT con grid-template-rows: 0fr) */
.details-wrapper,
.keypoints-wrapper,
.card-expand-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.25s ease;
  opacity: 0;
}

.details-wrapper.open,
.keypoints-wrapper.open,
.card-expand-panel.open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.details-inner,
.keypoints-inner {
  overflow: hidden;
  padding-top: 12px;
}

.specs {
  display: grid;
  gap: 8px;
}

.spec {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #334155;
}

.spec-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  border-radius: 0;
  color: #111111;
  box-shadow: none;
}

.spec-svg {
  display: block;
  width: 19px;
  height: 19px;
  stroke: currentColor;
}

.spec-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.spec-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #64748b;
  font-weight: 700;
  line-height: 1.2;
}

/* Elenco puntato Punti Chiave */

/* Box "Come proporlo" (Sfondo blu quasi trasparente sopra i punti chiave) */
.pitch-box {
  background: rgba(14, 116, 224, 0.08);
  border: 1px solid rgba(14, 116, 224, 0.22);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.pitch-title {
  font-size: 12px;
  font-weight: 700;
  color: #0b5fb3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.pitch-text {
  font-size: 13px;
  line-height: 1.45;
  color: #1a2a3a;
  font-weight: 500;
}

.keypoints-list {
  margin: 0;
  padding: 12px 14px 12px 28px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  list-style-type: disc;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.keypoints-list li {
  font-size: 13px;
  line-height: 1.45;
  color: #222;
  font-weight: 500;
}

.keypoints-list li::marker {
  color: #111;
}

.empty {
  text-align: center;
  padding: 40px;
  color: #777;
  width: 100%;
}

.error {
  color: #c00;
  background: #fff1f1;
  border: 1px solid #ffd2d2;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  width: 100%;
  white-space: pre-wrap;
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: #111;
  color: #fff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity .2s,
    transform .2s;
  z-index: 9999;
  white-space: nowrap;
}

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

@media screen and (max-width: 1200px) {

  .products .card {
    flex: 0 0 calc(33.333% - 12px);
    width: calc(33.333% - 12px);
    min-width: calc(33.333% - 12px);
    max-width: calc(33.333% - 12px);
  }

  .scroll-arrow {
    display: flex;
  }

}

@media screen and (max-width: 900px) {

  .products .card {
    flex: 0 0 calc(50% - 9px);
    width: calc(50% - 9px);
    min-width: calc(50% - 9px);
    max-width: calc(50% - 9px);
  }

  .scroll-arrow {
    display: flex;
  }

}

@media screen and (max-width: 600px) {

  html,
  body {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    position: relative;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  .sticky-tools {
    width: 100%;
    padding: 6px 12px 10px;
  }

  .page-logo {
    width: 100%;
    height: 42px;
    gap: 7px;
    margin-bottom: 5px;
  }

  .page-logo-oppo {
    width: 200px !important;
    height: 50px !important;
  }

  .search-box {
    max-width: none;
    margin-bottom: 7px;
  }

  .search {
    height: 44px;
    padding: 10px 15px 10px 42px;
    border-radius: 24px;
    font-size: 14px;
  }

  .search::placeholder {
    font-size: 12px;
  }

  .search-icon {
    left: 15px;
    width: 16px;
    height: 16px;
  }

  .series-filters {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
    gap: 6px;
    padding: 2px 4px 4px 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .series-button {
    height: 36px;
    padding: 7px 14px;
    font-size: 12px;
  }

  .sticky-tools-spacer {
    height: 158px;
  }

  .container {
    width: 100%;
    max-width: none;
    padding: 0 12px 30px;
    margin: 0;
  }

  .series-section {
    width: 100%;
    margin-bottom: 28px;
  }

  .series-title {
    font-size: 18px;
    line-height: 1.2;
    margin-bottom: 11px;
    gap: 8px;
  }

  .series-title::before {
    width: 3px;
    height: 19px;
  }

  .products-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .products {
    width: 100% !important;
    max-width: 100% !important;
    gap: 10px !important;
    padding: 2px 2px 12px !important;
    margin: 0 !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-padding-left: 2px;
    scroll-snap-type: x mandatory;
  }

  .products .card {
    flex: 0 0 calc(100% - 2px) !important;
    width: calc(100% - 2px) !important;
    min-width: calc(100% - 2px) !important;
    max-width: calc(100% - 2px) !important;
    padding: 14px;
    border-radius: 15px;
    scroll-snap-align: start;
  }

  .scroll-arrow {
    top: 110px;
    width: 38px;
    height: 38px;
    font-size: 23px;
  }

  .scroll-arrow-next {
    right: 7px;
  }

  .scroll-arrow-prev {
    left: 7px;
  }

  .product-title-row h2 {
    font-size: 18px;
    line-height: 1.2;
  }

  .badge-fine-serie {
    font-size: 10px;
    padding: 2px 6px;
  }

  .card-banners {
    gap: 5px;
    margin-bottom: 12px;
  }

  .bundle-banner,
  .promo-banner {
    width: 100%;
    margin: 0;
    padding: 7px 9px;
    border-radius: 7px;
    font-size: 11px;
    line-height: 1.25;
  }

  .product-image-wrapper {
    height: 200px;
    min-height: 200px;
    margin-bottom: 9px;
  }

  .color-buttons {
    gap: 7px;
    margin: 9px 0 12px;
  }

  .color-option {
    padding: 7px 8px;
    gap: 8px;
    border-radius: 10px;
  }

  .color-circle {
    width: 31px;
    height: 31px;
  }

  .color-name {
    font-size: 11px;
  }

  .color-code-value {
    font-size: 13px;
  }

  .copy-hint {
    font-size: 8px;
  }

  .action-btn,
  .details-toggle,
  .keypoints-toggle {
    padding: 11px 10px;
    font-size: 12px;
  }
  .keypoints-list li {
    font-size: 12px;
  }

  .details-inner {
    padding-top: 10px;
  }

  .specs {
    gap: 7px;
    font-size: 13px;
  }

  .spec {
    padding: 8px 9px;
  }

  .selling {
    margin-top: 12px;
    padding: 11px;
    font-size: 12px;
    line-height: 1.4;
  }

  .copy-toast {
    left: 50%;
    bottom: calc(18px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 30px);
    padding: 10px 15px;
    font-size: 12px;
  }

}

@media screen and (max-width: 380px) {

  .sticky-tools {
    padding-left: 9px;
    padding-right: 9px;
  }

  .sticky-tools-spacer {
    height: 158px;
  }

  .container {
    padding-left: 9px;
    padding-right: 9px;
  }

  .products {
    width: 100% !important;
    max-width: 100% !important;
  }

  .products .card {
    flex-basis: calc(100% - 2px) !important;
    width: calc(100% - 2px) !important;
    min-width: calc(100% - 2px) !important;
    max-width: calc(100% - 2px) !important;
  }

  .product-image-wrapper {
    height: 190px;
    min-height: 190px;
  }

}


/* ===================================================
   PULSANTE QR CODE E MODALE POPUP CENTRATO
   =================================================== */

.color-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.qr-trigger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  background: #ffffff;
  color: #222222;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.qr-trigger-btn:hover {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
  transform: scale(1.05);
}

.qr-trigger-btn:active {
  transform: scale(0.95);
}

.qr-icon {
  display: block;
  width: 19px;
  height: 19px;
}

/* Modale Overlay oscurato a centro schermo */
.qr-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.qr-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.qr-modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 26px 20px 22px;
  max-width: 360px;
  width: calc(100% - 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.qr-code-box {
  width: 100%;
  max-width: 310px;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  margin-bottom: 14px;
}

.qr-code-box img {
  display: block;
  margin: 0 auto;
}

.qr-modal-ean {
  font-family: monospace, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #222;
  background: #f5f5f5;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

/* ===================================================
   BANNER INSTALLAZIONE PWA (SOPRA LA PRIMA SERIE)
   =================================================== */

.pwa-install-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  background: #ffffff;
  padding: 14px 18px;
  margin: 0 0 24px 0;
  border-radius: 16px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.07);
  transition: opacity 0.3s ease, margin-bottom 0.3s ease, max-height 0.3s ease;
  overflow: hidden;
}

.pwa-install-banner.hidden {
  display: none !important;
}

.pwa-install-content {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.pwa-install-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex: 0 0 auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pwa-install-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pwa-install-text strong {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  line-height: 1.25;
}

.pwa-install-text span {
  font-size: 12px;
  color: #666;
  line-height: 1.35;
  margin-top: 2px;
}

.pwa-install-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.pwa-install-btn {
  background: #111;
  color: #fff;
  border: 0;
  border-radius: 20px;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}

.pwa-install-btn:hover {
  background: #333;
}

.pwa-install-btn:active {
  transform: scale(0.96);
}

.pwa-dismiss-btn {
  background: transparent;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 50%;
  transition: color 0.15s;
}

.pwa-dismiss-btn:hover {
  color: #111;
}

@media screen and (max-width: 600px) {
  .pwa-install-banner {
    padding: 12px 14px;
    margin-bottom: 18px;
    gap: 10px;
  }

  .pwa-install-icon {
    width: 38px;
    height: 38px;
  }

  .pwa-install-text strong {
    font-size: 13px;
  }

  .pwa-install-text span {
    font-size: 11px;
  }

  .pwa-install-btn {
    padding: 7px 14px;
    font-size: 12px;
  }
}


/* ===================================================
   TRANSIZIONI FLUIDE E MORBIDE PER IL CAMBIO SEZIONE
   =================================================== */

#products {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

#products.switching-macro {
  opacity: 0;
  transform: translateY(10px) scale(0.995);
  pointer-events: none;
}

.series-filters {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.series-filters.switching-filters {
  opacity: 0;
  transform: translateY(-4px);
}


/* Badge Fascia Prezzo (visibile solo se colonna prezzo compilata nell'Excel) */
.product-price-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #111111;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

.qr-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  color: #444444;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  z-index: 10;
}

.qr-modal-close:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #111111;
}

.qr-modal-close:active {
  transform: scale(0.92);
}

.qr-modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 24px;
  padding: 44px 22px 28px;
  max-width: 380px;
  width: calc(100% - 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.qr-modal-title {
  width: 100%;
  font-size: 15px;
  font-weight: 700;
  color: #111111;
  line-height: 1.35;
  padding: 0 34px;
  margin: 0 0 16px;
  word-break: break-word;
}

/* Rimozione del doppio riquadro interno nelle specifiche */
.spec-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  background: #ffffff;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  color: #111111;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}

/* ===================================================
   ASSISTENTE IA CLIENT-SIDE (CHATBOT OFFLINE)
   =================================================== */
.ai-assistant-fab {
  position: fixed;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  right: 20px;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #111111;
  color: #ffffff;
  padding: 11px 18px;
  border-radius: 999px;
  font-family: 'OPPOSans', Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s, background 0.15s;
}

.ai-assistant-fab:hover {
  background: #333333;
  transform: scale(1.04);
}

.ai-assistant-fab:active {
  transform: scale(0.96);
}

.ai-assistant-fab svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Modale Chat */
.ai-chat-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.ai-chat-modal.show {
  opacity: 1;
  pointer-events: auto;
}

@media screen and (min-width: 640px) {
  .ai-chat-modal {
    align-items: center;
    padding: 20px;
	}
}

.ai-chat-container {
  position: relative;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 440px;
  height: 85dvh;
  max-height: 600px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  overflow: hidden;
}

@media screen and (max-width: 639px) {
  .ai-chat-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px !important;
  }
  .ai-chat-container {
    position: relative !important;
    width: 100% !important;
    max-width: 400px !important;
    height: 480px !important;
    max-height: 75vh !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3) !important;
  }
  .ai-chat-messages {
    flex: 1 !important;
    overflow-y: auto !important;
    padding-bottom: 70px !important; /* Spazio per evitare che i messaggi vadano sotto la barra fissa */
  }
  .ai-chat-input-area {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #ffffff !important;
    border-top: 1px solid #eee !important;
    padding: 12px 16px !important;
    z-index: 100 !important;
  }
}
@media screen and (min-width: 640px) {
  .ai-chat-container {
    border-radius: 24px;
    height: 600px;
    transform: scale(0.92);
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.25s;
  }
  .ai-chat-modal.show .ai-chat-container {
    transform: scale(1);
  }
}

.ai-chat-modal.show .ai-chat-container {
  transform: translateY(0);
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}

.ai-chat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

.ai-chat-close {
  background: transparent;
  border: 0;
  font-size: 24px;
  color: #777;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}

.ai-chat-close:hover {
  color: #111;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fdfdfd;
}

.ai-msg {
  max-width: 85%;
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.45;
  word-break: break-word;
}

.ai-msg.user {
  background: #111111;
  color: #ffffff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.ai-msg.assistant {
  background: #f1f3f5;
  color: #1a1a1a;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid #e5e7eb;
}

.ai-chat-input-area {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #eee;
  background: #fff;
  z-index: 10;
}

.ai-chat-input {
  flex: 1;
  height: 42px;
  padding: 8px 14px;
  border: 1px solid #ddd;
  border-radius: 21px;
  font-family: 'OPPOSans', Arial, Helvetica, sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.ai-chat-input:focus {
  border-color: #111;
}

.ai-chat-send {
  background: #111;
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.15s, transform 0.1s;
}

.ai-chat-send:active {
  transform: scale(0.92);
}

.ai-chat-send svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Tasto IA Circolare Gradiente Viola-Blu Accanto alla Barra di Ricerca */
.ai-inline-btn {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.2s;
}

.ai-inline-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 22px rgba(124, 58, 237, 0.45);
}

.ai-inline-btn:active {
  transform: scale(0.94);
}

.ai-inline-btn svg {
  display: block;
  width: 21px;
  height: 21px;
  fill: #ffffff;
}





@media screen and (max-width: 639px) {
  .ai-chat-modal {
    height: var(--ai-chat-screen-height, 100vh) !important;
    bottom: auto !important;
    align-items: flex-start !important;
    justify-content: center !important;
    overflow: visible !important;
  }

  .ai-chat-container,
  .ai-chat-modal.show .ai-chat-container {
    flex: 0 0 auto !important;
    margin-top: calc(var(--ai-chat-top, 12px) - 12px) !important;
    height: var(--ai-chat-height, 480px) !important;
    max-height: none !important;
    transform: none !important;
    transition: none !important;
    overflow: visible !important;
  }

  .ai-chat-header {
    flex: 0 0 auto !important;
    border-radius: 20px 20px 0 0;
  }

  .ai-chat-messages {
    min-height: 0 !important;
    padding-bottom: 80px !important;
    border-radius: 0 0 20px 20px;
  }

  .ai-chat-input-area {
    bottom: 0 !important;
    border-radius: 0 0 20px 20px;
    will-change: transform;
    transition: none !important;
  }
}

@media screen and (max-width: 639px) {
  html.ai-chat-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  .ai-chat-modal {
    position: fixed !important;
    inset: 0 auto auto 0 !important;
    width: 100% !important;
    height: var(--ai-chat-screen-height, 100dvh) !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    overscroll-behavior: contain !important;
    background: #fff !important;
  }

  .ai-chat-container,
  .ai-chat-modal.show .ai-chat-container {
    position: relative !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    transform: none !important;
    transition: none !important;
    box-shadow: none !important;
  }

  .ai-chat-header {
    flex: 0 0 auto !important;
    border-radius: 0 !important;
    padding-top: max(16px, env(safe-area-inset-top, 0px)) !important;
  }

  .ai-chat-messages {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    border-radius: 0 !important;
    padding-bottom: calc(92px + var(--ai-keyboard-overlap, 0px)) !important;
    scroll-padding-bottom: calc(92px + var(--ai-keyboard-overlap, 0px));
  }

  .ai-chat-input-area {
    position: absolute !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 100 !important;
    border-radius: 0 !important;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    transform: translate3d(0, calc(-1 * var(--ai-keyboard-overlap, 0px)), 0) !important;
    transition: none !important;
  }
}

@media screen and (max-width: 639px) {
  html.ai-chat-open, body.ai-chat-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  #aiChatModal.ai-chat-modal {
    position: fixed !important;
    top: var(--ai-viewport-offset-top, 0px) !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    width: 100vw !important;
    height: var(--ai-chat-screen-height, 100vh) !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    overflow: hidden !important;
    background: #fff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  #aiChatModal .ai-chat-container,
  #aiChatModal.show .ai-chat-container {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    transition: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
  }

  #aiChatModal .ai-chat-header {
    flex: 0 0 auto !important;
    padding-top: max(16px, env(safe-area-inset-top, 0px)) !important;
  }

  #aiChatModal .ai-chat-messages {
    flex: 1 1 auto !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: calc(100px + var(--ai-keyboard-overlap, 0px)) !important;
  }

  #aiChatModal .ai-chat-input-area {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    margin: 0 !important;
    transform: translate3d(0, calc(-1 * var(--ai-keyboard-overlap, 0px)), 0) !important;
    transition: none !important;
    border-radius: 0 !important;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

.ai-chat-messages .ai-list-item { display:inline-block; padding-left:8px; line-height:1.55; }
.ai-chat-messages .ai-sources { font-size:11px; opacity:.8; overflow-wrap:anywhere; }
.ai-chat-messages .ai-sources a { color:#5b37b7; text-decoration:underline; }


.product-title-row { align-items: flex-start; }
.compare-product-name { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.compare-product-name h2 { margin: 0; }
.compare-product-name .badge-fine-serie { margin-top: 0; }
.product-compare-btn { flex: 0 0 auto; border: 1px solid #008b5e; border-radius: 9px; background: #008b5e; color: #fff; font: 600 12px 'OPPOSans',Arial,sans-serif; padding: 9px 12px; cursor: pointer; }
.product-compare-btn:active { opacity: .8; }
.product-compare-modal { position: fixed; inset: 0; z-index: 30000; background: rgba(0,0,0,.48); display: none; align-items: center; justify-content: center; padding: 20px; font-family: 'OPPOSans',Arial,sans-serif; }
.product-compare-modal.show { display: flex; }
.product-compare-shell { display: flex; flex-direction: column; width: min(860px,100%); max-height: min(90dvh,900px); background: white; border-radius: 18px; overflow: hidden; box-shadow: 0 15px 60px rgba(0,0,0,.25); }
.product-compare-header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid #e6e6e6; }
.product-compare-header strong { display: block; font-size: 19px; }
.product-compare-header small { display: block; margin-top: 3px; color: #666; }
.product-compare-close { background: #f2f2f2; color: #222; border: none; border-radius: 50%; height: 36px; width: 36px; flex: 0 0 auto; font-size: 25px; cursor: pointer; }
.product-compare-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 18px 20px 28px; }
.product-compare-prompt { font-size: 14px; margin: 0 0 16px; line-height: 1.5; }
.product-compare-search { width: 100%; padding: 13px 15px; border: 1px solid #d5d5d5; outline: none; border-radius: 12px; font: 14px 'OPPOSans',Arial,sans-serif; margin-bottom: 12px; }
.product-compare-search:focus { border-color: #008b5e; }
.product-compare-choices { display: grid; gap: 7px; }
.product-compare-choice { width: 100%; padding: 10px 12px; background: #fafafa; border: 1px solid #e5e5e5; border-radius: 12px; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; font: 600 14px 'OPPOSans',Arial,sans-serif; }
.product-compare-choice img,.product-compare-choice-placeholder { width: 46px; height: 52px; object-fit: contain; flex: 0 0 auto; }
.product-compare-choice-placeholder { font-size: 10px; display: grid; place-items: center; color: #888; }
.product-compare-choice span:nth-last-child(2) { flex: 1; }
.product-compare-choice span:last-child { margin-left: auto; font-size: 24px; color: #008b5e; }
.product-compare-back { border: 0; background: transparent; color: #007a50; font: 600 14px 'OPPOSans',Arial,sans-serif; padding: 3px 0 16px; cursor: pointer; }
.product-compare-table { border: 1px solid #e8e8e8; border-radius: 12px; overflow: hidden; }
.product-compare-table-header,.product-compare-table-row { display: grid; grid-template-columns: 25% 37.5% 37.5%; }
.product-compare-table-header { background: #f0f7f3; }
.product-compare-table-header > *, .product-compare-table-row > * { padding: 13px 12px; min-width: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.45; }
.product-compare-table-header > * { font-weight: 700; }
.product-compare-table-row:not(:last-child) { border-bottom: 1px solid #e8e8e8; }
.product-compare-table-row > *:not(:last-child),.product-compare-table-header > *:not(:last-child) { border-right: 1px solid #e8e8e8; }
.product-compare-label { font-weight: 700; color: #333; background: #fafafa; }
.product-compare-empty { padding: 18px; text-align: center; color: #666; }
@media(max-width:640px) { .product-compare-modal { padding: 0; } .product-compare-shell { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; } .product-compare-header { padding: 14px 16px; } .product-compare-content { padding: 15px 12px 30px; } .product-compare-table-header,.product-compare-table-row { grid-template-columns: 24% 38% 38%; } .product-compare-table-header > *, .product-compare-table-row > * { padding: 11px 7px; font-size: 11px; } .product-compare-btn { padding: 8px 9px; font-size: 11px; } }

.product-compare-advice { margin: 0 0 18px; padding: 16px 18px; border: 1px solid rgba(14,116,224,.22); border-radius: 12px; background: rgba(14,116,224,.08); font-family: 'OPPOSans',Arial,sans-serif; }
.product-compare-advice-title { display: flex; align-items: center; gap: 8px; color: #0b5fb3; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 8px; }
.product-compare-advice-icon { width: 30px; height: 30px; flex: 0 0 30px; object-fit: cover; border-radius: 50%; }
.product-compare-advice-text { color: #1a2a3a; font-size: 13px; font-weight: 500; line-height: 1.5; white-space: normal; }
@media (max-width: 640px) { .product-compare-advice { padding: 14px; margin-bottom: 14px; } .product-compare-advice-text { font-size: 12.5px; } }


/* Find OPPO v37: font e pulsante assistente */
.ai-inline-btn {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 132px !important;
  height: 48px !important;
  border-radius: 100px !important;
  background: #1485ed !important;
  color: #fff !important;
  display: inline-flex !important;
  gap: 8px !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 5px 13px 5px 5px !important;
  white-space: nowrap;
  font: 600 13px 'OPPOSans', Arial, sans-serif !important;
  box-shadow: 0 4px 16px rgba(20,133,237,.24) !important;
  transition: transform .22s cubic-bezier(.2,.85,.25,1), box-shadow .22s ease, background .22s ease !important;
}
.ai-inline-btn:hover {background:#0876df!important;transform:translateY(-2px) scale(1.02)!important;box-shadow:0 8px 23px rgba(20,133,237,.3)!important}
.ai-inline-btn:active {transform:scale(.96)!important}
.ai-inline-avatar {width:38px!important;height:38px!important;max-width:none!important;object-fit:cover!important;border-radius:50%!important;flex:0 0 38px!important;border:2px solid rgba(255,255,255,.7)!important}
@media (max-width:390px){.ai-inline-btn{min-width:112px!important;font-size:12px!important;padding-right:9px!important;gap:5px!important}.ai-inline-avatar{width:34px!important;height:34px!important;flex-basis:34px!important}}

.product-title-row {align-items:center!important}
.compare-product-name {align-self:center!important}
.product-compare-btn {align-self:center!important;white-space:nowrap!important;transition:transform .2s ease, background .2s ease, box-shadow .2s ease!important}
.product-compare-btn:hover {background:#00754f;transform:translateY(-1px);box-shadow:0 5px 12px rgba(0,139,94,.19)}

#aiChatModal, #aiChatModal *,
.product-compare-modal, .product-compare-modal * {font-family:'OPPOSans',Arial,Helvetica,sans-serif!important}

/* Apertura e chiusura fluide senza cambiare la geometria del popup a tastiera aperta */
#aiChatModal {transition:opacity .26s ease!important}
@media(min-width:640px){
  #aiChatModal .ai-chat-container {opacity:0;transform:translate3d(0,22px,0) scale(.965)!important;transition:transform .32s cubic-bezier(.16,1,.3,1),opacity .25s ease!important}
  #aiChatModal.show .ai-chat-container {opacity:1;transform:translate3d(0,0,0) scale(1)!important}
}
@media(max-width:639px){
  #aiChatModal .ai-chat-container {opacity:0!important;transform:translate3d(0,14px,0)!important;transition:opacity .25s ease,transform .3s cubic-bezier(.16,1,.3,1)!important}
  #aiChatModal.show .ai-chat-container {opacity:1!important;transform:translate3d(0,0,0)!important}
}
.product-compare-modal {display:flex!important;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .25s ease,visibility 0s linear .3s;}
.product-compare-modal.show {opacity:1;visibility:visible;pointer-events:auto;transition:opacity .25s ease,visibility 0s;}
.product-compare-shell {opacity:0;transform:translate3d(0,24px,0) scale(.975);transition:transform .34s cubic-bezier(.16,1,.3,1),opacity .28s ease;will-change:transform,opacity}
.product-compare-modal.show .product-compare-shell {opacity:1;transform:translate3d(0,0,0) scale(1)}
@media(max-width:640px){.product-compare-shell{transform:translate3d(0,36px,0) scale(1)}}
@media(prefers-reduced-motion:reduce){#aiChatModal,.ai-chat-container,.product-compare-modal,.product-compare-shell{transition:none!important}}

/* Find OPPO v38 - ricerca e assistente in un unico campo */
.search-box-wrapper.search-box-combined {
  display: block !important;
  width: 100% !important;
  max-width: 620px !important;
  margin: 0 auto 10px !important;
}
.search-box-combined .search-box {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  align-items: center;
}
.search-box-combined .search {
  width: 100%;
  padding-right: 157px !important;
}
.search-box-combined .ai-inline-btn {
  position: absolute !important;
  right: 5px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 3;
  min-width: 0 !important;
  width: auto !important;
  height: 38px !important;
  padding: 3px 11px 3px 3px !important;
  gap: 7px !important;
  box-shadow: none !important;
  font-size: 12px !important;
}
.search-box-combined .ai-inline-btn:hover { transform: translateY(-50%) !important; background: #0876df !important; }
.search-box-combined .ai-inline-btn:active { transform: translateY(-50%) scale(.97) !important; }
.search-box-combined .ai-inline-avatar {
  width: 32px !important;
  height: 32px !important;
  flex: 0 0 32px !important;
}
@media(max-width:390px) {
  .search-box-combined .search { padding-right: 124px !important; font-size: 13px; }
  .search-box-combined .search::placeholder { font-size: 11px; }
  .search-box-combined .ai-inline-btn { padding-right: 8px !important; gap: 4px !important; font-size: 11px !important; }
  .search-box-combined .ai-inline-avatar { width: 30px !important; height: 30px !important; flex-basis: 30px !important; }
}
/* Compare: conserva il popup nel layout durante ingresso/uscita e anima l'interno */
.product-compare-modal {
  display: flex !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity .28s ease, visibility 0s linear .35s !important;
}
.product-compare-modal.show {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: opacity .28s ease, visibility 0s !important;
}
.product-compare-modal .product-compare-shell {
  opacity: 0 !important;
  transform: translate3d(0,28px,0) scale(.97) !important;
  transition: opacity .27s ease, transform .35s cubic-bezier(.16,1,.3,1) !important;
}
.product-compare-modal.show .product-compare-shell {
  opacity: 1 !important;
  transform: translate3d(0,0,0) scale(1) !important;
}
@media (max-width:640px) {
  .product-compare-modal .product-compare-shell { transform: translate3d(0,44px,0) scale(1) !important; }
}
@media (prefers-reduced-motion: reduce) {
  .product-compare-modal,.product-compare-modal .product-compare-shell { transition: none !important; }
}

/* v43 - allineamento coerente del nome con il testo Confronta */
.product-title-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  grid-template-rows: minmax(36px, auto) auto !important;
  column-gap: 8px !important;
  row-gap: 0 !important;
  align-items: center !important;
  margin-bottom: 8px !important;
}
.product-title-row > .compare-product-name {
  display: contents !important;
}
.product-title-row .compare-product-name > h2 {
  grid-column: 1 !important;
  grid-row: 1 !important;
  display: flex !important;
  align-items: center !important;
  align-self: stretch !important;
  min-height: 36px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.25 !important;
  transform: none !important;
  overflow-wrap: anywhere !important;
}
.product-title-row > .product-compare-btn {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  align-self: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 6px 10px !important;
  line-height: 1 !important;
  transform: none !important;
  white-space: nowrap !important;
}
.product-title-row .compare-product-name > .badge-fine-serie {
  grid-column: 1 !important;
  grid-row: 2 !important;
  justify-self: start !important;
  align-self: start !important;
  position: static !important;
  display: inline-flex !important;
  width: fit-content !important;
  height: auto !important;
  margin: 1px 0 0 !important;
  padding: 2px 6px !important;
  font-size: 10px !important;
  line-height: 1.1 !important;
  transform: none !important;
}
/* Solo quando il badge manca, mantieni lo spazio minimo sotto la riga. */
.product-title-row:not(:has(.badge-fine-serie))::after {
  content: '';
  grid-column: 1 !important;
  grid-row: 2 !important;
  height: 16px !important;
}
@media screen and (min-width: 901px) {
  .product-title-row .compare-product-name > h2 {
    font-size: 17px !important;
    letter-spacing: -0.2px !important;
  }
}

/* v69 – Immagini prodotti nella testata del confronto */
.product-compare-table-header { align-items: stretch; }
.product-compare-model {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; min-width: 0; text-align: center;
}
.product-compare-model-photo {
  display: block; width: min(100%, 120px); height: 110px;
  object-fit: contain; object-position: center;
}
.product-compare-model-placeholder {
  display: grid; place-items: center; height: 70px; width: 100%;
  color: #9ca3af; font-size: 13px; font-weight: 700;
}
.product-compare-model strong { font-weight: 700; overflow-wrap: anywhere; }
.product-compare-advice-text strong { font-weight: 700; }
@media (max-width: 640px) {
  .product-compare-model-photo { height: 85px; width: min(100%, 90px); }
  .product-compare-model { gap: 6px; }
}

/* Zoom immagini delle schede prodotto */
.product-image-wrapper { position: relative; }
.product-image-zoom-btn { position: absolute; top: auto; bottom: 8px; left: 50%; right: auto; transform: translateX(-50%); z-index: 5; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.18); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.45); border-radius: 50%; box-shadow: 0 2px 12px rgba(0,0,0,.08); cursor: pointer; transition: transform .2s ease, background .2s ease; }
.product-image-zoom-btn:hover { transform: translateX(-50%) scale(1.1); background: rgba(255,255,255,.35); }
.product-image-zoom-btn:active { transform: translateX(-50%) scale(.95); }
.product-image-zoom-btn svg { width: 18px; height: 18px; fill: none; stroke: #222; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.product-image-modal { position: fixed; inset: 0; z-index: 50000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.68); backdrop-filter: blur(10px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s ease, visibility .25s; }
.product-image-modal.show { opacity: 1; visibility: visible; pointer-events: auto; }
.product-image-modal-content { position: relative; width: 100%; max-width: 720px; max-height: 92dvh; padding: 48px 20px 20px; background: #fff; border-radius: 20px; transform: translateY(12px) scale(.94); transition: transform .28s ease; }
.product-image-modal.show .product-image-modal-content { transform: translateY(0) scale(1); }
.product-image-modal-content img { display: block; width: 100%; max-height: calc(92dvh - 80px); object-fit: contain; }
.product-image-modal-close { position: absolute; top: 9px; right: 9px; z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #eee; font-size: 25px; cursor: pointer; }
@media (max-width:640px) { .product-image-modal { padding: 12px; } .product-image-modal-content { border-radius: 16px; padding: 45px 12px 16px; } }
@media (prefers-reduced-motion:reduce) { .product-image-modal,.product-image-modal-content,.product-image-zoom-btn { transition: none !important; } }

/* Vendita rapida integrata nel chatbot */
.ai-fast-sale-entry { padding: 4px 14px 10px; flex: 0 0 auto; }
.ai-fast-sale-trigger { display:flex; align-items:center; justify-content:center; gap:9px; width:100%; min-height:38px; border-radius:12px; background:rgba(124,58,237,.07); color:#5b2aac; border:1px solid rgba(124,58,237,.24); font:inherit; font-size:13px; font-weight:650; cursor:pointer; }
.ai-fast-sale-trigger:hover { background:rgba(124,58,237,.13); }
.ai-fast-sale-trigger-icon { font-size:17px; }
.ai-fast-sale-form[hidden] {display:none!important;}
.ai-fast-sale-form { flex:0 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; margin:0 12px 10px; padding:14px; border:1px solid rgba(124,58,237,.17); background:var(--bg-card,#fff); border-radius:14px; box-shadow:0 4px 18px rgba(0,0,0,.06); display:flex; flex-direction:column; gap:7px; font-size:13px; }
.ai-fast-sale-top { display:flex; align-items:center; justify-content:space-between; }
.ai-fast-sale-top strong {font-size:15px;}
.ai-fast-sale-top button {background:transparent;border:0;font-size:24px;cursor:pointer;color:inherit;}
.ai-fast-sale-form p { margin:0 0 5px; color:#6d6d74; line-height:1.4; }
.ai-fast-sale-form label {font-size:12px;font-weight:650;margin-top:5px;}
.ai-fast-sale-form select,.ai-fast-sale-form textarea {width:100%;min-width:0;box-sizing:border-box;border:1px solid #d8d8df;border-radius:9px;background:#fff;color:#222;font:inherit;padding:9px;outline-color:#7c3aed;}
.ai-fast-sale-grid {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px;}
.ai-fast-sale-grid > div {display:flex;flex-direction:column;gap:7px;min-width:0;}
.ai-fast-sale-form textarea {resize:vertical;min-height:54px;}
.ai-fast-sale-submit {border:0;border-radius:10px;padding:11px 9px;margin-top:6px;background:#6c37cb;color:white;font:inherit;font-weight:700;cursor:pointer;}
.ai-fast-sale-submit:active {opacity:.8;}
@media(max-width:390px){ .ai-fast-sale-grid {grid-template-columns:1fr;} }

/* v75: il valore EAN e gia leggibile nel codice a barre */
#qrModalEan { display: none !important; }


/* v77: vendita rapida sopra la barra di digitazione, senza ridimensionare il popup. */
#aiChatModal .ai-chat-container { position: relative !important; }
#aiChatModal .ai-chat-footer {
  position: absolute;
  z-index: 110;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  transform: translate3d(0, calc(-1 * var(--ai-keyboard-overlap, 0px)), 0);
}
#aiChatModal .ai-chat-footer > * { pointer-events: auto; }
#aiChatModal .ai-chat-footer .ai-fast-sale-entry {
  padding: 6px 14px;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.06);
  flex: 0 0 auto;
}
#aiChatModal .ai-chat-footer .ai-fast-sale-trigger { min-height: 36px; }
#aiChatModal .ai-chat-footer .ai-fast-sale-form {
  order: -1;
  flex: 0 1 auto;
  width: calc(100% - 24px);
  max-height: min(468px, 70dvh);
  max-height: min(468px, calc(var(--ai-chat-screen-height, 100dvh) - var(--ai-keyboard-overlap, 0px) - 175px));
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 12px 5px;
  background: #fff;
  box-shadow: 0 -6px 25px rgba(0,0,0,.13);
}
#aiChatModal .ai-chat-footer .ai-chat-input-area {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box;
  transform: none !important;
  flex: 0 0 auto;
  z-index: auto !important;
}
#aiChatModal .ai-chat-messages { padding-bottom: 165px !important; }
@media (max-width: 639px) {
  #aiChatModal .ai-chat-footer { transition: none !important; }
  #aiChatModal .ai-chat-footer .ai-fast-sale-form {
    max-height: min(540px, calc(var(--ai-chat-screen-height, 100dvh) - var(--ai-keyboard-overlap, 0px) - 175px));
  }
  #aiChatModal .ai-chat-footer .ai-chat-input-area {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }
  #aiChatModal .ai-chat-messages {
    padding-bottom: calc(165px + var(--ai-keyboard-overlap, 0px)) !important;
  }
}

/* v78: maggiore spazio verticale per visualizzare subito il pulsante di invio.
   Il contenitore del chatbot non cambia dimensioni. */
#aiChatModal .ai-chat-footer .ai-fast-sale-form {
  gap: 5px;
  padding: 11px 14px;
}
#aiChatModal .ai-chat-footer .ai-fast-sale-form label { margin-top: 3px; }
#aiChatModal .ai-chat-footer .ai-fast-sale-form select { padding: 7px 9px; }
#aiChatModal .ai-chat-footer .ai-fast-sale-form textarea { min-height: 45px; }
#aiChatModal .ai-chat-footer .ai-fast-sale-submit {
  flex: 0 0 auto;
  margin-top: 4px;
}

/* v79: navigazione inferiore con aree touch più ampie e isolate dal campo ricerca. */
@media (max-width: 640px), (pointer: coarse) {
  .macro-nav.mobile-floating {
    bottom: calc(22px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 6px !important;
    min-height: 58px !important;
    touch-action: manipulation;
    isolation: isolate;
  }
  .macro-nav.mobile-floating .macro-button {
    min-height: 48px !important;
    height: 48px !important;
    padding: 8px 5px !important;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    position: relative;
    z-index: 1;
  }
  .container { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* v80 - Chat chiuso: anche i controlli figli devono essere non interattivi.
   Evita che input e pulsanti invisibili intercettino il touch sulla barra categorie. */
#aiChatModal:not(.show) {
  visibility: hidden !important;
  pointer-events: none !important;
}
#aiChatModal:not(.show) *,
#aiChatModal:not(.show) .ai-chat-footer > * {
  pointer-events: none !important;
}
#aiChatModal.show {
  visibility: visible !important;
  pointer-events: auto !important;
}

/* v82: retry manuale discreto nei messaggi AI */
.ai-manual-retry { display: block; margin-top: 10px; padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(0,0,0,.16); background: rgba(255,255,255,.75); color: #242424; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; touch-action: manipulation; }
.ai-manual-retry:hover { background: #fff; }
.ai-manual-retry:focus-visible { outline: 2px solid #008f64; outline-offset: 2px; }

/* v89: Badge tra titolo e codici prodotto, solo se presenti. */
.product-title-row {
  grid-template-rows: minmax(36px, auto) !important;
  margin-bottom: 0 !important;
}
.product-title-row::after,
.product-title-row:not(:has(.badge-fine-serie))::after {
  content: none !important;
  display: none !important;
}
.product-status-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  width: 100%;
  min-width: 0;
  margin: 6px 0 8px;
  padding: 0;
}
.product-status-badges > .badge-fine-serie,
.product-status-badges > .bundle-banner,
.product-status-badges > .promo-banner {
  display: inline-flex !important;
  width: fit-content !important;
  max-width: 100%;
  height: auto !important;
  align-self: flex-start;
  align-items: center;
  margin: 0 !important;
  padding: 3px 7px !important;
  border-radius: 6px;
  font-size: 10px !important;
  font-weight: 700;
  line-height: 1.3 !important;
  white-space: normal;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}
.product-status-badges > .bundle-banner {
  background: rgba(255, 216, 0, .28);
  color: #111;
}
.product-status-badges > .promo-banner {
  background: rgba(46, 204, 113, .22);
  color: #14532d;
}
/* Nessun margine tra titolo e codici se non esistono badge. */
.product-title-row:has(+ .color-buttons) {
  margin-bottom: 0 !important;
}

/* v90: preserva la spaziatura originale delle card senza banner.
   I badge compaiono solo se presenti e non alterano il padding interno della card. */
.product-title-row {
  margin-bottom: 8px !important;
}
/* Spazio originale sotto il titolo delle schede prive di badge. */
.product-title-row:not(:has(+ .product-status-badges))::after {
  content: '' !important;
  display: block !important;
  grid-column: 1 !important;
  grid-row: 2 !important;
  height: 16px !important;
}
/* Quando sono presenti i badge, nessuno spazio riservato viene aggiunto. */
.product-title-row:has(+ .product-status-badges)::after {
  content: none !important;
  display: none !important;
}
.product-status-badges {
  margin-top: 0 !important;
  margin-bottom: 8px !important;
}

/* v91: identical badge area for all cards, even with no active banner.
   JS matches the slot height to the tallest visible Banner/Promo combination.
   Keep the original card padding unchanged. */
.product-title-row {
  margin-bottom: 0 !important;
}
.product-title-row::after,
.product-title-row:not(:has(.badge-fine-serie))::after,
.product-title-row:not(:has(+ .product-status-badges))::after {
  content: none !important;
  display: none !important;
}
.product-status-badges {
  flex: 0 0 auto;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  width: 100%;
  margin: 0 0 8px !important;
  padding: 0 !important;
  box-sizing: border-box;
}

/* v92: accent verde OPPO per Vendita Rapida */
#aiChatModal .ai-fast-sale-trigger {
  background: rgba(0, 139, 94, 0.12);
  border-color: rgba(0, 139, 94, 0.28);
  color: #007a50;
}
#aiChatModal .ai-fast-sale-trigger:hover {
  background: rgba(0, 139, 94, 0.20);
  border-color: rgba(0, 139, 94, 0.40);
  color: #00603f;
}
#aiChatModal .ai-fast-sale-trigger:focus-visible,
#aiChatModal .ai-fast-sale-submit:focus-visible {
  outline: 2px solid #008b5e;
  outline-offset: 2px;
}
#aiChatModal .ai-fast-sale-form {
  border-color: rgba(0, 139, 94, 0.17);
}
#aiChatModal .ai-fast-sale-form select:focus-visible,
#aiChatModal .ai-fast-sale-form textarea:focus-visible {
  outline-color: #008b5e;
}
#aiChatModal .ai-fast-sale-submit {
  background: #008b5e;
  color: #fff;
}
#aiChatModal .ai-fast-sale-submit:hover {
  background: #007a50;
}

/* Find OPPO v93: Vendita / Training — due voci con area touch uniforme. */
.macro-nav > a.macro-button {
  flex: 1 1 50% !important;
  text-decoration: none !important;
  box-sizing: border-box;
  min-height: 44px;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
.macro-nav.mobile-floating > a.macro-button {
  flex: 1 1 50% !important;
  min-height: 44px;
}
@media (max-width: 640px) {
  .macro-nav > a.macro-button { flex: 1 1 50% !important; }
}
