/*
 Theme Name:   Muga ChildTheme
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* Sombra del menú - perujo.en
.main-nav {
  text-shadow: 1px 1px 2px #484848;
} */ 

/*Container links*/



.wander-container-link a:before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 0;
}
.gb-container.wander-container-link:hover:before {
    opacity: 1;
    transform: scale(1.05);
}
.gb-container.wander-container-link {
    transition: all 0.3s ease;
}

/* Remove border radius for WooCommerce blocks buttons */
.wp-block-button__link {
  border-radius:0;
}
/* Change WooCommerce blocks column number on tablet */
@media (max-width: 1024px) and (min-width: 768px) {
    ul.wc-block-grid__products > li.wc-block-grid__product {
        max-width: 50% !important;
        flex: 1 0 50% !important;
    }
}
/*========*/


/* ===== MENSAJE DE PRODUCTO AÑADIDO AL CARRITO ===== */
  .woocommerce-message {
    background-color: #000 !important;
    color: #fff !important;
    border-top-color: #000 !important;
    border-left: none !important;
    padding: 18px 25px !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85em;
  }

  /* Enlace "Ver carrito" en blanco con borde */
  .woocommerce-message a,
  .woocommerce-message a.button {
    background-color: transparent !important;
    color: #fff !important;
    border: 1px solid #fff !important;
    padding: 8px 20px !important;
    font-weight: 600 !important;
  }

  /* Efecto hover: invertir colores */
  .woocommerce-message a:hover {
    background-color: #fff !important;
    color: #000 !important;
  }


@media (min-width: 769px) {
	


/* 2) Full-width de bloques (Gutenberg/GenerateBlocks) sin 100vw */
.alignfull, .alignwide,
.gb-container.alignfull, .gb-container.alignwide {
  max-width: 100%;
}

  .caja-home {
    /* A menor altura de la ventana, más ancho el cuadro */
    width: clamp(250px, calc(1200px - 100vh), 800px);
  }
}
 /* ===== VARIACIONES DE PRODUCTO RESPONSIVE ===== */
     /* Sobrescribe estilos del plugin WPC Variations Radio Buttons */

     /* Desktop: ancho flexible con control min/max */
     .woovr-variations .woovr-variation {
       min-width: 120px;
       max-width: 560px;
     }

     /* Tablet (768px - 1024px): 75% de ancho */
     @media (max-width: 1024px) and (min-width: 768px) {
       .woovr-variations .woovr-variation {
         width: 75%;
         max-width: 100%;
       }
     }

     /* Móvil (max-width: 767px): 100% de ancho */
     @media (max-width: 767px) {
       .woovr-variations .woovr-variation {
         width: 100%;
         max-width: 100%;
       }
     }


/*.caja-home{
  width: clamp(450px, calc(1100px - 100dvh), 1000px);
}*/
/* ===== Texto horizontal SIN pin, altura natural ===== */
.gp-scroll-window {
  position: relative;
  overflow: hidden;   /* evita overflow horizontal */
  /* ¡SIN height: 100vh/dvh! -> ocupa su altura natural */
}

.gp-scroll-content {
  white-space: nowrap;
  will-change: transform;
  padding-inline: clamp(16px, 4vw, 48px);
  font-size: clamp(20px, 4vw, 48px);
  line-height: 1.2;
}

/* Sección con cambio de color (igual) */
.gp-color-swap {
  /* sin altura forzada, salvo que tú quieras */
  transition: background-color 0s; /* GSAP maneja el tween */
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .gp-scroll-content { transform: none !important; }
}





