/* ============================================
   VER PRODUCTO V2 - ESTILO PREMIUM Y FLUIDO
   ============================================ */

/* ---------- VARIABLES CSS ---------- */
:root {
  --color-bg: #fdfdfd;
  --color-white: #ffffff;
  --color-text-primary: #111111;
  --color-text-secondary: #555555;
  --color-text-muted: #888888;
  --color-border: #555555;
  --color-border-hover: #b0b0b0;
  --color-accent: #000000;
  --color-accent-hover: #333333;
  --color-success: #2e603a;
  --color-tag-tela: #f3f4f6;
  --color-tag-red: #fff1f2;
  --color-tag-tela-text: #1f2937;
  --color-tag-red-text: #9f1239;
  
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.06);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  --transition-fast: 150ms ease;
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- RESET Y BASE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- CONTENEDOR GENERAL ---------- */
.ver-producto-container-general {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  width: 100%;
  max-width: 1600px; 
  
  padding: clamp(1.5rem, 4vw, 3rem);
  align-items: start; 
}

@media (min-width: 1024px) {
  .ver-producto-container-general {
    /* Tu modificación: Proporción 5.7fr y 6fr */
    grid-template-columns: 5.7fr 6fr; 
  }
}

/* ============================================
   GALERÍA DE IMÁGENES (CON EFECTO STICKY)
   ============================================ */
/* ============================================
   BREADCRUMBS (Miga de pan)
   ============================================ */
.mp-breadcrumb {
    background-color: #f4f6f8; /* Un gris muy sutil para separarlo del nav azul */
    border-bottom: 1px solid #e0e6ed;
    width: 100%;
    margin-top: 90px; 
}

.mp-breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
}

.mp-breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: nowrap; /* Mantiene todo en una línea */
    
    /* Configuración clave para celulares (Scroll horizontal oculto) */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Oculta scrollbar en Firefox */
}

.mp-breadcrumb-list::-webkit-scrollbar {
    display: none; /* Oculta scrollbar en Chrome/Safari */
}

.mp-breadcrumb-item {
    white-space: nowrap; /* Evita que el texto baje a otra línea */
    font-size: 0.85rem;
    font-weight: 500;
}

.mp-breadcrumb-item a {
    color: #0056b3;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mp-breadcrumb-item a:hover {
    color: #003d82;
    text-decoration: underline;
}

/* El producto actual (último ítem) */
.mp-breadcrumb-item.active {
    color: #6c757d;
    cursor: default;
    
    /* Si el nombre del producto es muy largo, se corta con "..." */
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px; 
}

.mp-breadcrumb-separator {
    display: flex;
    align-items: center;
    color: #adb5bd;
    margin: 0 8px;
}

/* Ajustes para celulares muy chicos */
@media (max-width: 480px) {
    .mp-breadcrumb-container {
        padding: 10px 15px;
    }
    .mp-breadcrumb-item.active {
        max-width: 150px; /* Acorta más el nombre para que entren los links anteriores */
    }
}
.ver-producto-galeria {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 2rem);
  /* Aseguramos que la galería no estalle el grid */
  min-width: 0; 
}

@media (min-width: 1024px) {
  .ver-producto-galeria {
    /* EFECTO STICKY AL BAJAR LA PÁGINA */
    position: sticky;
    top: clamp(1.5rem, 3vw, 3rem); 
    height: max-content;
  }
}

/* ---------- GALERÍA DESKTOP ---------- */
.ver-producto-galeria-desktop {
  display: none;
}

@media (min-width: 768px) {
  .ver-producto-galeria-desktop {
    display: flex;
    gap: clamp(1rem, 2vw, 1.5rem);
  }
}

/* Sidebar de Thumbnails */
.ver-producto-thumbs-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: clamp(70px, 6vw, 100px);
  flex-shrink: 0;
}

.ver-producto-thumbnails-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px;
}

.ver-producto-thumbnails-vertical::-webkit-scrollbar {
  display: none;
}

.ver-producto-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  cursor: pointer;
  opacity: 0.5;
  transition: all var(--transition-base);
}

