
/* TENUTE OLIVETO - Scheda prodotto editoriale 2026 */

.to-product-hero{
  position:relative;
  min-height:330px;
  display:flex;
  align-items:flex-end;
  overflow:hidden;
  background:#263126;
}
.to-product-hero img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}
.to-product-hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,rgba(18,25,18,.78),rgba(18,25,18,.42) 55%,rgba(18,25,18,.15));
}
.to-product-hero__content{
  position:relative;
  z-index:2;
  width:90%;
  padding:56px 0 32px;
  color:#fff;
}
.to-product-hero__kicker{
  display:block;
  margin-bottom:10px;
  font-size:.76rem;
  letter-spacing:.17em;
  text-transform:uppercase;
  opacity:.8;
}
.to-product-hero h1{
  max-width:900px;
  margin:0;
  font-size:clamp(2rem,4vw,4rem);
  line-height:1;
  font-weight:500;
  letter-spacing:-.035em;
}
.to-product-hero__breadcrumb{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin-top:20px;
  font-size:.88rem;
  color:rgba(255,255,255,.75);
}
.to-product-hero__breadcrumb a{
  color:#fff;
  text-decoration:none;
}
.to-product-hero__breadcrumb .sep{opacity:.45}

.to-product-main{
  padding:54px 0 24px;
}
.to-product-main-row{
  align-items:flex-start;
  row-gap:28px;
}
.to-product-heading{
  margin-bottom:30px;
}
.to-product-heading .eyebrow{
  display:block;
  margin-bottom:8px;
  font-size:.76rem;
  letter-spacing:.15em;
  text-transform:uppercase;
  color:#51614c;
  font-weight:700;
}
.to-product-heading h2{
  margin:0;
  color:#222b22;
  font-size:clamp(1.7rem,3vw,2.7rem);
  letter-spacing:-.025em;
  line-height:1.08;
}
.to-product-heading p{
  max-width:760px;
  margin:12px 0 0;
  color:#72786f;
  line-height:1.7;
}

#product-main-img{
  padding:24px;
  border:1px solid rgba(32,44,31,.10);
  border-radius:22px;
  background:#fff;
  box-shadow:0 16px 44px rgba(28,38,27,.06);
}
#product-main-img img{
  width:100%;
  max-height:620px;
  object-fit:contain;
}
#product-imgs .product-preview{
  margin-bottom:10px;
  padding:8px;
  border:1px solid rgba(32,44,31,.10);
  border-radius:14px;
  background:#fff;
  overflow:hidden;
}
#product-imgs .product-preview img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:contain;
}

.to-product-buybox{
  padding:28px;
  border:1px solid rgba(34,46,33,.10);
  border-radius:22px;
  background:#fff;
  box-shadow:0 18px 45px rgba(29,39,28,.07);
}
.to-product-buybox__brand{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding-bottom:18px;
  margin-bottom:18px;
  border-bottom:1px solid rgba(34,46,33,.08);
}
.to-product-buybox__brand img{
  width:auto;
  max-width:112px;
  height:46px;
  object-fit:contain;
  border:0!important;
  padding:0!important;
  margin:0!important;
  float:none!important;
  background:transparent!important;
}
.to-product-buybox__meta{
  display:flex;
  flex-direction:column;
  gap:4px;
  color:#6d746c;
  font-size:.82rem;
}
.to-product-buybox__meta strong{color:#253025}
.to-product-buybox .product-badges{
  display:flex;
  align-items:center;
  flex-wrap:nowrap;
  gap:7px;
  margin:0 0 20px;
}

.to-product-buybox .product-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:5px 10px;
  border:1px solid rgba(34,46,33,.12);
  border-radius:7px;
  background:#fff;
  color:#5f675d;
  font-size:.72rem;
  font-weight:600;
  line-height:1;
  letter-spacing:.045em;
  text-transform:uppercase;
  white-space:nowrap;
  box-shadow:none;
}

.to-product-buybox .product-badge.ok{
  position:relative;
  padding-left:22px;
  border-color:rgba(70,91,66,.18);
  background:#f7faf6;
  color:#3f573b;
}

.to-product-buybox .product-badge.ok::before{
  content:"";
  position:absolute;
  left:10px;
  top:50%;
  width:6px;
  height:6px;
  border-radius:50%;
  background:#5e7a57;
  transform:translateY(-50%);
}