/* Asegura que el vídeo cubra todo */
.hero-video .wp-block-cover__video-background {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Fallback en móviles o si el usuario prefiere menos movimiento */
/*@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .hero-video .wp-block-cover__video-background { display: none !important; }
  .hero-video {
    
  background-color: var(--accent-2);
  background-image: url('http://desarrollomuga.perujo.net/wp-content/uploads/img-vendimia.png');
    background-size: cover;
    background-position: center;
  }
}*/

/*SLIDER VINOS HOME */
/* Contenedores */
.prod-strip { position: relative; width: 100%; }
.prod-viewport { overflow: hidden; width: 100%; }

/* El contenedor que agrupa todos los items */
.prod-track {
  display: flex;
  gap: clamp(8px, 2vw, 16px);
  padding: 1rem 0;
  margin: 0;
  list-style: none;        /* por si es <ul> */
  will-change: transform;  /* rendimiento */
}

/* Cada tarjeta del loop (hijo directo) */
.prod-track > * {
  flex: 0 0 auto;
  width: clamp(140px, 18vw, 240px); /* ajusta a tu gusto */
  aspect-ratio: 1 / 1;              /* cuadrado */
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
}

/* Imagen dentro del item (Woo o featured image del post) */
.prod-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Opcional: quitar márgenes/paddings internos “raros” del template */
.prod-track > * > * { margin: 0; padding: 0; }


/*  OFF CANVAS - RESERVA */
:root{
  --mg-bg:#ffffff; --mg-text:#000000; --mg-muted:#475569; --mg-border:#e5e7eb; --mg-overlay:rgba(0,0,0,.5); /*--mg-text:#0f172a;*/
  --mg-green:#16a34a; --mg-amber:#d97706; --mg-red:#dc2626; --mg-gray:#9ca3af;
  --mg-hover:#f8fafc;
  --mg-radius:16px; --mg-shadow:0 20px 40px rgba(0,0,0,.18); --mg-anim:300ms cubic-bezier(.2,.6,.2,1);
}

/* Overlay */
.mg-overlay{ position:fixed; inset:0; background:var(--mg-overlay);
  opacity:0; pointer-events:none; transition:opacity var(--mg-anim); z-index:9998; }

/* Drawer: sin transform por defecto para evitar doble animación; oculto por visibilidad para evitar flash */
.mg-drawer{
  position:fixed; top:0; right:0; height:100vh;
  width:100vw; max-width:100vw; background:var(--mg-bg); color:var(--mg-text);
  box-shadow:var(--mg-shadow); z-index:9999; display:flex; flex-direction:column;
  visibility:hidden; /* ← evita “flash” al cargar */
}
@media (min-width:768px){ .mg-drawer{ width:min(520px,50vw); max-width:min(520px,50vw); } }

.mg-drawer__header,.mg-drawer__footer{ padding:1rem; border-bottom:1px solid var(--mg-border);
  display:flex; align-items:center; justify-content:space-between; }
.mg-drawer__footer{ border-bottom:none; border-top:1px solid var(--mg-border); }
.mg-icon-btn{ appearance:none; background:transparent; border:1px solid var(--mg-border);
  border-radius:999px; width:36px; height:36px; line-height:34px; text-align:center; cursor:pointer; }
.mg-btn-primary{ display:inline-flex; gap:.5rem; align-items:center; padding:.75rem 1rem;
  /*border-radius:999px;*/ border:1px solid var(--mg-border); background:#111827; color:#fff; font-weight:600; }


.mg-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:.4rem;vertical-align:middle}
.mg-dot--available{background:var(--mg-green)} .mg-dot--few{background:var(--mg-amber)} .mg-dot--full{background:var(--mg-red)} .mg-dot--blocked{background:var(--mg-gray)}
.mg-cal__grid{display:grid;grid-template-columns:repeat(7,1fr);grid-auto-rows:44px;gap:6px;user-select:none}
.mg-colhead{font-size:.8rem;color:var(--mg-muted);display:flex;align-items:center;justify-content:center;border-bottom:1px dashed var(--mg-border)}

/* Fallback solo si NO hay GSAP */
.no-gsap .mg-overlay.is-visible{ opacity:1; pointer-events:auto; }
.no-gsap .mg-drawer{ transform:translateX(100%); transition:transform var(--mg-anim); visibility:visible; }
.no-gsap .mg-drawer.is-open{ transform:translateX(0); }

/* Calendario minimal y legible */
.mg-cal{ padding:1rem 1rem 0.25rem; display:flex; flex-direction:column; gap:.75rem; }
.mg-cal__title{ font-weight:600; letter-spacing:.2px; }
.mg-cal__nav{ display:flex; align-items:center; justify-content:space-between; }
.mg-nav-btn{ background:#f1f5f9; border:1px solid var(--mg-border); border-radius:2px; width:36px; height:36px; cursor:pointer; }
.mg-cal__legend{ display:flex; gap:1rem; flex-wrap:wrap; color:var(--mg-muted); font-size:.9rem; }

.mg-cal__grid{ display:grid; grid-template-columns:repeat(7,1fr); grid-auto-rows:44px; gap:10px; user-select:none; }
.mg-colhead{ font-size:.8rem; color:#64748b; font-weight:600; letter-spacing:.4px;
  display:flex; align-items:center; justify-content:center; border-bottom:1px dashed var(--mg-border); }
.mg-day{ background:#fff; border:1px solid var(--mg-border); border-radius:2px; overflow:hidden; }
.mg-day--outside{ opacity:.45; }
.mg-day__btn{ all:unset; display:grid; place-items:center; width:100%; height:100%;
  font-size:.95rem; font-weight:600; color:var(--mg-text); cursor:pointer; border-radius:2px; }
.mg-day__btn:hover{ background:var(--mg-hover); }
.mg-day__btn:focus{ outline:2px solid #60a5fa; outline-offset:-3px; }

/* Estados */
.mg-day--available{ border-color:var(--mg-green); }
.mg-day--few{ border-color:var(--mg-amber); }
.mg-day--full{ border-color:var(--mg-red); }
.mg-day--full .mg-day__btn{ color:var(--mg-red); text-decoration:normal; }
.mg-day--blocked{ border-color:var(--mg-gray); background:#f3f4f6; }
.mg-day--blocked .mg-day__btn{ color:#6b7280; cursor:not-allowed; }

/* Slots (horas) */
.mg-slots{ padding:0 1rem 1rem; }
.mg-slots[hidden]{ display:none !important; }
.mg-slots__title{ margin:.25rem 0 .5rem; font-size:1rem; color:#0f172a; font-weight:600; }
.mg-slots__grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:.5rem; }
@media (min-width:768px){ .mg-slots__grid{ grid-template-columns:repeat(3,1fr); } }
.mg-slot{
  display:flex; align-items:center; justify-content:space-between; gap:.8rem;
  padding:.6rem .75rem; border:1px solid var(--mg-border); border-radius:2px; background:#fff; cursor:pointer;
}
.mg-slot__time{ font-weight:700; }
.mg-slot__badge{ font-size:.8rem; padding:.15rem .5rem; /*border-radius:999px; border:1px solid var(--mg-border);*/ color:#0f172a; line-height:1.2em; }
.mg-slot--few{ border-color:var(--mg-amber); }
.mg-slot--available{ border-color:var(--mg-green); }
.mg-slot--full{ border-color:var(--mg-red); color:var(--mg-red); pointer-events:none; opacity:.6; }

/* Sheet (formulario) */
.mg-sheet{
  position:absolute; inset:0; background:#fff; transform:translateY(100%);
  transition:transform var(--mg-anim); border-left:1px solid var(--mg-border);
  display:flex; flex-direction:column; visibility:hidden;
}
.mg-sheet.is-open{ transform:translateY(0); visibility:visible; }
.mg-sheet__header{ padding:1rem; border-bottom:1px solid var(--mg-border);
  display:flex; align-items:center; justify-content:space-between; }

.mg-form{ padding:1rem; display:grid; gap:.9rem; font-size:0.75em;}
.mg-form__row{ display:grid; gap:.35rem; }
.mg-form__row--check .mg-check{ display:flex; align-items:center; gap:.5rem; }
.mg-stepper{ display:inline-flex; align-items:center; gap:.5rem; /* border:1px solid var(--mg-border);*/
  padding:.25rem; width:fit-content; }
.mg-stepper__btn{ background:#111; border:1px solid var(--mg-border); border-radius:0px; /*width:32px; height:32px;*/ cursor:pointer; font-size:22px !important;font-weight:700; padding:6px 10px;}
.mg-form input[type="text"], .mg-form input[type="email"], .mg-form input[type="tel"], .mg-form input[type="number"], .mg-form select{
  border:1px solid var(--mg-border); /*border-radius:10px;*/ padding:.6rem .7rem; font:inherit; width:100%;
}
.mg-form__actions{ display:flex; justify-content:flex-end; padding-top:.5rem; }
.mg-note{ color:#64748b; font-size:.85rem; }

/* Body scroll lock */
.mg-no-scroll{ overflow:hidden; padding-right:var(--mg-scrollbar,0px); }

/* --- Botones que “desaparecían” (color) --- */
.mg-icon-btn{background:#f1f5f9; border:1px solid var(--mg-border); color:#0f172a;}
.mg-icon-btn:hover{background:#e2e8f0}

/* Horarios: que siempre se vean */
.mg-slot{background:#fff; color:#0f172a; border:1px solid var(--mg-border)}
.mg-slot *{color:inherit}
.mg-slot:focus{outline:2px solid #60a5fa; outline-offset:2px}
.mg-slot--few{border-color:var(--mg-amber)}
.mg-slot--available{border-color:var(--mg-green)}
.mg-slot--full{border-color:var(--mg-red); color:var(--mg-red); opacity:.65}

/* Día seleccionado en calendario */
.mg-day--selected{box-shadow:0 0 0 2px #60a5fa inset; border-color:#60a5fa}

/* Enlaces del texto (privacidad) */
.mg-link{color:#0f172a; text-decoration:underline}
.mg-link:hover{opacity:.8}

/* *** SCROLL EN MÓVIL (formulario) *** */
.mg-drawer{overflow:hidden}              /* bloquea el fondo del drawer cuando el sheet está encima */
.mg-sheet{overflow:auto; -webkit-overflow-scrolling:touch; touch-action:pan-y}
.mg-form{padding-bottom:1rem}            /* margen para que el botón no quede tapado */

/* Evita el “flash” y el overlay fantasma al cerrar */
.mg-overlay{pointer-events:none}

#mg-close-btn{
  font-size: 20px;
    padding: 7px;
}

#mg-sheet-close{
  font-size: 12px;
    padding: 7px;
}
.mg-nav-btn{
    padding: 2px 2px 7px 6px;
  font-size: 25px !important;
  color:grey;
}
/*  OFF CANVAS - RESERVA ---- END*/


/*  SLIDER VINOS HOME */
/* Contenedor general */
#vinos { position: relative; }

/* Flechas */
#vinos .vinos-prev,
#vinos .vinos-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  border: 0;
  background: rgba(255,255,255,.85);
  width: 44px; height: 44px; border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
  font-size: 26px; line-height: 1; cursor: pointer;
  padding: 9px 5px 6px 18px;
}
#vinos .vinos-prev { left: .5rem; }
#vinos .vinos-next { right: .5rem; }
#vinos .vinos-prev:disabled, #vinos .vinos-next:disabled { opacity: .35; cursor: default; }

/* “Ventana” del carrusel */
#vinos .vinos-viewport {
  overflow: hidden;
  width: 100%;
}

/* La pista: tus cards en fila */
#vinos .vinos-track {
  display: flex;
  gap: clamp(16px, 2vw, 32px);
  will-change: transform;
  touch-action: pan-x;
  cursor: grab;
}
#vinos .vinos-track:active { cursor: grabbing; }

/* Cada vino ocupa un ancho fijo y no se encoge */
#vinos .vino {
  flex: 0 0 clamp(220px, 33vw, 320px); /* ajusta para ver 3-5 por vista */
}

/* Opcional: oculta flechas en móviles si no las quieres */
@media (max-width: 640px){
  #vinos .vinos-prev, #vinos .vinos-next { display:none; }
}
/* =====*/
/* Ventana del carrusel */
#vinos .vinos-viewport{
  overflow: hidden;
  width: 100%;
}

/* La pista usa el wrapper de GenerateBlocks como fila flex, SIN WRAP */
#vinos .vinos-track > .gb-grid-wrapper{
  display: flex !important;
  flex-wrap: nowrap !important;            /* <- clave: una sola fila */
  gap: clamp(16px, 2vw, 32px) !important;
}

/* Cada slide (columna) ocupa un ancho fijo */
#vinos .vinos-track > .gb-grid-wrapper > .gb-grid-column{
  /* ↑ ESTE ES EL “PARÁMETRO” QUE CONTROLA LO ANCHO DEL CUADRO */
  flex: 0 0 clamp(220px, 23vw, 420px);     /* ← hazlo más/menos ancho aquí */
  /* por ejemplo antes tenías clamp(220px, 23vw, 320px) */
  overflow: visible !important;
}

/* Tarjeta vino (por si GB fija alturas) */
#vinos .vino{
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f2f2f2;
  border-radius: 16px;
  padding: clamp(8px, 1vw, 16px);
  overflow: visible !important;
}

/* Imagen de la botella: sin recortes y apoyada abajo */
#vinos .vino .gb-block-image{
  width: 100%;
  height: clamp(280px, 40vh, 520px);
  display: flex; align-items: flex-end; justify-content: center;
  margin: 0 0 .75rem 0;
}
#vinos .vino .gb-block-image img{ height:100%; width:auto; object-fit:contain; }

/* Botones (añadidos más abajo en HTML) */
#vinos .vinos-prev, #vinos .vinos-next{
  position:absolute; top:50%; transform:translateY(-50%);
  border:0; background:rgba(255,255,255,.9);
  width:44px; height:44px; border-radius:9999px;
  box-shadow:0 4px 14px rgba(0,0,0,.15);
  font-size:26px; line-height:1; cursor:pointer; z-index:5;
}
#vinos .vinos-prev{ left:.5rem; }
#vinos .vinos-next{ right:.5rem; }
#vinos .vinos-prev:disabled, #vinos .vinos-next:disabled{ opacity:.35; cursor:default; }


#vinos .vinos-viewport { cursor: grab; }
#vinos .vinos-viewport:active { cursor: grabbing; }


#vinos .vinos-viewport{
  touch-action: pan-y;       /* vertical por defecto */
  user-select: none;
}
#vinos .vinos-viewport img{
  -webkit-user-drag: none;
  user-select: none;
}
#vinos .vinos-track > .gb-grid-wrapper{ will-change: transform; }

/* --- FIX: permitir scroll vertical cuando se toca sobre las botellas --- */
#vinos .vinos-track,
#vinos .vinos-track * {
  touch-action: auto !important;   /* quita la restricción pan-x */
}