.ver-producto-thumb:hover {
  opacity: 0.8;
}

.ver-producto-thumb.active {
  opacity: 1;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
}

.ver-producto-thumb-nav-btn {
  width: 100%;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.ver-producto-thumb-nav-btn:hover {
  color: var(--color-accent);
}

/* Imagen Principal */
.ver-producto-img-principal-container {
  position: relative;
  flex: 1;
  background-color: var(--color-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.ver-producto-img-principal {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  cursor: zoom-in;
}

.ver-producto-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  opacity: 0;
}
.ver-producto-aviso-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background-color: #e9f7fe;
    border-left: 4px solid #0056b3;
    padding: 15px;
    border-radius: 6px;
    margin-top: 25px;
    color: #004085;
    font-size: 0.9em;
    line-height: 1.5;
}
.ver-producto-aviso-info svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.ver-producto-planos{
    display: flex;
    gap: 10px;
}
.ver-producto-plano-img{
    max-width: 100px;
    height: auto;
    object-fit: cover;
    border: 1px solid #808080;
    border-radius: 10px;
    cursor: zoom-in;
}

.ver-producto-img-principal-container:hover .ver-producto-nav-btn {
  opacity: 1;
}

.ver-producto-nav-btn:hover {
  background-color: var(--color-white);
  box-shadow: var(--shadow-md);
  transform: translateY(-50%) scale(1.05);
}

.ver-producto-nav-btn.prev { left: 1rem; }
.ver-producto-nav-btn.next { right: 1rem; }

/* ---------- GALERÍA MOBILE ---------- */
.ver-producto-galeria-mobile { display: block; }
@media (min-width: 768px) { .ver-producto-galeria-mobile { display: none; } }

.ver-producto-mobile-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.ver-producto-mobile-slider::-webkit-scrollbar { display: none; }

.ver-producto-mobile-img {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  scroll-snap-align: start;
}

.ver-producto-mobile-dots-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-top: 1rem;
}

.ver-producto-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-border);
  transition: all var(--transition-base);
}

.ver-producto-dot.active {
  background-color: var(--color-accent);
  transform: scale(1.5);
}

.ver-producto-contador-fotos {
  margin-left: 1rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}
/* Botón flotante de Audio en Desktop */
.ver-producto-audio-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
}

.ver-producto-audio-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.ver-producto-audio-btn.sonido-activo {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Botón central de Play en Android/Mobile */
.ver-producto-mobile-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.ver-producto-mobile-play-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
    background-color: #0056b3;
}
/* Miniatura exclusiva del video en la barra lateral */
.video-thumb-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    color: #ffffff;
    cursor: pointer;
    border-radius: 6px;
    height: 70px; /* Ajustá si tus miniaturas tienen otra altura */
    transition: background-color 0.2s, transform 0.2s;
}

.video-thumb-icon:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.video-thumb-icon.active {
    border: 2px solid #0056b3;
    background-color: #0056b3;
}

/* Botón flotante de Ampliar en Desktop */
.ver-producto-fullscreen-btn {
    position: absolute;
    bottom: 20px;
    right: 140px; /* Lo ponemos a la izquierda del botón de Silenciado */
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.ver-producto-fullscreen-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}
/* Forzamos a que el video respete su formato original sin recortar nada */
#ver-producto-mainVideo:fullscreen,
#ver-producto-mainVideo:-webkit-full-screen {
    object-fit: contain !important;
    background-color: #000; /* Fondo negro elegante para rellenar los espacios laterales o superiores */
    width: 100%;
    height: 100%;
}


/* ============================================
   INFORMACIÓN DEL PRODUCTO
   ============================================ */

.ver-producto-info {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3rem);
  
  /* ARREGLO CRÍTICO: Previene que la grilla estalle y apriete las tarjetas */
  min-width: 0; 
}

/* ---------- HEADER ---------- */
.ver-producto-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ver-producto-header h1 {
  /* Letra más grande en resoluciones altas */
  font-size: clamp(1.75rem, 3.5vw, 2.75rem); 
  font-weight: 500;
  line-height: 1.1;
  color: var(--color-text-primary);
  letter-spacing: -0.03em;
}

