/* ===== PÁGINA DE PRODUCTO ===== */

/* Variables de color */
:root {
    --primary-yellow: #FFD700;
    --secondary-yellow: #FFC000;
    --dark-yellow: #FFB000;
    --black: #000000;
    --white: #FFFFFF;
    --light-gray: #f8f9fa;
    --border-gray: #e9ecef;
    --text-dark: #2c3e50;
    --text-gray: #6c757d;
}

/* Asegurar que use la misma tipografía que el resto del sitio */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
}

/* Breadcrumbs */
.breadcrumbs {
    background: var(--light-gray);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-gray);
}

.breadcrumb {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 8px;
    color: #6c757d;
}

.breadcrumb-item a {
    color: var(--primary-yellow);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.breadcrumb-item a:hover {
    color: var(--dark-yellow);
}

.breadcrumb-item.active {
    color: var(--text-gray);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Contenido Principal */
.main-content {
    padding: 40px 0;
}

/* Detalle del Producto */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

/* Galería de Imágenes */
.product-gallery {
    position: sticky;
    top: 20px;
}

.gallery-main {
    position: relative;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 2px solid var(--border-gray);
}

.main-image {
    width: 100%;
    height: 500px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.main-image:hover {
    transform: scale(1.05);
}

.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--primary-yellow), var(--secondary-yellow));
    color: var(--black);
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
    border: 2px solid var(--black);
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail.active {
    border-color: var(--primary-yellow);
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Información del Producto */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.product-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 0.9rem;
}

.product-brand {
    color: var(--primary-yellow);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-category {
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Precio */
.product-price {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 12px;
    border: 2px solid var(--primary-yellow);
}

.price-original {
    font-size: 1.2rem;
    color: var(--text-gray);
    text-decoration: line-through;
    font-weight: 500;
}

.price-current {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--black);
}

.price-savings {
    font-size: 1rem;
    color: var(--primary-yellow);
    font-weight: 600;
}

/* Stock */
.product-stock {
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
}

.stock-available {
    color: var(--black);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.stock-unavailable {
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* Acciones */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-selector label {
    font-weight: 600;
    color: #495057;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid var(--primary-yellow);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-btn {
    background: var(--primary-yellow);
    border: none;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--black);
    font-weight: 600;
}

.quantity-btn:hover {
    background: var(--secondary-yellow);
    color: var(--black);
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#quantity {
    border: none;
    padding: 12px;
    text-align: center;
    width: 80px;
    font-weight: 600;
    background: var(--white);
    color: var(--black);
}

#quantity:focus {
    outline: none;
    background: var(--light-gray);
}

/* Botones */
.btn {
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: none;
    letter-spacing: 0.3px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-yellow), var(--secondary-yellow));
    color: var(--black);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    border: 2px solid var(--black);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-yellow), var(--dark-yellow));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-secondary {
    background: var(--black);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--black);
}

.btn-secondary:hover {
    background: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.btn-disabled {
    background: var(--light-gray);
    color: var(--text-gray);
    cursor: not-allowed;
    box-shadow: none;
    border: 2px solid var(--border-gray);
}

.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Características */
.product-features {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid var(--primary-yellow);
}

.product-features h3 {
    margin: 0 0 20px 0;
    color: var(--text-dark);
    font-size: 1.3rem;
}

.product-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
}

.product-features i {
    color: var(--primary-yellow);
    font-size: 0.9rem;
}

/* Información Adicional */
.product-additional {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.additional-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--light-gray);
    border-radius: 8px;
    color: var(--text-dark);
    font-size: 0.95rem;
    border: 1px solid var(--border-gray);
}

.additional-item i {
    color: var(--primary-yellow);
    font-size: 1.1rem;
    width: 20px;
}

/* Descripción Detallada */
.product-description-section {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 60px;
    border: 2px solid var(--border-gray);
}

.description-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-gray);
    background: var(--light-gray);
}

.tab-btn {
    flex: 1;
    padding: 20px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: var(--primary-yellow);
    background: var(--white);
    border-bottom-color: var(--primary-yellow);
}

.tab-btn:hover {
    color: var(--primary-yellow);
    background: rgba(255, 215, 0, 0.05);
}

.tab-content {
    padding: 0;
}

.tab-pane {
    display: none;
    padding: 40px;
}

.tab-pane.active {
    display: block;
}

.description-content {
    line-height: 1.8;
    color: var(--text-dark);
    font-size: 1rem;
}

.specifications-content,
.reviews-content {
    color: var(--text-gray);
    font-style: italic;
}

/* Productos Relacionados */
.related-products {
    margin-top: 60px;
}

.related-products h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-dark);
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Estilos para las tarjetas de productos relacionados */
.related-products .product-card {
    background: var(--white);
    border: 2px solid var(--border-gray);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.related-products .product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-yellow);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
}

.related-products .product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--light-gray);
}

.related-products .product-badge.discount {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--primary-yellow), var(--secondary-yellow));
    color: var(--black);
    padding: 6px 10px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.8rem;
    border: 2px solid var(--black);
}

.related-products .product-info {
    padding: 20px;
}

.related-products .product-name a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.related-products .product-name a:hover {
    color: var(--primary-yellow);
}

.related-products .product-price {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-gray);
}

.related-products .price-original {
    font-size: 1rem;
    color: var(--text-gray);
    text-decoration: line-through;
}

.related-products .price-current {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--black);
}

.related-products .product-actions .btn {
    width: 100%;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .product-gallery {
        position: static;
    }
    
    .main-image {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px 0;
    }
    
    .product-title {
        font-size: 2rem;
    }
    
    .price-current {
        font-size: 2rem;
    }
    
    .product-actions {
        gap: 15px;
    }
    
    .btn {
        padding: 14px 24px;
        font-size: 0.95rem;
    }
    
    .description-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        text-align: left;
    }
    
    .tab-pane {
        padding: 25px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .gallery-thumbnails {
        gap: 8px;
    }
    
    .thumbnail {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .product-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .quantity-controls {
        width: 100%;
        justify-content: center;
    }
    
    .main-image {
        height: 300px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-detail {
    animation: fadeIn 0.6s ease-out;
}

.tab-pane.active {
    animation: fadeIn 0.4s ease-out;
}

/* Estados de carga */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
