/**
 * ESTILOS - PAGINA DE DETALLE DE PRODUCTO
 * Diseño identico al plugin WordPress joinet-pagina-producto
 * Layout CSS Grid 3 columnas con Drift Zoom
 * Mayoreo Joinet
 */

/* ========================================
   FUENTE GLOBAL: Montserrat (igual que menudeo)
   ======================================== */
body,
.container,
.producto-main-container,
.producto-info,
.producto-compra,
.producto-imagenes {
    font-family: 'Montserrat', montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
}

/* ========================================
   REGLA GLOBAL MOVIL: Todo debajo del menu
   ======================================== */
@media (max-width: 1024px) {

    .producto-main-container,
    .producto-imagenes,
    .producto-info,
    .producto-compra,
    .main-image-container,
    .contenido-secciones,
    .content-section,
    #main-product-image {
        position: static !important;
        z-index: auto !important;
        transform: none !important;
        filter: none !important;
        perspective: none !important;
        will-change: auto !important;
        isolation: auto !important;
    }

    .gallery-controls,
    .gallery-prev,
    .gallery-next {
        z-index: 10 !important;
    }

    .main-image-container:hover #main-product-image {
        transform: none !important;
    }

    .clean-pricing-table tbody tr:hover {
        transform: none !important;
    }
}

/* ========================================
   BREADCRUMB (conservado de mayoreo)
   ======================================== */
.breadcrumb {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 18px 25px;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    font-family: 'Montserrat', sans-serif;
    border: 1px solid #e9ecef;
}

.breadcrumb-item a {
    color: #ff0000;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: #cc0000;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #495057;
    font-weight: 600;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: #6c757d;
}

/* ========================================
   LAYOUT PRINCIPAL - CSS GRID 3 COLUMNAS
   ======================================== */
.producto-main-container {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

/* ========================================
   COLUMNA 1: IMAGENES
   ======================================== */
.producto-imagenes {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 550px;
    width: 100%;
}

.main-image-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}

#main-product-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
    transform-origin: center center;
    cursor: zoom-in;
}

/* Drift Zoom */
.main-image-container.zoom-active #main-product-image {
    transform: scale(2.5);
    cursor: zoom-out;
}

/* Zoom hint */
.zoom-hint {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.main-image-container:hover .zoom-hint {
    opacity: 1;
}

.main-image-container.zoom-active .zoom-hint {
    opacity: 0;
}

.zoom-hint svg {
    width: 16px;
    height: 16px;
}

/* Efecto de brillo radial */
.main-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.main-image-container:hover::after {
    opacity: 1;
}

.main-image-container.zoom-active::after {
    opacity: 0;
}

/* Badges de oferta/rebaja */
.product-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    z-index: 10;
    animation: pulse 2.5s ease-in-out infinite;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
}

.badge-oferta {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #fff;
}

.badge-rebaja {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
}

.badge-remate {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
}


