/* =========================================================
   scheda.css
   Stile dedicato alle schede prodotto
   ========================================================= */

.scheda-shell {
  width: min(100% - 32px, 1180px);
  margin: 0 auto;
  padding: 16px 0 40px;
}

.scheda-main {
  display: grid;
  gap: 20px;
}

/* ---------------------------------------------------------
   BREADCRUMB
   --------------------------------------------------------- */

.scheda-breadcrumb {
  padding: 12px 18px;
  background: #ffffff;
  border: 1px solid #ddd8d2;
  border-radius: 14px;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: ">";
  color: #aaa;
}

.breadcrumb-item a {
  color: #8f1d21;
  text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

.breadcrumb-item--current {
  color: #4a5560;
}

/* ---------------------------------------------------------
   HERO SCHEDA
   --------------------------------------------------------- */

.scheda-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  background: #ffffff;
  border: 1px solid #ddd8d2;
  border-radius: 24px;
  padding: 24px 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .scheda-hero {
    grid-template-columns: 1fr 1fr;
    padding: 34px 28px;
    gap: 32px;
  }
}

@media (min-width: 992px) {
  .scheda-hero {
    grid-template-columns: 480px 1fr;
    padding: 40px 34px;
  }
}

/* ---------------------------------------------------------
   GALLERY
   --------------------------------------------------------- */

.scheda-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.gallery-main {
  position: relative;
  background: #f8f5f2;
  border: 1px solid #e3ddd7;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 100%;
}

.gallery-main__frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-main__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 14px;
  transition: opacity 0.2s ease;
}

.gallery-main__img.is-loading {
  opacity: 0;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid #ddd8d2;
  border-radius: 999px;
  color: #8f1d21;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: background 0.18s ease, color 0.18s ease;
}

.gallery-arrow:hover {
  background: #8f1d21;
  color: #ffffff;
}

.gallery-arrow--prev {
  left: 10px;
}

.gallery-arrow--next {
  right: 10px;
}

/* Thumbs */

.gallery-thumbs {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #ddd8d2 transparent;
}

.gallery-thumbs::-webkit-scrollbar {
  height: 4px;
}

.gallery-thumbs::-webkit-scrollbar-track {
  background: transparent;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
  background: #ddd8d2;
  border-radius: 999px;
}

.gallery-thumbs__track {
  display: inline-flex;
  gap: 8px;
  padding-bottom: 4px;
  min-width: 100%;
  width: max-content;
}


.gallery-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #f8f5f2;
  cursor: pointer;
  transition: border-color 0.18s ease;
  overflow: hidden;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
  display: block;
}

.gallery-thumb:hover {
  border-color: #c9a0a0;
}

.gallery-thumb.is-active {
  border-color: #8f1d21;
}

/* ---------------------------------------------------------
   INTRO PRODOTTO
   --------------------------------------------------------- */

.scheda-intro {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.scheda-kicker {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8f1d21;
}

.scheda-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  color: #1f2933;
}

.scheda-lead {
  margin: 0;
  color: #4a5560;
  line-height: 1.65;
}

.scheda-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.scheda-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.scheda-btn--primary {
  background: #8f1d21;
  color: #ffffff;
  border: 2px solid #8f1d21;
}

.scheda-btn--primary:hover {
  background: #6e1519;
  border-color: #6e1519;
  color: #ffffff;
  text-decoration: none;
}

.scheda-btn--secondary {
  background: transparent;
  color: #8f1d21;
  border: 2px solid #ddd8d2;
}

.scheda-btn--secondary:hover {
  border-color: #8f1d21;
  text-decoration: none;
}

/* ---------------------------------------------------------
   TAB TECNICI
   --------------------------------------------------------- */