/* El viewport deja pasar vertical por defecto */
#vinos .vinos-viewport{
  touch-action: pan-y !important;
}


/* FIN SLIDER VINOS HOME  */

/* PERSONALIZACION */
.sombreatitulo{
text-shadow:
    0 1px 2px rgba(0,0,0,.6),
    0 6px 24px rgba(0,0,0,.5);
  /* contorno opcional, no en todos los navegadores */
  -webkit-text-stroke: 1px rgba(0,0,0,.35);
  paint-order: stroke fill;
}

.auto-contrast { color: var(--textColor); }

/* Subtítulo genérico para héroes */
.subtitulo {
  color: var(--textColor);          /* se adapta con el auto-contraste */
  font-weight: 400;                 /* 500 si quieres un poco más de punch */
  line-height: 1.35;
  letter-spacing: 0.01em;
  max-width: 40ch;                  /* evita líneas larguísimas */
  text-wrap: balance;               /* mejora cortes (soporte moderno) */
  /* sombra fina pensada para texto pequeño */
  text-shadow:
    0 1px 2px rgba(0,0,0,.35),
    0 0 1px rgba(0,0,0,.25);
}
.tit_big_vino{
  font-size: calc(13vw + 14vh);
}

@media (max-width: 768px) {
  .subtitulo { max-width: 32ch; }
}
.otgs-development-site-front-end{
  display:none;
}