/* Badge classes from helper */
.product-badge.jn-badge-oferta-semana { background: linear-gradient(135deg, #16a34a 0%, #15803d 100%); color: #fff; }
.product-badge.jn-badge-liquidacion { background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%); color: #fff; }
.product-badge.jn-badge-alcosto { background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%); color: #fff; }
.product-badge.jn-badge-remate { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); color: #fff; }
.product-badge.jn-badge-oferta { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); color: #fff; }
.product-badge.jn-badge-rebaja { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: #fff; }
.product-badge.jn-badge-nuevo { background: linear-gradient(135deg, #1f2937 0%, #111827 100%); color: #fff; }

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ========================================
   GALERIA THUMBNAILS
   ======================================== */
.galeria-thumbnails-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

.galeria-thumbnails {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    scroll-behavior: smooth;
    transition: transform 0.3s ease;
    width: max-content;
    max-width: 100%;
}

.thumbnail {
    min-width: 80px;
    max-width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s ease;
    flex-shrink: 0;
}

.thumbnail.active,
.thumbnail:hover {
    border-color: #ff0000;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Controles de galeria */
.gallery-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
    display: none;
}

.gallery-controls.show {
    display: flex;
    justify-content: space-between;
}

.gallery-prev,
.gallery-next {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: all;
    font-weight: bold;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: scale(1.1);
}

.gallery-prev:disabled,
.gallery-next:disabled {
    cursor: not-allowed;
    opacity: 0.4;
    background: rgba(0, 0, 0, 0.3);
}

.gallery-prev:disabled:hover,
.gallery-next:disabled:hover {
    transform: none;
    background: rgba(0, 0, 0, 0.3);
}

.gallery-prev {
    margin-left: 5px;
}

.gallery-next {
    margin-right: 5px;
}

/* Dots (ocultos en desktop) */
.gallery-dots {
    display: none;
}

/* ========================================
   COLUMNA 2: INFO DEL PRODUCTO
   ======================================== */
.producto-info {
    padding: 0 20px;
}

.producto-titulo {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
}

.campos-personalizados {
    font-size: 0.95em;
    line-height: 1.6;
    color: #666;
}

.custom-fields-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-fields-list>li {
    margin-bottom: 4px;
    padding: 3px 0;
}

.stock-warehouse-list {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}

.stock-warehouse-list li {
    padding: 3px 0;
    font-size: 0.95em;
}

.stock-green {
    color: #1a7f37;
    font-weight: 600;
}

.stock-red {
    color: #d63638;
    font-weight: 600;
}

/* SKU copiable */
.sku-copyable {
    cursor: pointer;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    transition: background 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.sku-copyable:hover {
    background: #e0e0e0;
}

.sku-copyable i {
    font-size: 0.85em;
    color: #666;
}

/* Brand logo */
/* FedEx shipping info */
.fedex-shipping-info {
    margin: 8px 0;
    font-size: 1.05em;
    line-height: 1.6;
    color: #333;
}

.fedex-shipping-info .fedex-logo {
    vertical-align: baseline;
    max-width: calc(15% + 3px);
    margin-top: 10px;
}

.fedex-shipping-info strong {
    color: #000000;
}

/* Alert sucursales bloqueadas */
.alert-sucursales-bloqueadas {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 10px;
    font-size: 0.9em;
    color: #856404;
}

/* ========================================
   COLUMNA 3: PRECIO Y COMPRA
   ======================================== */
.producto-compra {
    padding: 0 20px;
}

.precio-container {
    margin-bottom: 8px;
    text-align: center;
}

.precio-actual {
    color: #ff0000;
    font-size: 1.5em;
    font-weight: bold;
}

.precio-original {
    text-decoration: line-through;
    color: #999;
    font-size: 1.1em;
    margin-right: 10px;
}

.precio-oferta {
    color: #ff0000;
    font-size: 1.5em;
    font-weight: bold;
}

/* Mensaje de ahorro acumulado */
.ahorro-acumulado {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 700;
    margin-top: 8px;
    text-align: center;
    display: none;
    animation: slideInSavings 0.5s ease;
}

@keyframes slideInSavings {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Precio dinámico tachado */
.precio-principal-tachado {
    text-decoration: line-through;
    color: #999;
    font-size: 1.1em;
    margin-right: 10px;
    display: inline;
}

.precio-principal-nuevo {
    color: #ff0000;
    font-size: 1.5em;
    font-weight: bold;
    display: inline;
}

/* Stock info */
.stock-info {
    margin-bottom: 8px;
}

.stock-disponible {
    color: #28a745;
    font-weight: 600;
}

/* ========================================
   TABLA DE PRECIOS ESTILO WP
   ======================================== */
.tabla-precios {
    margin-bottom: 10px;
}

.clean-pricing-table {
    border: none;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    background: transparent;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    margin: 8px 0;
}

.clean-pricing-table thead {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

.clean-pricing-table th {
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: left;
    position: relative;
}

.clean-pricing-table td {
    border: none;
    padding: 14px 24px;
    font-size: 16px;
    color: #2d3748;
    transition: all 0.3s ease;
    vertical-align: middle;
    position: relative;
}

.clean-pricing-table th,
.clean-pricing-table td {
    box-sizing: border-box;
}

.clean-pricing-table tbody td:first-child>span {
    display: inline-block;
    padding-left: 10px;
}

.clean-pricing-table th:first-child {
    padding-left: 34px;
}

.clean-pricing-table tbody tr {
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    border-left: 4px solid transparent;
    cursor: pointer;
}

.clean-pricing-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

/* Hover en filas NO activas */
.clean-pricing-table tbody tr:hover:not(.active) {
    background: #f0f9ff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-left: 3px solid #ff0000;
}

/* Hover general (incluye activa) */
.clean-pricing-table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
}

/* Fila activa - nivel seleccionado por cantidad */
.clean-pricing-table .price-row.active {
    position: relative;
    z-index: 2;
}

.clean-pricing-table .price-row.active td {
    background: #dc2626 !important;
    color: #ffffff !important;
    font-weight: 600;
    border-color: transparent;
}

.clean-pricing-table .price-row.active td:first-child {
    border-left: 4px solid #dd2626;
    color: #ffffff !important;
}

.clean-pricing-table .price-row.active:hover td {
    background: #b91c1c !important;
}

.clean-pricing-table .price-row.active .price-level-badge {
    color: #ffffff;
    font-weight: 700;
}

.clean-pricing-table .price-row.active .piezas-rango {
    color: rgba(255, 255, 255, 0.9);
}

.clean-pricing-table .price-row.active .ahorro-badge {
    background: rgba(255, 255, 255, 0.95);
    color: #dc2626;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.clean-pricing-table .price-row.active .price-offer {
    color: #fef08a;
    font-weight: 700;
}

.clean-pricing-table tbody td:first-child {
    font-weight: 600;
    color: #374151;
    font-size: 17px;
}

.clean-pricing-table tbody td:first-child,
.clean-pricing-table tbody td:last-child {
    vertical-align: middle !important;
}

.clean-pricing-table tbody td:first-child>span {
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

.clean-pricing-table tbody tr:first-child td:first-child {
    border-radius: 0;
}

.clean-pricing-table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 12px;
}

.clean-pricing-table tbody tr:last-child td:last-child {
    border-radius: 0 0 12px 0;
}

/* Badge de nivel de precio */
.price-level-badge {
    display: inline-block;
    color: #000000;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
}

/* Rango de piezas en tabla */
.piezas-rango {
    font-size: 16px;
    color: #555;
    font-weight: 500;
}

/* Precio con oferta */
.price-offer {
    color: #dc2626;
}

/* Badge de ahorro */
.ahorro-badge {
    display: inline-block;
    padding: 3px 10px;
    background: #28a745;
    color: #fff;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
}

.precio-tabla-footer {
    font-size: 0.95em;
    color: #666;
    margin-top: 5px;
}

/* ========================================
   BOTONES NO DISPONIBLE / AGOTADO
   ======================================== */
.jn-no-online-container,
.jn-agotado-container {
    margin: 15px 0;
}

.jn-btn-disabled {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.4;
    gap: 4px;
    border: none;
}

.jn-btn-no-online {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffc107;
}

.jn-btn-no-online i {
    color: #d68910;
    margin-right: 6px;
    font-size: 16px;
}

.jn-btn-no-online .jn-subtext {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-top: 4px;
    color: #856404;
}

.jn-btn-agotado {
    background: linear-gradient(135deg, #ffeaea 0%, #ffcccc 100%);
    color: #c0392b;
    border: 1px solid #e74c3c;
}

.jn-btn-agotado i {
    color: #e74c3c;
    margin-right: 6px;
}

/* ========================================
   FORMULARIO CANTIDAD + BOTON CARRITO
   ======================================== */
.cart-form-container {
    margin-bottom: 5px;
}

.quantity-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.quantity-container label {
    font-weight: 600;
}

.quantity-container input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* Boton negro como en WP */
.btn-anadir-carrito {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: #000000;
    color: white;
    display: inline-block;
}

.btn-anadir-carrito:hover {
    background: #333333;
    transform: translateY(-2px);
    color: white;
}

/* Oferta semanal badge */
.oferta-semanal-badge {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 10px;
}

/* ========================================
   SECCION DESCRIPCION (fuera del grid)
   ======================================== */
.contenido-secciones {
    margin-top: 0;
}

.content-section {
    margin-bottom: 60px;
    padding: 40px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.section-content h2 {
    font-size: 2em;
    margin-bottom: 30px;
    color: #333;
    border-bottom: 3px solid #ff0000;
    padding-bottom: 10px;
}

.descripcion-producto {
    margin-bottom: 40px;
    line-height: 1.7;
}

/* Contenido de descripcion WooCommerce */
.descripcion-producto p {
    margin-bottom: 15px;
}

.descripcion-producto h1,
.descripcion-producto h2,
.descripcion-producto h3,
.descripcion-producto h4,
.descripcion-producto h5,
.descripcion-producto h6 {
    color: #212529;
    font-weight: 700;
    margin-top: 25px;
    margin-bottom: 15px;
}

.descripcion-producto ul,
.descripcion-producto ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.descripcion-producto li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.descripcion-producto img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
}

.descripcion-producto table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.descripcion-producto table th,
.descripcion-producto table td {
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    text-align: left;
}

.descripcion-producto table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 700;
    color: #212529;
}

.descripcion-producto a {
    color: #ff0000;
    text-decoration: none;
    font-weight: 600;
}

.descripcion-producto a:hover {
    color: #cc0000;
    text-decoration: underline;
}

/* ========================================
   BOTON VOLVER
   ======================================== */
.btn-volver {
    background-color: #000000;
    color: white;
    border: none;
    padding: 16px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-volver:hover {
    background-color: #333333;
    transform: translateX(-5px);
    color: white;
    text-decoration: none;
}

/* ========================================
   ANIMACIONES
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.clean-pricing-table tbody tr {
    animation: fadeInUp 0.6s ease-out;
}

/* ========================================
   RESPONSIVE: 1200px - 2 columnas
   ======================================== */
@media (max-width: 1200px) {
    .producto-main-container {
        grid-template-columns: 0.8fr 1.2fr;
    }

    .producto-compra {
        grid-column: 1 / -1;
        margin-top: 10px;
    }
}

/* ========================================
   RESPONSIVE: 768px - 1 columna (block)
   ======================================== */
@media (max-width: 768px) {
    .producto-main-container {
        display: block !important;
        padding: 10px;
        margin-bottom: 20px;
        border-radius: 8px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .producto-imagenes,
    .producto-info,
    .producto-compra {
        margin-bottom: 15px;
    }

    /* Imagenes movil */
    .producto-imagenes {
        width: 100% !important;
        max-width: 100% !important;
        gap: 10px;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .main-image-container {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 8px;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    #main-product-image {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        display: block;
        object-fit: contain;
    }

    /* Zoom movil */
    .main-image-container.zoom-active #main-product-image {
        transform: scale(2);
    }

    .zoom-hint {
        bottom: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 11px;
    }

    .zoom-hint svg {
        width: 14px;
        height: 14px;
    }

    .zoom-hint::after {
        content: ' (doble tap)';
    }

    .main-image-container::after {
        display: none !important;
    }

    /* Galeria movil - scroll horizontal */
    .galeria-thumbnails-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        margin: 0;
        padding: 0;
        position: relative;
        box-sizing: border-box !important;
    }

    .galeria-thumbnails {
        display: flex;
        gap: 8px;
        padding: 8px 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        width: auto !important;
        max-width: none !important;
        transform: none !important;
    }

    .galeria-thumbnails::-webkit-scrollbar {
        display: none;
        height: 0;
    }

    .thumbnail {
        min-width: 60px;
        max-width: 60px;
        height: 60px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    /* Controles movil */
    .gallery-controls {
        display: flex !important;
        justify-content: space-between;
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        transform: translateY(-50%);
        pointer-events: none;
        z-index: 10;
        padding: 0 2px;
    }

    .gallery-prev,
    .gallery-next {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        font-size: 16px;
        background: rgba(255, 0, 0, 0.85);
        pointer-events: all;
        border-radius: 50%;
        border: none;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
        padding: 0;
        flex-shrink: 0;
    }

    .gallery-prev:active,
    .gallery-next:active {
        transform: scale(0.95);
        background: rgba(200, 0, 0, 0.95);
    }

    /* Dots movil */
    .gallery-dots {
        display: flex;
        justify-content: center;
        gap: 6px;
        padding: 8px 0 4px;
    }

    .gallery-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #ddd;
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .gallery-dot.active {
        background: #ff0000;
        transform: scale(1.2);
    }

    /* Info movil */
    .producto-info {
        padding: 0;
    }

    .producto-titulo {
        font-size: 20px !important;
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
    }

    /* Compra movil */
    .producto-compra {
        padding: 12px;
        background: #f9f9f9;
        border-radius: 8px;
    }

    .precio-container {
        margin-bottom: 6px;
    }

    .precio-actual {
        font-size: 28px !important;
    }

    /* Tabla precios movil */
    .tabla-precios {
        margin: 8px 0 10px 0;
        padding: 0;
        overflow-x: auto;
    }

    .clean-pricing-table {
        min-width: 100%;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .clean-pricing-table th,
    .clean-pricing-table td {
        padding: 12px 8px;
    }

    .clean-pricing-table th {
        font-size: 12px;
    }

    .clean-pricing-table td {
        font-size: 14px;
    }

    /* Boton no online movil */
    .jn-btn-disabled {
        padding: 10px 12px;
        font-size: 13px;
    }

    .jn-btn-no-online .jn-subtext {
        font-size: 11px;
    }

    /* Seccion contenido movil */
    .content-section {
        padding: 20px 15px;
        margin-bottom: 30px;
    }

    .section-content h2 {
        font-size: 1.5em;
    }
}

/* ========================================
   RESPONSIVE: 480px - movil pequeno
   ======================================== */
@media (max-width: 480px) {
    .producto-main-container {
        gap: 12px;
        padding: 12px;
    }

    .producto-titulo {
        font-size: 17px !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
    }

    .precio-actual {
        font-size: 24px !important;
    }

    /* Galeria movil pequeno */
    .galeria-thumbnails {
        gap: 6px;
        padding: 6px 0;
        width: auto !important;
        max-width: none !important;
        transform: none !important;
    }

    .thumbnail {
        min-width: 50px;
        max-width: 50px;
        height: 50px;
    }

    .gallery-prev,
    .gallery-next {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        font-size: 14px;
    }

    .gallery-dots {
        padding: 6px 0 2px;
    }

    .gallery-dot {
        width: 6px;
        height: 6px;
    }

    /* Botones touch */
    .btn-anadir-carrito {
        padding: 14px 20px !important;
        font-size: 15px !important;
        min-height: 48px;
    }

    .quantity-container input {
        font-size: 16px !important;
        min-height: 44px;
        padding: 8px !important;
    }

    /* Tabla extra optimizada */
    .clean-pricing-table th,
    .clean-pricing-table td {
        padding: 8px 5px !important;
        font-size: 11px !important;
    }

    .clean-pricing-table th {
        font-size: 10px !important;
    }

    /* Breadcrumb compacto */
    .breadcrumb {
        padding: 12px 15px;
        font-size: 13px;
    }

    .product-badge {
        font-size: 12px;
        padding: 8px 14px;
        top: 15px;
        right: 15px;
    }
}

/* ========================================
   JOINET STOCK INFO (caja roja informativa)
   ======================================== */
.joinet-stock-info {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border: 1px solid #f87171;
    border-left: 4px solid #dc2626;
    padding: 14px 18px;
    margin: 12px 0;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.2);
    position: relative;
}

.joinet-stock-info::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #dc2626, #ef4444, #dc2626);
    border-radius: 6px 6px 0 0;
}

.joinet-stock-info p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: #7f1d1d;
}

.joinet-stock-info .joinet-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #dc2626;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    margin-right: 8px;
    vertical-align: middle;
}

.joinet-stock-info .joinet-info-title {
    color: #991b1b;
    font-weight: 700;
    font-size: 14px;
}

.joinet-stock-info strong:not(.joinet-info-title) {
    color: #b91c1c;
}

@media (max-width: 768px) {
    .joinet-stock-info {
        padding: 12px 14px;
        margin: 10px 0;
        border-left-width: 3px;
    }

    .joinet-stock-info p {
        font-size: 12px;
        line-height: 1.6;
    }

    .joinet-stock-info .joinet-info-icon {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .joinet-stock-info {
        padding: 10px 12px;
        margin: 8px 0;
    }

    .joinet-stock-info p {
        font-size: 11px;
    }
}

/* ========================================
   SOCIAL SHARE BUTTONS
   ======================================== */
.wcss-social-share {
    margin: 5px 0 0 0;
    padding: 0;
    text-align: left;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    animation: fadeInUp 0.6s ease-out;
}

.wcss-social-share h3 {
    font-size: 17px;
    margin: 0;
    margin-right: 5px;
    color: #666;
    font-weight: 700;
    letter-spacing: 0;
    position: relative;
}

.wcss-social-share h3::after {
    display: none;
}

.wcss-social-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
}

.wcss-social-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: 16px !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.wcss-social-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 50%;
}

.wcss-social-button:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    color: #fff;
}

.wcss-social-button:hover::before {
    transform: scale(1);
}

.wcss-social-button:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.wcss-social-button svg {
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
    fill: #fff;
}

.wcss-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.wcss-facebook {
    background: linear-gradient(135deg, #3B5998 0%, #2d4373 100%);
}

.wcss-instagram {
    background: linear-gradient(135deg, #E4405F 0%, #C13584 50%, #833AB4 100%);
}

.wcss-x {
    background: linear-gradient(135deg, #000000 0%, #434343 100%);
}

.wcss-whatsapp:hover {
    background: linear-gradient(135deg, #128C7E 0%, #25D366 100%);
}

.wcss-facebook:hover {
    background: linear-gradient(135deg, #2d4373 0%, #4267B2 100%);
}

.wcss-instagram:hover {
    background: linear-gradient(135deg, #833AB4 0%, #E4405F 50%, #FCCC63 100%);
}

.wcss-x:hover {
    background: linear-gradient(135deg, #434343 0%, #1DA1F2 100%);
}

.wcss-social-button:nth-child(1) {
    animation-delay: 0.1s;
}

.wcss-social-button:nth-child(2) {
    animation-delay: 0.2s;
}

.wcss-social-button:nth-child(3) {
    animation-delay: 0.3s;
}

.wcss-social-button:nth-child(4) {
    animation-delay: 0.4s;
}

@media (max-width: 768px) {
    .wcss-social-share {
        margin: 15px 0;
        padding: 10px 15px;
        flex-wrap: nowrap;
    }

    .wcss-social-buttons {
        gap: 8px;
        flex-wrap: nowrap;
    }

    .wcss-social-button {
        width: 32px;
        height: 32px;
        font-size: 16px !important;
    }

    .wcss-social-share h3 {
        font-size: 13px;
        margin-bottom: 0;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .wcss-social-buttons {
        gap: 6px;
    }

    .wcss-social-button {
        width: 28px;
        height: 28px;
        font-size: 14px !important;
    }

    .wcss-social-share h3 {
        font-size: 12px;
    }
}

/* ========================================
   VIEWING COUNTER
   ======================================== */
.joinet-viewing {
    margin-top: 5px;
    display: flex;
    align-items: center;
    color: #666;
    font-size: 17px;
}

.joinet-viewing .joinet-count {
    margin-right: 5px;
}

/* ========================================
   UTILIDADES GENERALES
   ======================================== */
.container {
    max-width: 1600px;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ========================================
   LISTA 7 (PRECIO POR CAJA) - ESTILOS
   ======================================== */
.lista-caja-row {
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.08) 0%, rgba(255, 87, 34, 0.05) 100%) !important;
    border-left: 4px solid #ff4500;
}

.price-level-caja {
    background: none !important;
    color: #212529 !important;
}

.price-caja {
    color: #e63900 !important;
    font-size: 1.1em !important;
}

/* ========================================
   BOTÓN AGREGAR CAJA - ESTILOS
   ======================================== */
@keyframes pulse-soft-detail {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3),
                    0 0 20px rgba(255, 100, 0, 0.2);
    }
    50% {
        box-shadow: 0 6px 20px rgba(255, 69, 0, 0.4),
                    0 0 30px rgba(255, 100, 0, 0.3);
    }
}

@keyframes shimmer-detail {
    0% { left: -100%; }
    100% { left: 100%; }
}

.btn-add-caja {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #e63900 0%, #ff4500 50%, #ff5722 100%);
    color: #fff;
    border: none;
    padding: 14px 25px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3),
                0 0 20px rgba(255, 100, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    animation: pulse-soft-detail 2s ease-in-out infinite;
    overflow: hidden;
    margin-top: 10px;
}

.btn-add-caja::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent);
    animation: shimmer-detail 3s ease-in-out infinite;
}

.btn-add-caja:hover {
    background: linear-gradient(135deg, #ff4500 0%, #ff5722 50%, #ff6f3c 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 69, 0, 0.4),
                0 0 35px rgba(255, 100, 0, 0.3);
    animation: none;
}

.btn-add-caja:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 3px 10px rgba(255, 69, 0, 0.3);
}

.btn-add-caja i {
    font-size: 16px;
}

@media (max-width: 768px) {
    .btn-add-caja {
        font-size: 13px;
        padding: 12px 20px;
    }
}

@media (max-width: 576px) {
    .btn-add-caja {
        font-size: 12px;
        padding: 11px 18px;
    }
}