/* STYLOFITNESS - Product Detail Page CSS (Dark Mode) */
/* ================================================== */

/* Variables de modo oscuro */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --accent-primary: #ff6b35;
    --accent-secondary: #ff8c42;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --success-color: #00ff88;
    --warning-color: #ffaa00;
    --error-color: #ff4444;
    --gradient-primary: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

/* Estilos base para modo oscuro */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Container principal */
.product-detail-container {
    min-height: 100vh;
    background: var(--bg-primary);
    padding-bottom: 4rem;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--accent-primary);
}

.breadcrumb .active {
    color: var(--text-primary);
    font-weight: 500;
}

/* Grid principal del producto */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

/* Galería de imágenes */
.product-gallery {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.main-image-container {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 20px 40px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.main-product-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-image-container:hover .main-product-image {
    transform: scale(1.05);
}

/* Badges */
.discount-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    z-index: 2;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient-dark);
    color: var(--success-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--success-color);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.2);
    z-index: 2;
}

/* Miniaturas */
.image-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: var(--bg-secondary);
}

.thumbnail-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.thumbnail-image.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.3);
}

/* Información del producto */
.product-info {
    padding: 1rem 0;
}

.product-header {
    margin-bottom: 2rem;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

/* Estilos para precios de gimnasio */
.price-labels {
    margin-bottom: 0.5rem;
}

.price-label-normal {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.25rem;
}

.price-offer {
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(255, 140, 66, 0.1) 100%);
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    position: relative;
}

.price-label-offer {
    font-size: 1.1rem;
    color: var(--accent-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.savings-highlight {
    margin: 1rem 0;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 200, 100, 0.1) 100%);
    border: 1px solid var(--success-color);
    border-radius: 8px;
    text-align: center;
}

.savings {
    font-size: 1.2rem;
    color: var(--success-color);
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

.discount-percentage {
    font-size: 0.9rem;
    color: var(--success-color);
    font-weight: 500;
}

.membership-note {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
    text-align: center;
}

.membership-note small {
    color: var(--text-secondary);
    font-style: italic;
}

/* Estilos para tarjetas de productos */
.price-gym-member {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.gym-label {
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.product-brand {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.product-brand strong {
    color: var(--accent-primary);
    font-weight: 600;
}

.product-sku {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    background: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    display: inline-block;
    border: 1px solid var(--border-color);
}

/* Precios */
.product-pricing {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.price-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.current-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-primary);
    text-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
}

.original-price {
    font-size: 1.5rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 500;
}

.savings {
    background: var(--success-color);
    color: var(--bg-primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

/* Descripción */
.product-description {
    margin-bottom: 2rem;
}

.product-description h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.product-description p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

/* Detalles del producto */
.product-details {
    margin-bottom: 2rem;
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.detail-value {
    font-weight: 500;
    color: var(--text-primary);
}

.detail-value a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.detail-value a:hover {
    color: var(--accent-secondary);
}

/* Estados de stock */
.stock-high {
    color: var(--success-color);
    font-weight: 600;
}

.stock-low {
    color: var(--warning-color);
    font-weight: 600;
}

.stock-out {
    color: var(--error-color);
    font-weight: 600;
}

/* Acciones del producto */
.product-actions {
    margin-bottom: 2rem;
}

.quantity-selector {
    margin-bottom: 1.5rem;
}

.quantity-selector label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

#quantity {
    width: 80px;
    height: 40px;
    text-align: center;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
}

#quantity:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}

/* Botones principales */
.add-to-cart-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.4);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

.out-of-stock-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: not-allowed;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Garantías */
.product-guarantees {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.guarantee-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.guarantee-item:last-child {
    border-bottom: none;
}

.guarantee-item svg {
    color: var(--accent-primary);
    flex-shrink: 0;
}

.guarantee-item span {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Productos relacionados */
.related-products {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.related-products h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--shadow-color);
    border-color: var(--accent-primary);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-card .product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-price .current-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.product-price .original-price {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-gallery {
        position: static;
    }
    
    .main-product-image {
        height: 400px;
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .current-price {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .product-detail-grid {
        gap: 1.5rem;
    }
    
    .main-product-image {
        height: 300px;
    }
    
    .product-title {
        font-size: 1.8rem;
    }
    
    .current-price {
        font-size: 1.8rem;
    }
    
    .price-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .product-title {
        font-size: 1.5rem;
    }
    
    .current-price {
        font-size: 1.5rem;
    }
    
    .main-product-image {
        height: 250px;
    }
    
    .thumbnail-image {
        width: 60px;
        height: 60px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-detail-container {
    animation: fadeInUp 0.6s ease-out;
}

/* Scrollbar personalizado */
.image-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.image-thumbnails::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.image-thumbnails::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

.image-thumbnails::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Estados de carga */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Efectos de hover mejorados */
.product-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.add-to-cart-btn {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Mejoras de accesibilidad */
.add-to-cart-btn:focus,
.qty-btn:focus,
#quantity:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Modo de alto contraste */
@media (prefers-contrast: high) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #111111;
        --text-primary: #ffffff;
        --border-color: #555555;
    }
}