.ver-producto-header p {
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 65ch;
}

/* ============================================
   CARRUSEL DE VARIANTES
   ============================================ */

.ver-producto-contenedor-variantes {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  
  /* Prevención extra de blowout */
  min-width: 0; 
}

.ver-producto-carrusel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.ver-producto-carrusel-titulo {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ver-producto-carrusel-indicador {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ver-producto-carrusel-wrapper {
  position: relative;
  /* Prevención extra de blowout */
  min-width: 0; 
}

.ver-producto-carrusel-scroll {
  display: flex;
  
  /* ARREGLO CRÍTICO: Evita que se aplasten y las obliga a tener el mismo alto */
  flex-wrap: nowrap;
  align-items: stretch;
  
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0.25rem;
  margin: -0.5rem -0.25rem;
  scrollbar-width: none;
}

.ver-producto-carrusel-scroll::-webkit-scrollbar { display: none; }

/* Botones de navegación del carrusel */
.ver-producto-carrusel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background-color: #84ffff;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
}

.ver-producto-carrusel-wrapper.has-overflow:hover .ver-producto-carrusel-nav-btn {
  opacity: 1;
  pointer-events: auto;
}

.ver-producto-carrusel-nav-btn:hover {
  background-color: #00ffea;
  transform: translateY(-50%) scale(1.05);
}

.ver-producto-carrusel-nav-btn:disabled {
  opacity: 0;
  pointer-events: none;
}

.ver-producto-carrusel-nav-btn.left { left: -22px; }
.ver-producto-carrusel-nav-btn.right { right: -22px; }

/* ---------- CARD DE VARIANTE ---------- */
.ver-producto-card {
  position: relative;
  /* Flexbox para alinear el botón al fondo siempre */
  display: flex;
  flex-direction: column;
  
  /* ARREGLO CRÍTICO: Le damos un ancho rígido para que no colapsen */
  flex: 0 0 clamp(240px, 40vw, 300px); 
  
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
  scroll-snap-align: start;
  cursor: pointer;
  height: auto; 
}

/* El cartelito rojo de descuento */
.ver-producto-badge-oferta {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #dc3545; /* Rojo llamativo */
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 3px 6px rgba(220, 53, 69, 0.3);
}

/* El precio viejo tachado y más chico */
.precio-tachado-variante {
    text-decoration: line-through;
    color: #999;
    font-size: 0.75em;
    margin-right: 6px;
    font-weight: 500;
}

/* Si está en oferta, le damos un verde copado al precio nuevo */
.precio-variante-texto.precio-destacado {
    color: #28a745;
    font-weight: 800;
    font-size: 1.1em;
}

.ver-producto-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.ver-producto-card.active {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
}

.ver-producto-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-bottom: 1px solid var(--color-border);
}

.ver-producto-info-variante {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Esto hace que el cuerpo de texto ocupe el espacio disponible */
  gap: 1rem;
}

