/* 
 * TEMPLATE MODERNO V3.0 - PÁGINA DE PRODUCTO
 * Diseño completamente renovado: minimalista, elegante y funcional
 * 
 * Variables CSS globales desde configpage.php:
 * --main-color, --main-color2, --main-color3
 * --secondary-color, --accent-color, --text-muted
 * --success-color, --warning-color, --danger-color
 */

/* === RESET Y BASE === */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    margin: 0;
    padding: 0;
    color: #1f2937;
    line-height: 1.6;
}

/* === CONTAINER PRINCIPAL === */
.product-modern-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    background: #ffffff;
}

/* === HEADER === */
.product-modern-header {
    padding: 1rem 0 2rem;
    margin-bottom: 3rem;
}

.product-modern-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.product-modern-breadcrumb span:not(:last-child):after {
    content: "→";
    margin-left: 0.5rem;
    color: #d1d5db;
}

/* === INDICADORES === */
.product-status-indicators {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.status-indicator {
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.status-indicator:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.status-indicator.digital {
    background: linear-gradient(135deg, var(--main-color), var(--main-color2));
    color: white;
}

.status-indicator.shipping {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.status-indicator.stock {
    background: linear-gradient(135deg, var(--main-color), var(--main-color2));
    color: white;
}

.status-indicator.out-of-stock {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

/* === LAYOUT PRINCIPAL === */
.product-modern-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
    margin-bottom: 5rem;
}

/* === GALERÍA === */
.product-modern-gallery {
    position: sticky;
    top: 2rem;
}

.product-modern-main-image {
    width: 100%;
    aspect-ratio: 1;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    cursor: zoom-in;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f3f4f6;
}

.product-modern-main-image:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.3);
}

.product-modern-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.product-modern-main-image:hover img {
    transform: scale(1.05);
}

/* === OVERLAY === */
.image-zoom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 2rem;
    backdrop-filter: blur(4px);
}

.product-modern-main-image:hover .image-zoom-overlay {
    opacity: 1;
}

/* === BADGE DESCUENTO === */
.floating-discount-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
}

