/* ============================
   PODMÍNKA: pokud existuje opt_title
   ============================ */
.has-opt-title .p-detail-inner-header-mobile .h1{
  display: none !important;
}

.fullwide-detail{
  display:flex;
  align-items:flex-end;
  justify-content:center;
  background-image: var(--fw-bg);
  background-size:cover;
  background-position:center;
  padding: 32px 16px;
  color:#fff;
  /* místo fixního min-height 640 */
  min-height: 520px;
  box-sizing:border-box;
  position: relative;
}

/* jemný overlay kvůli čitelnosti textu 
.fullwide-detail::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.65) 75%, rgba(0,0,0,.8) 100%);
  pointer-events:none;
} */

.fullwide-inner{
  position:relative;
  z-index:2;
  width:100%;
  max-width: 990px;
  display:flex;
  flex-direction:column;
  gap: 16px;
}

/* !!! zásadní fix: žádná fixní šířka */
.fullwide-head-box {
  width: 100%;
  max-width: 990px;
  margin: 0 auto;
  background-color: rgb(0 0 0 / 93%);
  padding: 22px;
  border-radius: 12px;
  box-sizing: border-box;
  backdrop-filter: blur(2px);
}

.fullwide-topper{
  display:flex;
  justify-content:space-between;
  gap: 18px;
  align-items:flex-start;
  flex-wrap: nowrap;
}

.topper-left{
  flex: 1 1 55%;
  min-width: 0;
}

.product-type{
  font-size: 14px;
  color:#ff5f2c;
  margin-bottom: 6px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.product-title{
  font-size: clamp(20px, 3.6vw, 34px);
  font-weight: 700;
  margin:0;
  color:#fff;
  line-height: 1.15;
  word-break: break-word;
}

/* metriky */
.topper-right{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 18px;
  flex: 1 1 45%;
  min-width: 0;
  align-items: start;
}

/* =========================================
   ZMĚNA: span NAD strong (všechna zařízení)
   -> nejjednodušší a stabilní: column-reverse
   ========================================= */
.topper-right div{
  display:flex;
  flex-direction: column-reverse; /* <- ZMĚNA */
  text-align:left;
  min-width: 0;
}

.topper-right strong{
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.topper-right span{
  font-size: 12px;
  opacity:.85;
  margin-top: 0;       /* <- ZMĚNA (dřív margin-top:4px) */
  margin-bottom: 4px;  /* <- ZMĚNA (span je teď nahoře) */
  line-height: 1.2;
}

/* =========================================
   ZMĚNA: Věk label (desktop vs mobile)
   ========================================= */
.topper-right .label-mobile{ display:none; }
.topper-right .label-desktop{ display:inline; }

/* spodní lišta */
.fullwide-bottomer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  border-top: 1px solid rgb(26 26 26);
  padding-top: 14px;
}

.video-link a,
.params-link a{
  color:#fff;
  font-weight:700;
  text-decoration:none;
  font-size: 14px;
  display:inline-flex;
  align-items:center;
  gap: 6px;
}

.video-link a:hover,
.params-link a:hover{ color:#ff5f2c; }

/* video popup */
.video-popup{
  position:fixed;
  inset:0;
  display:none;
  justify-content:center;
  align-items:center;
  z-index:9999;
  padding:20px;
  background: rgba(0,0,0,0.8);
}

.popup-content{
  position:relative;
  background:#000;
  width: min(900px, 95vw);
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.popup-video-wrapper{
  width:100%;
  height:100%;
}

.popup-video-wrapper iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
}

.popup-close{
  position:absolute;
  top:10px;
  right:14px;
  background:transparent;
  border:0;
  font-size:28px;
  color:#fff;
  cursor:pointer;
  z-index:3;
}

/* ===== MOBILE ===== */
@media (max-width: 767px){

  .product-title {
    font-size: clamp(26px, 3.6vw, 34px);
  }

  .fullwide-detail{
    padding: 18px 12px;
    min-height: 420px;
    align-items:flex-end;
  }

  .fullwide-head-box{
    padding: 26px;
    border-radius: 12px;
  }

  .fullwide-topper{
    flex-direction: column;
    gap: 14px;
  }

  /* 2x2 grid metrik */
  .topper-right{
    width:100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 14px;
  }

  .topper-right strong{
    font-size: 16px;
  }

  .topper-left {
    flex: 1 1 55%;
    min-width: 0;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 10px;
  }

  .fullwide-bottomer{
    flex-direction: row;
    align-items:flex-start;
    gap: 10px;
  }

  .fullwide-detail{ min-height: 580px; }

  /* ZMĚNA: na mobilu zobraz label "Věk" místo "Doporučený věk" */
  .topper-right .label-desktop{ display:none; }
  .topper-right .label-mobile{ display:inline; }
}

/* menší mobily */
@media (max-width: 380px){
  .fullwide-detail{ min-height: 580px; }
  /*.topper-right{ grid-template-columns: 1fr; }*/
}
