/* Estilos específicos para la página de detalle de producto */
body.dark-theme {
    background-color: #000; /* Fondo negro */
    color: #f5f5f7; /* Texto blanco para contraste */
}

.product-detail-main {
    padding: 60px 0;
    min-height: calc(100vh - 100px); /* Ajuste aproximado */
}

.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap; 
    gap: 40px;
    padding: 0 20px;
    box-sizing: border-box;
}

/* --- GALERÍA DE IMÁGENES (ESTILO CLÁSICO: MINIATURAS A LA IZQUIERDA) --- */
.product-gallery {
    flex: 1; 
    min-width: 300px;
    display: flex;
    flex-direction: row; /* Pone las miniaturas AL LADO de la imagen */
    align-items: flex-start; /* Alinea todo ARRIBA, para que el celular no se vaya abajo */
    gap: 20px;
}

/* Contenedor de las miniaturas */
.thumbnail-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center; /* Centrar las miniaturas */
}

/* LA CAJITA CLICKEABLE (La solución al problema del clic) */
.thumb-card {
    width: 70px;
    height: 70px;
    background-color: #1a1a1a; /* Fondo oscuro */
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.thumb-card.active,
.thumb-card:hover {
    border-color: #ff9000; /* Borde naranja al seleccionar */
    transform: translateY(-2px); /* Pequeña animación */
}

/* La imagen DENTRO de la tarjeta */
.thumb-card img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    pointer-events: none; /* IMPORTANTE: El clic lo recibe la caja, no la imagen */
}

/* --- IMAGEN PRINCIPAL --- */
.main-image-display {
    background-color: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 400px; /* Altura mínima para que no salte */
}

.main-product-image {
    width: 100%;
    max-width: 500px; /* Tamaño máximo controlado */
    height: auto;
    max-height: 550px;
    object-fit: contain;
    /* Quitamos el transform negativo para que no se salga de la pantalla */
    transition: opacity 0.3s ease;
}

/* --- INFORMACIÓN DEL PRODUCTO --- */
.product-info {
    flex: 1.5;
    min-width: 350px;
    color: #f5f5f7;
}

.breadcrumbs {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.price-block {
    margin-bottom: 25px;
    border-bottom: 1px solid #333;
    padding-bottom: 25px;
}

.old-price {
    text-decoration: line-through;
    color: #888;
    font-size: 1.2rem;
    margin-right: 15px;
}

.current-price {
    font-size: 2rem;
    font-weight: 600;
    color: #ff9000;
}

/* Selección de Colores */
.color-selection h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #fff;
}

.color-options {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.color-btn {
    width: 30px; /* Botones redondos de color */
    height: 30px;
    border-radius: 50%;
    border: 2px solid #555;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    padding: 0;
}

.color-btn.active {
    border-color: #ff9000;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 144, 0, 0.5);
}

.shipping-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: #b0b0b0;
    margin-bottom: 40px;
    border-bottom: 1px solid #333;
    padding-bottom: 30px;
}

.shipping-info i {
    color: #ff9000;
    font-size: 1.2rem;
}

/* --- BOTONES DE ACCIÓN --- */
.actions {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.action-btn {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.action-btn.primary {
    background-color: #ff9000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.action-btn.primary:hover {
    background-color: #e68200;
    transform: translateY(-2px);
}

/* --- SECCIÓN DE PAGOS (OCULTA) --- */
.payment-methods {
    display: none; /* Esto asegura que no se vea aunque esté en el HTML */
}

/* --- ACORDEÓN --- */
.accordion-item {
    border-bottom: 1px solid #333;
    margin-bottom: 10px;
}

.accordion-header {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: #f5f5f7;
    outline: none;
}

.accordion-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    color: #b0b0b0;
}

.accordion-content.open {
    max-height: 500px; /* Altura máxima suficiente para mostrar el contenido */
}

.accordion-content p, 
.accordion-content ul {
    padding-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .product-detail-container {
        flex-direction: column;
        align-items: center;
    }
    .product-gallery, .product-info {
        width: 100%;
        max-width: 100%;
    }
    .main-product-image {
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: 1.8rem;
    }
    .current-price {
        font-size: 1.6rem;
    }
    .thumb-card {
        width: 60px;
        height: 60px;
    }
}