/* ===== Base / tipografía segura en móviles iOS ===== */
@font-face {
  font-family: "HV Harietta";
  src: url("/static/fonts/HV%20Harietta%20Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  font-size:100%;
}

/* ===== Layout principal ===== */
.producto-detalle-container{
  max-width:1200px;
  margin:40px auto;
  padding:0 20px;
  display:grid;
  grid-template-columns:1fr;
  grid-template-areas:"gallery" "info";
  gap:28px;
}
.producto-imagenes{ grid-area:gallery; min-width:0; min-height:0; }
.producto-info{ grid-area:info; min-width:0; min-height:0; }

@media (min-width:901px){
  .producto-detalle-container{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    grid-template-areas:"gallery info";
    gap:40px; align-items:start;
  }
}

/* =====================================================
   GALERÍA — Marco blanco (letterbox) SIN recortar
   ===================================================== */

/* Altura uniforme y responsiva para TODAS las slides */
:root{
  /* antes: clamp(360px, 62vh, 680px) */
  --gallery-h: clamp(600px, 78vh, 800px);
  --card-media-h: clamp(180px, 24vw, 240px);
  --card-radius: 10px;
  --title-lh: 1.3;
  --title-lines: 3;
  --card-gap: 12px;            /* ← pequeño espacio entre imagen y nombre */
}

/* Contenedor del marco (usa también zoom-container en tu HTML) */
.gallery-frame,
.zoom-container{
  height: 100%;
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;          /* marco blanco */
  border:1px solid #eee;
  border-radius:10px;
  overflow:hidden;          /* mantiene el zoom dentro del marco */
  box-sizing:border-box;
  padding:0;                /* sin padding extra */
}

/* Imagen dentro del marco: jamás se recorta */
.gallery-frame > img,
.zoom-image{
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit: contain;      /* reduce grandes, muestra bordes si falta */
  object-position: center;  /* centrado vertical/horizontal */
  display:block;
  transition: transform .12s ease;
  transform-origin: center center;
}

/* Contenedor Swiper principal */
.mySwiperMain{
  width:100%;
  margin-bottom:10px;
  border-radius:10px;
}

/* Cada slide contiene el marco blanco */
.mySwiperMain .swiper-slide{
  height: var(--gallery-h) !important;
  display:block;
}

/* Compat: si sigues usando .zoom-container/.zoom-image en el HTML */
.zoom-container{ padding:0; }
.zoom-container .zoom-image{ object-fit:contain; }

/* ===== Miniaturas (también sin recortar) ===== */
.mySwiperThumbs{
  height:auto;
  box-sizing:border-box;
  padding:40px 34px;   /* espacio para flechas */
  position:relative;
}
.mySwiperThumbs .swiper-wrapper{ align-items:center; }
.mySwiperThumbs .swiper-slide{
  width:84px; height:84px; cursor:pointer;
  border:1px solid #ddd; border-radius:6px;
  background:#fff; opacity:.6;
  display:grid; place-items:center;
  overflow:hidden; padding:6px;              /* bordes blancos uniformes */
  transition:opacity .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.mySwiperThumbs .swiper-slide-thumb-active{
  opacity:1; border:2px solid #333; box-shadow:0 2px 6px rgba(0,0,0,.08);
}
.mySwiperThumbs img{
  max-width:100%;
  max-height:100%;
  width:auto; height:auto;
  object-fit:contain;            /* no recortar miniaturas */
  display:block;
  border-radius:4px;
}

/* Flechas de miniaturas */
.thumbs-prev, .thumbs-next{
  --swiper-navigation-size:18px;
  position:absolute; top:50%; transform:translateY(-50%);
  width:28px; height:28px; border-radius:50%;
  background:rgba(255,255,255,.95);
  border:1px solid #ddd; box-shadow:0 2px 6px rgba(0,0,0,.1);
  color:#333; z-index:2; transition:background .2s, color .2s;
}
.thumbs-prev:hover, .thumbs-next:hover{ background:#333; color:#fff; }
.thumbs-prev{ left:6px; }
.thumbs-next{ right:6px; }

/* ===== Info del producto ===== */
.producto-info h1 {
  font-family: "HV Harietta", "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.2rem, 1.9vw, 1.9rem);
  line-height: 1.1;
  color: #2b2b2b;
  margin: 0.5rem 0 0.75rem;
  font-weight: 700;
}

.producto-info .precio {
  font-family: "HV Harietta", "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: 1px;
  font-weight: 700;
  color: #2b2b2b;
  margin: 0.5rem 0 1rem;
}

/* ===== Formulario de configuración (opciones) ===== */
.form-config{ display:flex; flex-direction:column; gap:15px; margin-bottom:20px; }
.product-options-box {
  background: #fff;
  border: 1px solid #ddd;
  padding-right: 1.5rem; 
  padding-left: 1.5rem; 
  padding-bottom: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  box-sizing: border-box;          /* ← asegura que el alto incluye padding/borde */
}
.product-option-group{ margin-bottom:0; }
.product-option-label{
  display:block; font-weight:600; font-size:.95rem; margin:.75rem 0 .25rem; color:#555;
}
.required{ color:#aaa; font-size:.65rem; text-transform:uppercase; margin-left:.3rem; }

.product-option-input,
.product-option-select {
  font-family: "HV Harietta", "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.8rem;
  border: 1px solid #d5d0c8;
  border-radius: 6px;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  color: #2f2f2f;
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.product-option-input:focus,
.product-option-select:focus {
  outline: none;
  border-color: #7B8C6E;
  box-shadow: 0 0 0 3px rgba(123, 140, 110, 0.18);
}
.product-option-select{
  background-image:url("data:image/svg+xml;utf8,<svg fill='gray' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat:no-repeat; background-position:right .8rem center; background-size:16px; padding-right:2rem; cursor:pointer;
}

/* Opciones por imágenes */
.image-select-group{
  display:flex; flex-wrap:wrap; gap:10px;
}

.image-option{ position:relative; }
.image-option::after{
  content: attr(data-label) attr(data-extraformatted);
  position:absolute;
  left:50%;
  transform: translateX(-50%);
  white-space:nowrap;
  font-size:.8rem; font-weight:600;
  color:#333; background:#fff;
  border:1px solid #ccc; border-radius:6px;
  padding:6px 10px; box-shadow:0 4px 12px rgba(0,0,0,.12);
  opacity:0; pointer-events:none; transition:opacity .12s ease;
  z-index:5000;
}
.image-option:hover::after,
.image-option:focus-within::after{ opacity:1; }
/* Colocación dinámica (opuesto al preview) */
.image-option.tip-above::after{        /* tooltip ARRIBA de la miniatura */
  bottom: calc(100% + 8px);
  top: auto;
}
.image-option.tip-below::after{        /* tooltip ABAJO de la miniatura */
  top: calc(100% + 8px);
  bottom: auto;
}
.image-option input{ display:none; }
.image-wrapper{
  position:relative; width:70px; height:70px; border-radius:6px; overflow:hidden;
  border:2px solid transparent; transition:all .25s ease; z-index:1; background:#fff;
  display:grid; place-items:center; 
}
.image-wrapper img{ max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; cursor:pointer; }
.image-option input:checked + .image-wrapper{ border-color:#5e2ca5; }
.caption{
  position:absolute; left:0; right:0; bottom:0; background:rgba(0,0,0,.7); color:#fff;
  font-size:.75rem; padding:4px 6px; text-align:center; opacity:0; transform:translateY(100%); transition:all .25s ease;
}
.image-wrapper:hover .caption{ opacity:1; transform:translateY(0); }

/* --- Overlay flotante para la previsualización (no afecta layout) --- */
#image-hover-preview{
  position:fixed;
  left:0; top:0;
  max-width:92vw;         /* tope por seguridad */
  max-height:70vh;
  background:#fff; border:1px solid #ddd; border-radius:12px;
  box-shadow:0 12px 30px rgba(0,0,0,.18);
  padding:10px;           /* borde apenas mayor que la imagen */
  display:inline-block;   /* que tome el tamaño del contenido */
  opacity:0; transform: translateY(6px);
  pointer-events:none;
  transition:opacity .15s ease, transform .15s ease;
  z-index:6000;
}

#image-hover-preview.visible{ opacity:1; transform: translateY(0); }

/* La imagen manda el tamaño; con topes de pantalla */
#image-hover-preview img{
  display:block;
  max-width: min(520px, 92vw);
  max-height: 35vh;
  width:auto;
  height:auto;
  object-fit:contain;
  border-radius:10px;
}

/* Radios / botones */
.radio-group{ display:flex; flex-direction:column; gap:6px; margin-top:.1rem; }
.radio-option{ display:flex; align-items:center; gap:6px; font-size:.9rem; color:#444; cursor:pointer; }
.radio-option input{ accent-color:#333; transform:scale(1.1); }
.button-group{ display:flex; flex-wrap:wrap; gap:8px; }
.button-option input{ display:none; }
.button-option span {
  font-family: "HV Harietta", "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid #bdb8b0;
  border-radius: 5px;
  font-size: 0.86rem;
  letter-spacing: 0.8px;
  color: #2b2b2b;
  background: #fff;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.button-option:hover span {
  border-color: #7B8C6E;
  color: #7B8C6E;
}

.button-option input:checked + span {
  border-color: #7B8C6E;
  background: #f7f4ee;
  color: #2b2b2b;
  font-weight: 700;
}

/* Cantidad */
.product-quantity-group {
  margin: .25rem 0 .25rem;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qty-btn {
  font-family: "HV Harietta", "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  padding: 5px 10px;
  font-size: 0.82rem;
  border: 1px solid #bdb8b0;
  background: #fff;
  color: #2b2b2b;
  cursor: pointer;
  border-radius: 4px;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.qty-btn:hover {
  background: #f7f4ee;
  border-color: #7B8C6E;
  color: #7B8C6E;
}

.quantity-input {
  font-family: "HV Harietta", "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  width: 44px;
  text-align: center;
  padding: 5px;
  border-radius: 4px;
  border: 1px solid #bdb8b0;
  color: #2b2b2b;
}

/* Botones CTA */
.botones {
  display: flex;
  gap: 14px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.add-cart,
.add-wishlist {
  font-family: "HV Harietta", "Cormorant Garamond", Georgia, serif;
  padding: 12px 26px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease, transform .2s ease;
}

.add-cart {
  background: #2C2A27;
  color: #fff;
  border: 1px solid #2C2A27;
}

.add-cart:hover {
  background: #7B8C6E;
  border-color: #7B8C6E;
  transform: translateY(-1px);
}

.add-wishlist {
  background: #fff;
  color: #2C2A27;
  border: 1px solid #bdb8b0;
}

.add-wishlist:hover {
  background: #f7f4ee;
  border-color: #7B8C6E;
  color: #7B8C6E;
  transform: translateY(-1px);
}

/* ===== Tabs ===== */
.producto-tabs-container{ max-width:1200px; margin:20px auto 0; padding:0 20px; }
.producto-tabs-container .tab-buttons{ display:flex; flex-wrap:wrap; gap:10px; }
.producto-tabs-container .tab-btn {
  font-family: "HV Harietta", "Cormorant Garamond", Georgia, serif;
  padding: 10px 20px;
  background: #fff;
  color: #2C2A27;
  border-radius: 5px;
  border: 1px solid #d5d0c8;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}

.producto-tabs-container .tab-btn:hover {
  background: #f7f4ee;
  border-color: #7B8C6E;
  color: #7B8C6E;
}

.producto-tabs-container .tab-btn.active {
  background: #2C2A27;
  border-color: #2C2A27;
  color: #fff;
}
.producto-tabs-container .tab{
  display:none; margin-top:1rem; font-size:.95rem; line-height:1.6; color:#444;
  overflow-x:hidden; overflow-wrap:anywhere; word-break:break-word; box-sizing:border-box; 
}
.producto-tabs-container .tab.active{ display:block; }
.producto-tabs-container .tab figure{ max-width:100%; margin:1rem auto; }
.producto-tabs-container .tab img{ display:block; max-width:100% !important; height:auto !important; }
.producto-tabs-container .tab iframe,
.producto-tabs-container .tab embed,
.producto-tabs-container .tab object,
.producto-tabs-container .tab video{ max-width:100%; width:100%; border:0; }
.producto-tabs-container .tab table{ width:100% !important; max-width:100%; border-collapse:collapse; table-layout:auto; }
.producto-tabs-container .tab pre, .producto-tabs-container .tab code{ white-space:pre-wrap; word-break:break-word; }

/* Videos responsivos */
.video-wrapper{ position:relative; width:100%; padding-top:56.25%; background:#000; }
.video-wrapper iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }

/* ===== RELATED PRODUCTS ===== */

.related-products-section {
  max-width: 1200px;
  margin: 52px auto 58px;
  padding: 0;
}

.related-products-title {
  font-family: "HV Harietta", "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.0rem, 1.5vw, 1.5rem);
  line-height: 1.1;
  letter-spacing: 2px;
  color: #2b2b2b;
  text-align: center;
  margin: 0 0 26px;
}

.related-products-grid {
  width: 100%;
  max-width: 930px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px 18px;
  align-items: stretch;
}

.related-product-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #eeeeee;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.09);
  padding: 12px 12px 18px;
  text-decoration: none;
  color: inherit;
  overflow: visible;

  display: grid;
  grid-template-rows: 178px auto 40px;
  row-gap: 13px;
  min-height: 330px;

  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.related-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.13);
  border-color: #dddddd;
}

.related-product-card img {
  width: 100%;
  height: 178px;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
  background: #f7f7f8;
  border-radius: 7px;
}

.related-product-card .producto-img-wrap {
  width: 100%;
  height: 178px;
}

.related-product-card h2 {
  font-family: "HV Harietta", "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: 0.9rem !important;
  line-height: 1.16;
  letter-spacing: 1.25px;
  color: #1f1f1f;
  margin: 0;
  text-align: center;
  text-transform: none;
  overflow-wrap: anywhere;
  word-break: break-word;

  display: block;
  overflow: visible;
}

.related-price {
  font-family: "HV Harietta", "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: 0.9rem !important;
  line-height: 1;
  letter-spacing: 1.15px;
  color: #1f1f1f;
  margin: 0;
  text-align: center;
  align-self: end;
  padding-bottom: 8px;
}

.related-empty {
  grid-column: 1 / -1;
  font-family: var(--font-sans, "Jost", sans-serif);
  font-size: 1rem;
  color: #606060;
  text-align: center;
  margin: 30px 0;
}

/* Related responsive */

@media (max-width: 1100px) {
  .related-products-grid {
    max-width: 880px;
  }

  .related-product-card {
    grid-template-rows: 160px auto 40px;
    min-height: 315px;
  }

  .related-product-card img,
  .related-product-card .producto-img-wrap {
    height: 160px;
  }
}

@media (max-width: 900px) {
  .related-products-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 760px;
    gap: 20px 16px;
  }
}

@media (max-width: 700px) {
  .related-products-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 520px;
    gap: 18px 14px;
  }

  .related-product-card {
    padding: 10px 10px 16px;
    grid-template-rows: 150px auto 36px;
    min-height: 305px;
  }

  .related-product-card img,
  .related-product-card .producto-img-wrap {
    height: 150px;
    border-radius: 6px;
  }

  .related-product-card h2 {
    font-size: 0.8rem !important;
    letter-spacing: 1px;
  }

  .related-price {
    font-size: 1rem !important;
  }
}

@media (max-width: 420px) {
  .related-products-grid {
    grid-template-columns: 1fr;
    max-width: 330px;
    gap: 18px;
  }

  .related-product-card {
    min-height: 390px;
    grid-template-rows: 245px auto 42px;
    padding: 12px 12px 20px;
    border-radius: 12px;
  }

  .related-product-card img,
  .related-product-card .producto-img-wrap {
    height: 245px;
    border-radius: 9px;
  }

  .related-product-card h2 {
    font-size: 1.12rem !important;
    line-height: 1.16;
    letter-spacing: 1.5px;
  }

  .related-price {
    font-size: 1.32rem !important;
    letter-spacing: 1.1px;
  }
}

/* Desactiva el tooltip ::after cuando usemos overlay JS */
body.floating-tooltips .image-option::after { display: none !important; }

/* Tooltip flotante que no se recorta por overflow */
#option-tooltip{
  position: fixed;
  left: 0; top: 0;
  padding: 6px 10px;
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  z-index: 7000;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}
#option-tooltip.visible{ opacity:1; transform: translateY(0); }

/* Forzar texto normal dentro de los tabs de producto */
.producto-tabs-container .tab {
  font-weight: 400;
}

.producto-tabs-container .tab p,
.producto-tabs-container .tab li {
  font-weight: 400;
}

/* ===== Opciones del producto: altura = altura de la galería ===== */
@media (min-width: 901px){
  /* Alto del cuadro = --opts-h (si no existe, usa --gallery-h) */
  .product-options-box{
    height: var(--opts-h, var(--gallery-h));
    max-height: none;                 /* ya no limitamos por viewport */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-right: 1.2rem;
  }

  /* Scrollbar limpio */
  .product-options-box::-webkit-scrollbar{ width:10px; }
  .product-options-box::-webkit-scrollbar-track{ background:#f2f2f2; border-radius:8px; }
  .product-options-box::-webkit-scrollbar-thumb{
    background:#c9c9c9; border-radius:8px; border:2px solid #f2f2f2;
  }
  .product-options-box::-webkit-scrollbar-thumb:hover{ background:#b5b5b5; }
}

/* En móviles, que fluya normal */
@media (max-width: 900px){
  .product-options-box{ height:auto; max-height:none; overflow:visible; }
}

/* ===== Responsive grid relacionados ===== */
@media (max-width:1200px){ .productos-grid{ grid-template-columns:repeat(3,1fr); } }
@media (max-width: 1024px){
  :root{ --card-media-h: clamp(170px, 30vw, 220px); }
}
@media (max-width:768px){ .productos-grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width: 640px){
  :root{ --card-media-h: clamp(150px, 42vw, 200px); }
}

/* ===== Utilidad: asegura que los iframes/imágenes inline no fuercen scroll ===== */
@media (max-width:600px){
  .producto-tabs-container .tab .align-left,
  .producto-tabs-container .tab .align-right{
    float:none !important; margin:.5rem auto !important; display:block !important;
  }
}

/* En móviles muy pequeños, aprovéchate un poco más de la altura disponible */
@media (max-width: 480px){
  :root{
    --gallery-h: clamp(360px, 72vh, 720px);
  }
}

/* PRODUCT DETAIL TYPOGRAPHY OVERRIDE */

.producto-detalle-container button,
.producto-detalle-container input,
.producto-detalle-container select,
.producto-detalle-container textarea,
.producto-detalle-container label,
.producto-tabs-container button,
.related-products-section h2,
.related-products-section p {
  font-family: "HV Harietta", "Cormorant Garamond", Georgia, serif !important;
  font-weight: 700;
}

.producto-tabs-container .product-tab-text,
.producto-tabs-container .product-tab-text .tab,
.producto-tabs-container .product-tab-text .tab *,
.producto-tabs-container .product-tab-text .tab p,
.producto-tabs-container .product-tab-text .tab li,
.producto-tabs-container .product-tab-text .tab span,
.producto-tabs-container .product-tab-text .tab div,
.producto-tabs-container .product-tab-text .tab strong,
.producto-tabs-container .product-tab-text .tab b,
.producto-tabs-container .product-tab-text .tab em,
.producto-tabs-container .product-tab-text .tab h1,
.producto-tabs-container .product-tab-text .tab h2,
.producto-tabs-container .product-tab-text .tab h3,
.producto-tabs-container .product-tab-text .tab h4,
.producto-tabs-container .product-tab-text .tab h5,
.producto-tabs-container .product-tab-text .tab h6 {
  font-family: var(--product-tab-font-family, "HV Harietta", "Cormorant Garamond", Georgia, serif) !important;
  font-weight: 400 !important;
}

/* =====================================================
   MEASUREMENTS WIDGET
   ===================================================== */

.measurements-widget {
  margin-top: .25rem;
}

.measurements-header {
  margin-bottom: 1.1rem;
  margin-top: -.1rem;
}

.measurements-video-link {
  font-family: "HV Harietta", "Cormorant Garamond", Georgia, serif;
  font-size: .82rem;
  color: #666;
  text-decoration: none;
  letter-spacing: .3px;
  transition: color .15s;
  display: inline-block;
}

.measurements-video-link:hover { color: #2b2b2b; }

.measurements-video-cta {
  color: #7B8C6E;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 2×2 grid */
.measurements-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.2rem;
}

.measurement-field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.measurement-field-label {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-family: "HV Harietta", "Cormorant Garamond", Georgia, serif;
  font-size: .92rem;
  font-weight: 700;
  color: #444;
  cursor: default;
}

/* ⓘ info icon trigger */
.meas-tooltip-trigger {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  opacity: .7;
  transition: opacity .15s;
  flex-shrink: 0;
}
.meas-tooltip-trigger:hover { opacity: 1; }

/* Measurement inputs share the same style as regular product-option-inputs */
.measurement-input {
  font-family: "HV Harietta", "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: .6rem .8rem;
  border: 1px solid #d5d0c8;
  border-radius: 6px;
  font-size: .95rem;
  letter-spacing: .5px;
  color: #2f2f2f;
  background-color: #fff;
  transition: border-color .2s, box-shadow .2s;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.04);
}
.measurement-input:focus {
  outline: none;
  border-color: #7B8C6E;
  box-shadow: 0 0 0 3px rgba(123,140,110,.18);
}
.measurement-input::placeholder { color: #b5b0a8; font-weight: 400; }

/* Responsive: stack to 1 column on narrow screens */
@media (max-width: 480px) {
  .measurements-grid { grid-template-columns: 1fr; }
}

/* =====================================================
   MEASUREMENT HOVER IMAGE TOOLTIP
   ===================================================== */

#meas-img-tooltip {
  position: fixed;
  z-index: 9000;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  padding: 8px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease;
}

#meas-img-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

#meas-img-tooltip-img {
  display: block;
  max-width: min(320px, 88vw);
  max-height: 240px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 7px;
}

/* =====================================================
   MEASUREMENT VIDEO MODAL
   ===================================================== */

#meas-video-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.meas-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.62);
  cursor: pointer;
}

.meas-modal-box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  width: min(760px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meas-modal-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #555;
  cursor: pointer;
  padding: 0 4px;
  transition: color .15s;
}
.meas-modal-close:hover { color: #111; }

.meas-modal-iframe-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.meas-modal-iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
}