.ver-producto-titulo-variante {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

.ver-producto-seccion-color-fijo,
.ver-producto-seccion-requerimientos {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Contenedor para que el círculo y el texto queden alineados horizontalmente */
.ver-producto-color-valor {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Le devolvemos la vida al circulito */
.ver-producto-circulo-color-fijo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #a3a3a3;
    flex-shrink: 0;
}

/* Estilo para la palabra "Negro" o "Blanco" */
.ver-producto-texto-color-fijo {
  font-size: 0.875rem;
  color: var(--color-text-primary);
  font-weight: 500;
}

.ver-producto-label-atributo {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ver-producto-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ver-producto-tag {
  padding: 0.35rem 0.6rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.ver-producto-tag-tela {
  background-color: var(--color-tag-tela);
  color: var(--color-tag-tela-text);
}

.ver-producto-tag-red {
  background-color: var(--color-tag-red);
  color: var(--color-tag-red-text);
}

/* El bloque de precio y botón quedan pegados abajo */
.ver_producto-precio-variante {
  margin-top: auto; /* EMPUJA TODO HACIA ABAJO */
  font-size: 1.25rem;
  font-weight: 600;
  padding-top: 0.5rem;
}

.ver-producto-btn-elegir {
  width: 100%;
  padding: 0.875rem;
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.ver-producto-card:hover .ver-producto-btn-elegir {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

.ver-producto-card.active .ver-producto-btn-elegir {
  background-color: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

/* ============================================
   SELECTORES GLOBALES
   ============================================ */

.ver-producto-selectores-globales {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

/* Selectores visuales limpios, sin cajas pesadas */
.ver-producto-selector-colores-wrapper,
.ver-producto-seccion-materiales {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ver-producto-titulo-selector,
.ver-producto-titulo-seccion {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
}

.ver-producto-grilla-colores-seleccionables {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.ver-producto-opcion-color-circulo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid var(--color-border);
  position: relative;
  transition: all var(--transition-base);
}

.ver-producto-opcion-color-circulo:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-sm);
}

.ver-producto-opcion-color-circulo.active {
  box-shadow: 0 0 0 2px var(--color-white), 0 0 0 4px var(--color-accent);
  border-color: transparent;
}

.ver-producto-contenedor-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ============================================
   BOTONES DE SELECCIÓN (PRINCIPALES)
   ============================================ */
.ver-producto-btn-material {
  padding: 0.75rem 1.5rem;
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-base);
  cursor: pointer;
}

.ver-producto-btn-material:hover {
  border-color: var(--color-text-primary);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.ver-producto-btn-material.active {
  background-color: var(--color-text-primary);
  color: var(--color-white);
  border-color: var(--color-text-primary);
  transform: translateY(0);
}

/* ============================================
   MODAL FULLSCREEN (LIGHTBOX)
   ============================================ */
#ver-producto-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

#ver-producto-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.ver-producto-lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px); /* Da un efecto esmerilado muy elegante */
}

#ver-producto-lightbox-img {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  z-index: 10000;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform var(--transition-base);
}

#ver-producto-lightbox.active #ver-producto-lightbox-img {
  transform: scale(1);
}

.ver-producto-lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background-color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--color-text-primary);
  z-index: 10001;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.ver-producto-lightbox-close:hover {
  background-color: var(--color-border);
  transform: scale(1.1);
}

.ver-producto-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-white);
  z-index: 10001;
  transition: all var(--transition-base);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ver-producto-lightbox-nav:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.1);
}

.ver-producto-lightbox-nav.prev { left: 2rem; }
.ver-producto-lightbox-nav.next { right: 2rem; }

@media (max-width: 768px) {
  .ver-producto-lightbox-nav { display: none; /* En celular se desliza táctil o cerramos para no molestar */ }
  .ver-producto-lightbox-close { top: 1rem; right: 1rem; width: 36px; height: 36px; font-size: 1rem; }
  #ver-producto-lightbox-img { max-width: 95vw; max-height: 80vh; }
}

/* ============================================
   MODAL DE MATERIALES (Telas y Redes) - ELEGANTE
   ============================================ */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 350ms ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; } 
  to { opacity: 1; }
}

.modal-content {
  background-color: #ffffff;
  margin: 4% auto;
  padding: 2rem;
  border-radius: 0.75rem;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: slideUp 350ms ease-out;
}