.absoluta{
  position:absolute;
}


/* Pinta cualquier bloque con .bg_vino usando el color por entrada */
body.single .bg_vino,
body.page .bg_vino {
  background: var(--vino-bg, transparent);
  /* opcional: si quieres padding y bordes redondeados comunes */
  /* padding: 1rem; */
  /* border-radius: 8px; */
  /* transition: background-color .2s ease; */
}

/* Si el bloque es un GenerateBlocks Container, puedes ser más específico: */
/* body.single .gb-container.bg_vino { background: var(--vino-bg, transparent); } */



/* ====== TIENDA MUGA (grid + tarjeta) ====== */

/* Contenedor máximo */
.muga-shop-wrap {
  max-width: 1920px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
}

/* Grid de productos */
.muga-products-grid ul.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 10px;             /* separación entre tarjetas */
  margin: 0;
  padding: 0;
}
@media (max-width: 1024px) {
  .muga-products-grid ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .muga-products-grid ul.products { grid-template-columns: 1fr; }
}

/* Tarjeta base (sin esquinas redondeadas) */
.muga-product-item {
  list-style: none;
  background: #ede9e4;            /* tono beige claro del mockup */
  border-radius: 0;                /* sin redondeo */
  padding: 0;                      /* el mockup es muy limpio */
  box-shadow: none;
}