.to-product-buybox .product-price{
  margin:0 0 20px;
  padding-bottom:18px;
  border-bottom:1px solid rgba(34,46,33,.08);
}
.to-product-buybox .form-control{
  min-height:48px;
  border-radius:12px;
}
.to-product-buybox .btn-carrello{
  min-height:48px;
  border-radius:12px;
}
.to-product-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:18px;
}
.to-product-action{
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border:1px solid rgba(34,46,33,.12);
  border-radius:12px;
  background:#f8f7f2;
  color:#263226;
  text-decoration:none;
  font-size:.82rem;
  font-weight:600;
  line-height:1.2;
  text-align:center;
}
.to-product-action--primary{
  grid-column:1/-1;
  background:#40523c;
  border-color:#40523c;
  color:#fff;
}
.to-product-action--primary:hover{background:#31402e;color:#fff}

.to-product-description{
  margin-top:44px;
  padding:36px;
  border-radius:22px;
  background:#f7f5ef;
}
.to-product-description__kicker{
  display:block;
  margin-bottom:8px;
  font-size:.75rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#5a6855;
  font-weight:700;
}
.to-product-description h2{
  margin:0 0 18px;
  color:#263026;
  font-size:1.7rem;
}
.to-product-description .content{
  color:#4e554d;
  line-height:1.82;
}
.to-product-description .content p:last-child{margin-bottom:0}

.to-product-tech{
  margin-top:16px;
}
.to-product-tech .accordion-item{
  border:1px solid rgba(34,46,33,.10);
  border-radius:16px!important;
  overflow:hidden;
}
.to-product-tech .accordion-button{
  padding:18px 20px;
  background:#fff;
  color:#263026;
  font-weight:600;
  box-shadow:none!important;
}
.to-product-tech .accordion-body{
  padding:20px;
  color:#555c54;
  line-height:1.75;
  background:#fff;
}

.to-info-modal .modal-content{
  border:0;
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 24px 70px rgba(0,0,0,.18);
}
.to-info-modal .modal-header{
  padding:22px 24px;
  border-bottom:1px solid #ecebe5;
}
.to-info-modal .modal-body{padding:24px}
.to-info-modal .input{
  width:100%;
  min-height:48px;
  margin-bottom:12px;
  padding:12px 14px;
  border:1px solid #dddcd5;
  border-radius:12px;
  background:#fff;
}
.to-info-modal textarea.input{min-height:140px}
.to-info-modal .primary-btn{
  width:100%;
  min-height:48px;
  border:0;
  border-radius:12px;
  background:#40523c;
  color:#fff;
  font-weight:600;
}

@media(max-width:991.98px){
  .to-product-hero{min-height:280px}
  .to-product-main{padding-top:36px; width: 96%;}
  #product-imgs{
    display:flex;
    gap:8px;
    overflow-x:auto;
    margin-bottom:12px;
  }
  #product-imgs .product-preview{min-width:78px}
  .to-product-buybox{margin-top:20px}

  .to-product-buybox .product-badges{
    flex-wrap:wrap;
    gap:6px;
  }

  .to-product-buybox .product-badge{
    min-height:27px;
    padding:5px 9px;
    font-size:.69rem;
  }

  .to-product-buybox .product-badge.ok{
    padding-left:21px;
  }
}

/* =========================================================
   FIX MOBILE MODALI SCHEDA PRODOTTO
   Richiesta informazioni + conferma invio
   ========================================================= */
@media (max-width: 767.98px) {
  .to-info-modal,
  #myModal_prev {
    padding:0 8px!important;
    overflow-y:auto;
  }

  .to-info-modal .modal-dialog,
  #myModal_prev .modal-dialog {
    width:auto;
    margin:8px auto;
    min-height:0!important;
    height:auto!important;
    max-height:calc(100dvh - 16px);
    align-items:flex-start!important;
  }

  .to-info-modal .modal-content,
  #myModal_prev .modal-content {
    width:100%;
    max-height:calc(100dvh - 16px);
    overflow:hidden;
  }

  .to-info-modal .modal-header,
  #myModal_prev .modal-header,
  #myModal_prev .modal-footer {
    flex:0 0 auto;
  }

  .to-info-modal .modal-body,
  #myModal_prev .modal-body {
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }

  .to-info-modal .modal-header {
    padding:16px 16px 14px;
  }

  .to-info-modal .modal-body {
    padding:16px;
  }

  .to-info-modal textarea.input {
    min-height:105px;
  }

  #myModal_prev .modal-body img {
    max-height:42dvh;
    width:100%;
    object-fit:contain;
  }
}

/* Fallback per browser che non supportano ancora dvh. */
@supports not (height: 100dvh) {
  @media (max-width: 767.98px) {
    .to-info-modal .modal-dialog,
    #myModal_prev .modal-dialog,
    .to-info-modal .modal-content,
    #myModal_prev .modal-content {
      max-height:calc(100vh - 16px);
    }

    #myModal_prev .modal-body img {
      max-height:42vh;
    }
  }
}