@keyframes slideUp {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.close {
  color: #9ca3af;
  position: absolute;
  right: 1.25rem;
  top: 1rem;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  transition: all 150ms ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
}

.close:hover {
  color: #1f2937;
  background: #f3f4f6;
}

/* ============================================
   GRILLA Y MUESTRAS DE TELA/RED
   ============================================ */
.grilla-muestrario {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.muestra-item {
  text-align: center;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 0.375rem;
  transition: all 250ms ease;
  border: 2px solid transparent;
}

.muestra-item:hover {
  background: #f9fafb;
  border-color: #e5e7eb;
  transform: translateY(-4px);
}

.muestra-img {
  width: 90px;
  height: 90px;
  border-radius: 9999px;
  object-fit: cover;
  border: 3px solid #f3f4f6;
  transition: all 250ms ease;
}

.muestra-item:hover .muestra-img {
  border-color: var(--color-text-primary, #000); /* Usa tu color principal */
  transform: scale(1.05);
}

.muestra-nombre {
  display: block;
  font-size: 0.875rem;
  margin-top: 0.75rem;
  color: #374151;
  font-weight: 500;
}

/* =========================================
   SECCIÓN ADICIONALES (METÁLICOS)
========================================= */

/* Separador superior sutil */
.ver-producto-adicionales-wrapper {
    border-top: 1px solid #eaeaea;
    padding-top: 15px;
}

/* Tarjeta contenedora de cada ítem */
.ver-producto-adicional-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.2s ease-in-out;
    overflow: hidden; /* Para que el hover respete los bordes redondeados */
}

/* Efecto Hover: se levanta apenas y remarca el borde */
.ver-producto-adicional-item:hover {
    border-color: #b3b3b3;
    box-shadow: 0 4px 8px rgba(0,0,0,0.06);
}

/* EFECTO MAGIA: Cuando el checkbox está seleccionado, cambia el estilo de toda la tarjeta */
.ver-producto-adicional-item:has(.ver-producto-checkbox-adicional:checked) {
    border-color: #2196F3; /* Color azul profesional, ajustalo al tono de Mapolmet */
    background-color: #f4f9ff;
}

/* Asegurar que toda la zona de la tarjeta sea clickeable */
.ver-producto-adicional-item label {
    margin: 0;
    padding: 14px 16px;
    width: 100%;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Quita el destello azul feo en celulares */
}

/* =========================================
   CUSTOM CHECKBOX (Reemplaza al del navegador)
========================================= */
.ver-producto-checkbox-adicional {
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    margin: 0;
    width: 22px;
    height: 22px;
    border: 2px solid #ccc;
    border-radius: 5px;
    display: inline-grid;
    place-content: center;
    transition: all 0.2s ease-in-out;
    flex-shrink: 0; /* Evita que el cuadradito se achique si el texto es muy largo */
}

/* Dibujo del tilde (checkmark) en blanco, inicialmente invisible */
.ver-producto-checkbox-adicional::before {
    content: "";
    width: 12px;
    height: 12px;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em white;
    background-color: white;
    transform-origin: center;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

/* Estado activo del checkbox: fondo azul y borde azul */
.ver-producto-checkbox-adicional:checked {
    background-color: #2196F3;
    border-color: #2196F3;
}

/* Aparece el tilde cuando está activo */
.ver-producto-checkbox-adicional:checked::before {
    transform: scale(1);
}

/* Estilo del texto */
.ver-producto-adicional-item span {
    color: #333;
    font-weight: 500;
}

/* ============================================
   BOTONES DE COMPARTIR FLOTANTES (RESPONSIVOS)
   ============================================ */

/* 1. Aseguramos que el contenedor móvil retenga la cápsula flotante */
.ver-producto-galeria-mobile {
  position: relative;
}

/* 2. Estilos base (Diseño para Celulares) */
.share-buttons-floating {
  position: absolute;
  top: 0.75rem;   /* Más pegado al borde en celular */
  right: 0.75rem; 
  
  display: flex;
  flex-direction: column;
  gap: 0.75rem;   /* Menos espacio entre iconos */
  
  z-index: 10; /* Siempre arriba de las fotos */
  
  background-color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); /* Soporte para Safari en iPhone */
  padding: 0.5rem 0.4rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.share-buttons-floating .share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

/* Iconos más chicos en celular para no tapar el mueble */
.share-buttons-floating .share-btn img {
  width: 22px; 
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.15));
}

/* 3. Media Query (Diseño para PC / Tablets grandes) */
@media (min-width: 768px) {
  .share-buttons-floating {
    top: 1.5rem;   /* Separación más elegante en PC */
    right: 1.5rem; 
    padding: 0.75rem 0.5rem;
    gap: 1rem;
  }

  .share-buttons-floating .share-btn img {
    width: 28px;   /* Tamaño original que te gustó en PC */
    height: 28px;
  }
  
  .share-buttons-floating:hover {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
  }

  .share-buttons-floating .share-btn:hover {
    transform: scale(1.15);
  }
}