/* Estructura interna */
.muga-product-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Imagen grande centrada, con aire superior */
.muga-product-image {
  display: block;
  /*padding: 28px 28px 12px;*/
  text-align: center;
}
.muga-product-image img {
  width: auto;
  height: 340px;                 /* altura consistente como en el diseño */
  object-fit: contain;
  margin: 0 auto;
}

/* Título debajo de la imagen, tipografía discreta */
.muga-product-title {
  margin: 0 24px 14px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 300;
  font-family: 'Larken';
}
.muga-product-title a {
  color: #111;
  text-decoration: none;
}

/* Barra inferior negra con CTA izquierda y precio derecha */
.muga-product-bar {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #000;
  color: #fff;
  padding: 5px 6px;
}

/* Botón nativo -> lo forzamos a verse como texto de la barra */
.muga-product-bar .button {
  background: transparent !important;
  color: #fff !important;
  border: 0;
  border-radius: 0;
  padding: 0;
  height: auto;
  line-height: 1;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .02em;
}

/* Ocultar el "Ver carrito" */
.muga-product-bar .added_to_cart { display: none !important; }

/* Precio a la derecha */
.muga-price {
  font-weight: 400;
  white-space: nowrap;
  font-size: 16px;
}
.muga-unit {
  opacity: .85;
  font-weight: 400;
  margin-left: .25em;
  font-size: .95em;
}

 /* ===== RESPONSIVE: Ocultar botón "SELECCIONAR CANTIDAD" en móvil ===== */
  @media (max-width: 768px) {
    .muga-product-bar .muga-bar-left {
      display: none;           /* Oculta completamente el botón */
    }

    /* Centrar el precio cuando el botón no está visible */
    .muga-product-bar {
      justify-content: center;   /* Precio centrado */
    }
  }





.woocommerce ul.products li.product .button
 {
    margin-top: 0;
}

/* Quitar márgenes por defecto de Woo */
ul.products li.product { margin: 0; }

/* .button {
	opacity: 1 !important ;
	color: white !important ;
} */

/* ============================================
   PÁGINAS DE PRODUCTO INDIVIDUAL - DISEÑO MINIMALISTA
   ============================================ */

/* Cabecera simple del producto: sin imagen de fondo, solo título */
.product-header-simple {
  background: #fff;
  padding: 60px 20px 40px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.product-header-title {
  font-family: 'Larken', serif;
  font-size: 48px;
  font-weight: 300;
  line-height: 1.2;
  color: #222;
  letter-spacing: 0.01em;
  max-width: 1400px;
  margin: 0 auto;
}

/* Contenedor principal del producto - más ancho para mejor presentación */
.single-product div.product {
  max-width: 1920px;
  margin: 0 auto;
  padding: 60px 40px;
  overflow: visible;
}

/* Layout 60/40: Imagen 60%, Contenido 40% */
.single-product .woocommerce-product-gallery {
  width: 58%;
  float: left;
  margin-right: 2%;
  margin-bottom: 0;
}

.single-product div.summary {
  width: 40%;
  float: left;
  padding-left: 40px;
}

/* Galería de miniaturas - horizontal y minimalista */
.woocommerce-product-gallery__wrapper {
  margin-bottom: 20px;
}

.flex-control-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  padding: 0;
  list-style: none;
}