.floating-discount-badge .discount-percentage {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 1.125rem;
    font-weight: 900;
    box-shadow: 0 20px 40px rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

.floating-discount-badge .discount-text {
    display: block;
    background: #f59e0b;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.75rem;
    text-align: center;
    letter-spacing: 1px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* === THUMBNAILS === */
.product-modern-thumbnails {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.product-modern-thumb {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    opacity: 0.6;
}

.product-modern-thumb:hover,
.product-modern-thumb.active {
    border-color: var(--main-color);
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.product-modern-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === INFORMACIÓN === */
.product-modern-info {
    padding: 0 2rem;
}

.product-modern-category {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-color), #f3f4f6);
    color: var(--main-color);
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid var(--main-color);
}

.product-modern-title {
    font-size: 3rem;
    font-weight: 900;
    color: #111827;
    margin: 0 0 1.5rem 0;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

/* === INFO TÉCNICA === */
.product-technical-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.product-sku,
.product-weight,
.product-dimensions {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
    text-align: center;
}

/* === BADGES === */
.product-modern-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.modern-badge {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-badge.new {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.modern-badge.featured {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.modern-badge.sale {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.modern-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* === PRECIO === */
.product-modern-price {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 25px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.price-with-discount .price-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.discount-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 800;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.savings-text {
    color: #10b981;
    font-weight: 700;
    font-size: 1rem;
}

.price-comparison {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.price-original {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 1.5rem;
    font-weight: 600;
}

.price-current {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--main-color);
    line-height: 1;
}

.price-simple .price-current {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--main-color);
    line-height: 1;
}

/* === ENTREGA === */
.delivery-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #eff6ff;
    border-radius: 20px;
    border: 1px solid #bfdbfe;
    margin-bottom: 2rem;
    color: #1e40af;
    font-weight: 600;
}

.delivery-info i {
    font-size: 1.5rem;
}

/* === DESCRIPCIÓN === */
.product-modern-description {
    margin-bottom: 2.5rem;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #4b5563;
}

/* === VARIANTES === */
.product-modern-variants {
    margin-bottom: 2.5rem;
    background: #f9fafb;
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
}

.variants-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

.variants-title i {
    color: var(--main-color);
}

.modern-variant-group {
    margin-bottom: 2rem;
}

.modern-variant-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.modern-variant-label i {
    color: var(--main-color);
}

.modern-variant-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modern-variant-option {
    padding: 1rem 1.5rem;
    border: 3px solid #e5e7eb;
    border-radius: 20px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #374151;
    min-width: 120px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.modern-variant-option:hover {
    border-color: var(--main-color);
    background: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.modern-variant-option.selected {
    border-color: var(--main-color);
    background: var(--main-color);
    color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Estilos específicos para variantes de color */
.color-variant {
    min-width: 100px;
}

.color-preview {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: block;
}

.variant-text {
    font-weight: 600;
    text-align: center;
}

.variant-price {
    color: var(--success-color);
    font-weight: 700;
    font-size: 0.875rem;
}

.variant-stock {
    color: var(--success-color);
    font-size: 0.75rem;
    font-weight: 500;
}

.variant-no-stock {
    color: var(--danger-color);
    font-size: 0.75rem;
    font-weight: 500;
}

/* === ACCIONES === */
.product-modern-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.modern-quantity-selector {
    display: flex;
    border: 3px solid #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    background: #ffffff;
}

.modern-quantity-btn {
    padding: 1rem 1.5rem;
    border: none;
    background: #f8fafc;
    color: #374151;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 1.25rem;
}

.modern-quantity-btn:hover {
    background: var(--accent-color);
    color: var(--main-color);
}

.modern-quantity-input {
    border: none;
    padding: 1rem;
    text-align: center;
    width: 100px;
    font-weight: 700;
    font-size: 1.125rem;
    background: #ffffff;
}

.modern-btn-cart {
    flex: 1;
    min-width: 250px;
    padding: 1.25rem 2.5rem;
    background: linear-gradient(135deg, var(--main-color), var(--main-color2));
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1.25rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-btn-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modern-btn-cart:active {
    transform: translateY(0);
}

.modern-btn-buy-now {
    margin-top: 1rem;
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

.modern-btn-buy-now:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
}

/* === CONTROLES DE CARRITO === */
.product-cart-controls {
    width: 100%;
}

.modern-quantity-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 1rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 3px solid #f3f4f6;
}

.modern-qty-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 15px;
    background: var(--accent-color);
    color: var(--main-color);
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-qty-btn:hover {
    background: var(--main-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.modern-qty-input {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    color: #374151;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.modern-qty-input:focus {
    outline: none;
    border-color: var(--main-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(var(--main-color-rgb), 0.1);
}

.modern-delete-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 15px;
    background: #fee2e2;
    color: #dc2626;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-delete-btn:hover {
    background: #dc2626;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(220, 38, 38, 0.3);
}

/* === COMPATIBILIDAD JAVASCRIPT === */
/* Estilos para botón generado dinámicamente por custom.js */
.cartbutton.productplus.add-to-cart-btn {
    /* Heredar todos los estilos del botón original modern-btn-cart */
    flex: 1;
    min-width: 250px;
    padding: 1.25rem 2.5rem;
    background: linear-gradient(135deg, var(--main-color), var(--main-color2));
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1.25rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    margin: 0;
}

.cartbutton.productplus.add-to-cart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.cartbutton.productplus.add-to-cart-btn:active {
    transform: translateY(0);
}

/* También aplicar estilos a otros botones add-to-cart generados dinámicamente */
.cartbutton.add-to-cart-btn {
    /* Aplicar el mismo diseño a cualquier botón add-to-cart generado por JS */
    flex: 1;
    min-width: 250px;
    padding: 1.25rem 2.5rem;
    background: linear-gradient(135deg, var(--main-color), var(--main-color2));
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1.25rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    margin: 0;
}

.cartbutton.add-to-cart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.cartbutton.add-to-cart-btn:active {
    transform: translateY(0);
}

/* === CARACTERÍSTICAS === */
.product-modern-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 25px;
    border: 1px solid #e2e8f0;
}

.modern-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.modern-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.modern-feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-color), #f3f4f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--main-color);
    font-size: 1.25rem;
    border: 2px solid var(--main-color);
}

.modern-feature-text {
    font-weight: 700;
    color: #374151;
    font-size: 1rem;
}

/* === ATRIBUTOS Y CARACTERÍSTICAS ADICIONALES === */
.product-modern-attributes {
    margin-bottom: 2.5rem;
    background: #f9fafb;
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
}

.attributes-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
}

.attributes-title i {
    color: var(--main-color);
}

.attributes-grid {
    display: grid;
    gap: 1rem;
}

.attribute-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #ffffff;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.attribute-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--main-color);
}

.attribute-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #374151;
}

.attribute-name i {
    color: var(--main-color);
    font-size: 0.875rem;
}

.attribute-value {
    color: #64748b;
    font-weight: 600;
    text-align: right;
}

.product-additional-features {
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 15px;
    color: #0369a1;
    font-weight: 600;
}

.product-tags {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    color: #374151;
    font-weight: 600;
}

.tag-item {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--accent-color), #f3f4f6);
    color: var(--main-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--main-color);
}

/* === ESPECIFICACIONES MODERNAS === */
.product-modern-specs {
    margin-bottom: 4rem;
    padding: 2.5rem;
    background: #f8fafc;
    border-radius: 25px;
    border: 1px solid #e2e8f0;
}

.modern-specs-title {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 2rem;
    text-align: center;
}

.modern-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.modern-spec-group {
    background: #ffffff;
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modern-spec-group h4 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--main-color);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.modern-spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.modern-spec-item:last-child {
    border-bottom: none;
}

.modern-spec-label {
    font-weight: 600;
    color: #475569;
}

.modern-spec-value {
    color: #64748b;
    font-weight: 500;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .product-modern-container {
        padding: 1rem;
    }
    
    .product-modern-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .product-modern-info {
        padding: 0;
    }
    
    .product-modern-title {
        font-size: 2.5rem;
    }
    
    .price-current {
        font-size: 2.5rem;
    }
    
    .product-modern-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modern-btn-cart {
        min-width: auto;
    }
    
    /* Ajustes para botones generados dinámicamente en móvil */
    .cartbutton.add-to-cart-btn,
    .cartbutton.productplus.add-to-cart-btn {
        min-width: auto;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .product-modern-features {
        grid-template-columns: 1fr;
    }
    
    .related-products-grid {
        grid-template-columns: 1fr;
    }
    
    .security-info-grid {
        grid-template-columns: 1fr;
    }
    
    .modern-specs-grid {
        grid-template-columns: 1fr;
    }
    
    .trust-badges {
        gap: 1rem;
    }
    
    .trust-badge {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
}

/* === ANIMACIONES MEJORADAS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.product-modern-info > * {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.product-modern-info > *:nth-child(1) { animation-delay: 0.1s; }
.product-modern-info > *:nth-child(2) { animation-delay: 0.2s; }
.product-modern-info > *:nth-child(3) { animation-delay: 0.3s; }
.product-modern-info > *:nth-child(4) { animation-delay: 0.4s; }
.product-modern-info > *:nth-child(5) { animation-delay: 0.5s; }

.product-modern-gallery {
    animation: slideInLeft 0.8s ease-out;
}

/* === STATES Y FOCUS === */
.modern-btn-cart:focus,
.modern-variant-option:focus,
.modern-quantity-input:focus,
.related-product-btn:focus {
    outline: 3px solid var(--main-color);
    outline-offset: 2px;
}

.modern-btn-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* === PRINT STYLES === */
@media print {
    .product-modern-actions,
    .related-products-section,
    .security-bar,
    .floating-discount-badge,
    .image-zoom-overlay {
        display: none !important;
    }
    
    .product-modern-container {
        background: white !important;
        box-shadow: none !important;
    }
    
    .product-modern-layout {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .product-modern-title {
        color: black !important;
    }
    
    .price-current {
        color: black !important;
    }
}

/* === DARK MODE SUPPORT (opcional) === */
@media (prefers-color-scheme: dark) {
    body {
        background: #0f172a;
        color: #f1f5f9;
    }
    
    .product-modern-main-image {
        border-color: #334155;
    }
}

/* === ACCESIBILIDAD === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === HIGH CONTRAST === */
@media (prefers-contrast: high) {
    .status-indicator,
    .modern-badge,
    .modern-btn-cart {
        border: 2px solid currentColor;
    }
    
    .product-modern-main-image {
        border: 3px solid currentColor;
    }
}

/* === PRODUCTOS RELACIONADOS === */
.related-products-section {
    padding: 5rem 0;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.related-products-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.related-products-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 900;
    color: #111827;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.related-product-card {
    background: #ffffff;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.related-product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.related-product-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-product-card:hover .related-product-image img {
    transform: scale(1.1);
}

.no-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 2.5rem;
    height: 100%;
}

.related-discount-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 800;
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.related-product-info {
    padding: 2rem;
}

.related-product-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 1.5rem 0;
    line-height: 1.3;
}

.related-product-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.related-price-original {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 1rem;
    font-weight: 500;
}

.related-price-current {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--main-color);
}

.related-stock-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    color: #10b981;
    font-weight: 600;
}

.related-stock-info.out-of-stock {
    color: #ef4444;
}

.related-product-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-color), #f3f4f6);
    color: var(--main-color);
    text-decoration: none;
    border-radius: 15px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 2px solid var(--main-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-product-btn:hover {
    background: linear-gradient(135deg, var(--main-color), var(--main-color2));
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* === SEGURIDAD === */
.security-bar {
    padding: 4rem 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.security-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.security-item {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.security-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.security-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), #f3f4f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--main-color);
    font-size: 1.5rem;
    flex-shrink: 0;
    border: 3px solid var(--main-color);
}

.security-content {
    flex: 1;
}

.security-content h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
}

.security-content p {
    margin: 0;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
}

.security-content small {
    display: block;
    color: var(--main-color);
    font-weight: 700;
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding-top: 3rem;
    border-top: 1px solid #e2e8f0;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: #ffffff;
    border: 3px solid #e5e7eb;
    border-radius: 25px;
    font-weight: 700;
    color: #374151;
    transition: all 0.3s ease;
}

.trust-badge:hover {
    border-color: var(--main-color);
    background: var(--accent-color);
    color: var(--main-color);
    transform: translateY(-3px);
}

/* === ESTILOS ESPECÍFICOS PARA VIDEOS - TEMPLATE MODERNO === */

/* Sección de videos del producto */
.product-modern-videos {
    margin: 2.5rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.videos-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.5rem 0;
    font-size: 1.375rem;
    font-weight: 700;
    color: #1f2937;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.videos-section-title i {
    color: var(--main-color, #6366f1);
    font-size: 1.5rem;
}

/* Video único embebido */
.product-modern-videos .modern-single-video {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    background: #000;
    margin: 0;
}

.product-modern-videos .modern-single-video iframe {
    border-radius: 12px;
    min-height: 400px;
}

/* Galería de videos moderna */
.product-modern-videos .modern-video-gallery {
    gap: 1.25rem;
}

.product-modern-videos .modern-video-gallery .video-gallery-item {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.product-modern-videos .modern-video-gallery .video-gallery-item:hover {
    border-color: var(--main-color, #6366f1);
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.15);
}

.product-modern-videos .video-thumbnail {
    transition: transform 0.3s ease;
}

.product-modern-videos .video-gallery-item:hover .video-thumbnail {
    transform: scale(1.05);
}

.product-modern-videos .video-play-overlay {
    background: rgba(99, 102, 241, 0.9);
    backdrop-filter: blur(8px);
    border: 3px solid rgba(255, 255, 255, 0.9);
}

.product-modern-videos .video-main-badge {
    background: linear-gradient(135deg, var(--main-color, #6366f1) 0%, #8b5cf6 100%);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0 0 8px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.product-modern-videos .video-title {
    color: #1f2937;
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.product-modern-videos .video-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Responsive para videos modernos */
@media (max-width: 768px) {
    .product-modern-videos {
        margin: 1.5rem 0;
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .videos-section-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .product-modern-videos .modern-single-video iframe {
        min-height: 250px;
    }
    
    .product-modern-videos .modern-video-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