.scheda-tabs {
  background: #ffffff;
  border: 1px solid #ddd8d2;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}

.scheda-tabs__nav {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid #ddd8d2;
  background: #f8f5f2;
}

.scheda-tabs__nav::-webkit-scrollbar {
  display: none;
}

.scheda-tab-btn {
  flex: 0 0 auto;
  padding: 14px 22px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  font-weight: 600;
  color: #4a5560;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.scheda-tab-btn:hover {
  color: #8f1d21;
}

.scheda-tab-btn.is-active {
  color: #8f1d21;
  border-bottom-color: #8f1d21;
  background: #ffffff;
}

.scheda-tab-panel {
  padding: 24px 18px;
}

@media (min-width: 768px) {
  .scheda-tab-panel {
    padding: 28px 28px;
  }
}

@media (min-width: 992px) {
  .scheda-tab-panel {
    padding: 34px 34px;
  }
}

/* ---------------------------------------------------------
   BLOCCHI CONTENUTO
   --------------------------------------------------------- */

.scheda-block {
  margin-bottom: 28px;
}

.scheda-block:last-child {
  margin-bottom: 0;
}

.scheda-block__title {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.2;
  color: #8f2f23;
}

.scheda-list {
  margin: 0 0 12px;
  padding-left: 20px;
  color: #4a5560;
  line-height: 1.7;
}

.scheda-list:last-child {
  margin-bottom: 0;
}

.scheda-list li {
  margin-bottom: 6px;
}

.scheda-text {
  margin: 0 0 12px;
  color: #4a5560;
  line-height: 1.65;
}

.scheda-note {
  margin: 12px 0;
  padding: 10px 14px;
  background: #f8f5f2;
  border-left: 3px solid #8f1d21;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  color: #4a5560;
  line-height: 1.6;
}

/* ---------------------------------------------------------
   TABELLA SPECIFICHE
   --------------------------------------------------------- */

.scheda-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.scheda-table tr {
  border-bottom: 1px solid #e3ddd7;
}

.scheda-table tr:last-child {
  border-bottom: none;
}

.scheda-table th {
  width: 50%;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: #1f2933;
  background: #f8f5f2;
}

.scheda-table td {
  padding: 12px 14px;
  color: #4a5560;
}

@media (min-width: 768px) {
  .scheda-table th {
    width: 29%;
  }
}

/* ---------------------------------------------------------
   VIDEO
   --------------------------------------------------------- */

.scheda-video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .scheda-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.scheda-video-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scheda-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #1f2933;
}

.scheda-video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.scheda-video-caption {
  margin: 0;
  font-size: 14px;
  color: #4a5560;
  text-align: center;
}

/* ---------------------------------------------------------
   INSTALLAZIONI RECENTI
   --------------------------------------------------------- */

.scheda-section {
  background: #ffffff;
  border: 1px solid #ddd8d2;
  border-radius: 22px;
  padding: 24px 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .scheda-section {
    padding: 28px 28px;
  }
}

.scheda-section__title {
  margin: 0 0 16px;
  font-size: 20px;
  color: #8f2f23;
}

.scheda-installazioni {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 600px) {
  .scheda-installazioni {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .scheda-installazioni {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.scheda-installazioni li {
  display: block;
  padding: 10px 14px;
  background: #f8f5f2;
  border: 1px solid #e3ddd7;
  border-radius: 10px;
  color: #1f2933;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.scheda-installazioni li a {
  display: block;
  padding: 10px 14px;
  background: #f8f5f2;
  border: 1px solid #e3ddd7;
  border-radius: 10px;
  color: #1f2933;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.scheda-installazioni li a:hover {
  background: #f1e9e4;
  color: #8f1d21;
}

/* ---------------------------------------------------------
   PRODOTTI CORRELATI
   --------------------------------------------------------- */

.scheda-correlati {
  background: #ffffff;
  border: 1px solid #ddd8d2;
  border-radius: 22px;
  padding: 24px 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .scheda-correlati {
    padding: 28px 28px;
  }
}

.scheda-correlati__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (min-width: 768px) {
  .scheda-correlati__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.scheda-correlati__card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: #f8f5f2;
  border: 1px solid #e3ddd7;
  border-radius: 18px;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.scheda-correlati__card:hover {
  background: #f1e9e4;
  border-color: #c9a0a0;
  text-decoration: none;
}

.scheda-correlati__img-wrap {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
}

.scheda-correlati__img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.scheda-correlati__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scheda-correlati__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #1f2933;
  line-height: 1.4;
}

.scheda-correlati__link {
  font-size: 13px;
  font-weight: 700;
  color: #8f1d21;
}

/* ---------------------------------------------------------
   CTA BOX
   --------------------------------------------------------- */

.scheda-cta-box {
  background: linear-gradient(135deg, #8f1d21 0%, #6e1519 100%);
  border-radius: 22px;
  padding: 32px 24px;
  box-shadow: 0 10px 28px rgba(143, 29, 33, 0.18);
  text-align: center;
}

.scheda-cta-box__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.scheda-cta-box__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.scheda-cta-box__text {
  margin: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 52ch;
  line-height: 1.6;
}

.scheda-cta-box .scheda-btn--primary {
  background: #ffffff;
  color: #8f1d21;
  border-color: #ffffff;
  margin-top: 4px;
}

.scheda-cta-box .scheda-btn--primary:hover {
  background: #f8f5f2;
  border-color: #f8f5f2;
  color: #6e1519;
}