.flex-control-thumbs li {
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  margin: 0;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.flex-control-thumbs li:hover,
.flex-control-thumbs li.flex-active {
  opacity: 1;
  border-color: #333;
}

.flex-control-thumbs li img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Título del producto - minimalista */
.single-product .product_title {
  font-family: 'Larken', serif;
  font-size: 32px;
  font-weight: 300;
  line-height: 1.3;
  margin: 0 0 20px 0;
  color: #222;
  letter-spacing: 0.01em;
}

/* Descripción del producto */
.single-product .woocommerce-product-details__short-description {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #111;
  margin-bottom: 30px;
}

.single-product .woocommerce-product-details__short-description p {
  margin-bottom: 15px;
}

.woovr-variation-selector .dd-selected-text, .woovr-variation-selector .dd-option-text{
        font-size: 18px !important;
    font-family: 'Montserrat', sans-serif !important;
  }

/* Formulario de añadir al carrito */
.single-product form.cart {
  margin: 30px 0;
  padding: 0;
  overflow: visible;
}

/* Selector de variaciones (si existe) */
.single-product .variations {
  margin-bottom: 30px;
  position: relative;
  z-index: 50;
}

.single-product table.variations {
  overflow: visible !important;
  margin-bottom: 0;
}

.single-product .variations td,
.single-product .variations th {
  padding: 8px 0;
  border: none;
  vertical-align: middle;
}

.single-product .variations label {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #333;
}

.single-product .variations select {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 0;
  background: white;
  width: 100%;
  max-width: 300px;
  height: auto;
  /* Asegurar que el dropdown sea completamente visible */
  position: relative;
  z-index: 100;
}

/* Asegurar que el contenedor de variaciones permita el dropdown */
.single-product .variations,
.single-product .variations td,
.single-product div.summary {
  overflow: visible !important;
}

/* Estilos para dropdowns de WooCommerce (Select2 u otros) */
.single-product .select2-container,
.single-product .select2-dropdown {
  z-index: 9999 !important;
}

.single-product .select2-container--default .select2-results > .select2-results__options {
  max-height: 400px !important;
  overflow-y: auto !important;
}

/* Controles de cantidad - minimalistas */
.single-product .quantity {
  display: inline-flex;
  align-items: center;
  margin-right: 15px;
  border: 1px solid #ddd;
  background: white;
}

.single-product .quantity input.qty {
  width: 60px;
  height: 45px;
  text-align: center;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  font-size: 16px;
  font-weight: 500;
  padding: 0;
  margin: 0;
  background: white;
}

/* Botón de añadir al carrito - destacado pero elegante */
.single-product button.single_add_to_cart_button {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 40px;
  background: #222;
  color: white;
  border: 2px solid #222;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  vertical-align: middle;
}

.single-product button.single_add_to_cart_button:hover {
  background: white;
  color: #222;
}

/* Link de descarga de ficha de cata */
.single-product .descargar-ficha {
  margin-top: 25px;
  padding-top: 25px;
  /*border-top: 1px solid #eee;*/
}

.single-product .descargar-ficha a {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #111;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.3s ease;
}

.single-product .descargar-ficha a:hover {
  color: #000;
}

.single-product .descargar-ficha svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Productos relacionados - espaciado limpio */
.single-product .related.products {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid #eee;
  clear: both;
}

.single-product .related.products h2 {
  font-family: 'Larken', serif;
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 30px;
  color: #222;
}

/* Eliminar tabs (ya se eliminaron con PHP, pero por si acaso) */
.single-product .woocommerce-tabs {
  display: none;
}

/* Clearfix para el layout de dos columnas */
.single-product div.product::after {
  content: "";
  display: table;
  clear: both;
}

.single-product .woocommerce-variation-price{
  display:flex;
  height: 2.5em;
  align-items: center;
}

/*.woovr-variations .woovr-variation {
  width: 50%;
}*/

/* ============================================
   RESPONSIVE - MÓVILES
   ============================================ */

@media (max-width: 1024px) {
  /* Tablets */
  .product-header-title {
    font-size: 40px;
  }

  .single-product div.product {
    padding: 40px 20px;
    overflow-x: hidden;
  }
}
 
@media (max-width: 768px) {
  /* FIX GENERAL: Evitar scroll horizontal en toda la página de producto */
  .single-product body,
  .single-product html,
  .single-product #page {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }
/* 1) Cinturón de seguridad para iOS 15 */
html, body { 
	overflow-x: hidden; 
  	width: 100%;
	position: relative;
}

  /* Cabecera en móvil */
  .product-header-simple {
    padding: 40px 20px 30px;
  }

  .product-header-title {
    font-size: 32px;
  }

  /* Stack en móvil: imagen arriba, contenido abajo */
  .single-product .woocommerce-product-gallery,
  .single-product div.summary {
    width: 100%;
    float: none;
    padding-left: 0;
    padding-right: 0;
  }
  .single-product .woocommerce-product-gallery {
    margin-right: 0;
    margin-bottom: 20px;
  max-width: 100%;
    overflow: hidden;
  }

  /* FIX: Controlar el contenedor de la galería sin romper FlexSlider */
  .single-product .woocommerce-product-gallery {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }

  /* El wrapper de FlexSlider - permitir animación pero controlar ancho */
  .single-product .woocommerce-product-gallery__wrapper {
    width: 100% !important;
    position: relative !important;
  }

  /* FlexSlider viewport (contenedor de slides) */
  .single-product .woocommerce-product-gallery .flex-viewport {
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* Controlar cada slide individualmente */
  .single-product .woocommerce-product-gallery__wrapper > div {
    max-width: 100% !important;
  }

  /* FIX: Deshabilitar zoom en móvil (causa overflow con .zoomImg) */
  .single-product .woocommerce-product-gallery__trigger,
  .single-product .zoomImg,
  .woocommerce-product-gallery .zoomImg,
  img.zoomImg {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    left: -9999px !important;
  }

  /* FIX: Controlar imágenes de la galería en móvil */
  .single-product .woocommerce-product-gallery__image {
    max-width: 100% !important;
  }

  /* Asegurar que las imágenes dentro no causen overflow */
  .single-product .woocommerce-product-gallery__image img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* FIX: Controlar miniaturas en móvil para evitar overflow */
  .single-product .flex-control-thumbs {
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  .single-product .flex-control-thumbs li {
    float: none !important;
    display: inline-block !important;
  }

  .single-product div.summary {
    margin-top: 30px;
  }

  .single-product div.product {
    padding: 40px 20px;
  }

  /* Título más pequeño en móvil */
  .single-product .product_title {
    font-size: 26px;
  }



  /* Descripción más legible en móvil */
  .single-product .woocommerce-product-details__short-description {
    font-size: 14px;
    line-height: 1.6;
  }

  /* Miniaturas en móvil */
  .flex-control-thumbs {
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .flex-control-thumbs li {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
  }

  /* Selector de variaciones full width */
  .single-product .variations select {
    max-width: 100%;
  }

  /* Botón de carrito full width en móvil */
  .single-product button.single_add_to_cart_button {
    width: 100%;
    margin-top: 10px;
    padding: 16px 30px;
    font-size: 13px;
  }

  .single-product .quantity {
    margin-right: 0;
    margin-bottom: 15px;
    width: 100%;
    justify-content: center;
  }

  /* Ficha de cata en móvil */
  .single-product .descargar-ficha {
    text-align: center;
  }

  /* Productos relacionados */
  .single-product .related.products {
    margin-top: 60px;
  }

  .single-product .related.products h2 {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  /* Móviles pequeños */
  .product-header-simple {
    padding: 30px 15px 20px;
  }

  .product-header-title {
    font-size: 26px;
  }

  .single-product div.product {
    padding: 30px 15px;
  }

  .single-product .product_title {
    font-size: 22px;
  }

  .flex-control-thumbs li {
    width: 50px;
    height: 50px;
  }

  .single-product button.single_add_to_cart_button {
    padding: 14px 20px;
    font-size: 12px;
    letter-spacing: 0.06em;
  }

  .single-product .descargar-ficha a {
    font-size: 12px;
  }
}

/* Controla el aspecto del vídeo en móvil - perujo.es */
.video-responsive {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Aspect ratio 4:3 para escritorio */
.video-responsive::before {
  content: "";
  display: block;
  padding-top: 75%; /* 4:3 = 3/4 = 75% */
}

.video-responsive iframe,
.video-responsive video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.wpfd-content {
	background: transparent !important; 
}


@viewport {
  width: device-width;
  zoom: 1.0;
}

.wc-block-components-button__text {
	font-size: 18px;
}

/* Alto de cabecera y pie para calcular el viewport útil */
:root{ --mg-header-h: 64px; --mg-footer-h: 60px; }

/* Evita que el fondo se mueva: el body ya se bloquea con .mg-no-scroll */
.mg-drawer{ overflow: hidden; }

.mg-drawer__scroller{
  --mg-scroller-pb: max(16px, env(safe-area-inset-bottom));
  height: calc(100dvh - var(--mg-header-h) - var(--mg-footer-h));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--mg-scroller-pb);
  position: relative; /* necesario para el ::after */
}
@supports not (height: 100dvh){
  .mg-drawer__scroller{ height: calc(100vh - var(--mg-header-h) - var(--mg-footer-h)); }
}


/* Header y footer mantienen su altura (ajústala a tu layout real) */
.mg-drawer__header{ min-height: var(--mg-header-h); }
.mg-drawer__footer{ min-height: var(--mg-footer-h); }

/* El sheet ya era desplazable internamente; mantenlo */
.mg-sheet{ overflow:auto; -webkit-overflow-scrolling:touch; }

/* Sheet en overlay entre header y footer */
.mg-sheet{
  position:absolute;
  left:0; right:0;
  top: var(--mg-header-h);
  bottom: var(--mg-footer-h);
  background:#fff;
  border-left:1px solid var(--mg-border);
  transform: translateY(100%);
  transition: transform var(--mg-anim);
  visibility: hidden;
  z-index: 1;                  /* por encima del scroller */
  overflow:auto;               /* el form se desplaza dentro del sheet */
  -webkit-overflow-scrolling:touch;
}
.mg-sheet.is-open{
  transform: translateY(0);
  visibility: visible;
}

/* Cuando el sheet está abierto, desactiva (visual y táctil) el contenido de debajo */
.mg-drawer.sheet-open .mg-drawer__scroller{
  filter: blur(2px);
  pointer-events: none;
}
.mg-drawer.sheet-open .mg-cal,
.mg-drawer.sheet-open .mg-slots{
  visibility: hidden;
}

/* El scroller ocupa el alto útil entre header y footer */
.mg-drawer__scroller{
  height: calc(100dvh - var(--mg-header-h) - var(--mg-footer-h));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--mg-footer-h) + env(safe-area-inset-bottom));
}
@supports not (height: 100dvh){
  .mg-drawer__scroller{ height: calc(100vh - var(--mg-header-h) - var(--mg-footer-h)); }
}
/* —— Alturas más compactas (ajusta a tu gusto) —— */
:root{
  --mg-header-h: 52px;   /* antes 64 */
  --mg-footer-h: 48px;   /* antes 60 */
}

/* Header y footer más densos */
.mg-drawer__header,
.mg-drawer__footer{
  padding: .5rem .75rem;
}
.mg-drawer__header h2{ font-size: 1.15rem; line-height: 1.1; }

/* Botón de cierre más pequeño */
.mg-icon-btn{
  width: 34px; height: 34px; line-height: 32px; font-size: 16px;
}

/* Leyenda del calendario más discreta */
.mg-cal__legend{ gap:.75rem; font-size:.9rem; }
.mg-cal__nav .mg-nav-btn{ width:34px; height:34px; }

/* Grid un poco más denso en móvil */
@media (max-width: 480px){
  .mg-cal__grid{ grid-auto-rows: 40px; gap: 6px; }
}

/* —— Modo sheet abierto: ocultar la X del drawer para que no haya dos —— */
.mg-drawer.sheet-open #mg-close-btn{
  opacity: 0; pointer-events: none; visibility: hidden;
}

/* Estilo “Volver” para el cierre del sheet */
.mg-sheet__header{
  display:flex; align-items:center; justify-content:space-between;
}
#mg-sheet-close{
  min-width: auto;
  width:auto; height:auto; line-height:normal;
  border-radius: 999px;
  padding: .35rem .6rem;
  font-weight: 500;
}
.mg-back{                    /* se aplicará por JS cuando esté abierto */
  background:#f1f5f9; border:1px solid var(--mg-border); color:#0f172a;
}
.mg-back:hover{ background:#e2e8f0; }

/* Pie más compacto y texto menor */
.mg-drawer__footer .mg-help{ font-size:.95rem; line-height:1.3; }

.wc-block-components-button:not(.is-link) .wc-block-components-button__text {
	color: #fff;
}
.pagina_sc .wp-block-image{
	margin-bottom:25px;
}
.pagina_sc .dynamic-entry-content p{
	text-align:justify;
}

/* Permitir scroll interno en el Overlay Panel - perujo.es */
.gb-overlay {
	overflow: auto; 
}

/* --- Conmutador de idioma alineado y responsivo - perujo.es --- */

/* Ajustes generales */
.wpml-language-switcher-block ul {
  display: flex;
  gap: 0.8em;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Estilos de idioma */
.wpml-language-switcher-block li {
  display: inline-block;
  line-height: 1;
}

.wpml-language-switcher-block a,
.wpml-language-switcher-block span {
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0px;
  color: #6a6a6a;
  transition: color 0.3s ease;
}

/* Idioma activo */
.wpml-language-switcher-block li[data-wpml="current-language-item"] span {
  color: var(--accent);
}

/* Hover */
.wpml-language-switcher-block a:hover span {
  color: #6a6a6a99;
}

/* Alineación dentro del off-canvas */
.language-switcher-mobile {
  text-align: center;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}


/* Color del idioma ACTIVO */
.wpml-ls-item.wpml-ls-current-language a {
    color: var(--accent) !important; /* Cambia este código hexadecimal por tu color deseado */
    /*font-weight: bold;  Opcional: ponerlo en negrita */
    cursor: default; /* Opcional: que no parezca un enlace clicable */
}

/* Color del idioma INACTIVO (el enlace al otro idioma) */
.wpml-ls-item:not(.wpml-ls-current-language) a {
    color: #000000; /* Color normal del texto */
    opacity: 0.6; /* Opcional: un poco transparente para que destaque menos */
}

/* Quitar subrayados si los hubiera */
.wpml-ls-item a {
    text-decoration: none;
}

/* Si hay extracto, ocultar la meta - perujo */
.extracto + .destacado {
  display: none;
}

/* Ocultar la plantilla 404 original del tema - perujo.es */
body.error404 .inside-article {
    display: none;
}