﻿/* Reset básico y estilos generales de la página */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Línea roja divisoria */
.linea-roja {
    background-color: #e74c3c; /* Rojo vibrante */
    height: 5px;
    width: 100%;
}



/* Main Product Detail Section */
.product-detail-main {
    padding: 40px 0;
}

.product-header {
    text-align: center;
    margin-bottom: 40px;
}

.product-title {
    font-size: 3em;
    color: #2c3e50;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.product-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #e74c3c; /* Rojo vibrante */
    margin: 10px auto 0;
    border-radius: 2px;
}

.product-description {
    font-size: 1.1em;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

.product-content-wrapper {
    display: flex;
    flex-wrap: wrap; /* Permite que los bloques se apilen en pantallas más pequeñas */
    gap: 30px;
    margin-bottom: 50px;
    align-items: flex-start; /* Alinea los elementos al inicio (arriba) */
}

.image-gallery {
    flex: 1; /* Ocupa el espacio disponible */
    min-width: 300px; /* Ancho mínimo para la galería */
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative; /* Para el carrusel */
    display: flex; /* Para centrar la imagen verticalmente */
    align-items: center; /* Centra la imagen verticalmente */
    justify-content: center; /* Centra la imagen horizontalmente */
    height: 450px; /* Altura explícita para el contenedor de la galería */
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%; /* El carrusel ocupa toda la altura de la galería */
    margin: auto;
    overflow: hidden;
    border-radius: 12px; /* Mantenemos el border-radius en el carrusel */
}

.carousel-images {
    display: flex;
    height: 100%; /* Las imágenes ocupan toda la altura del carrusel */
    transition: transform 0.5s ease-in-out;
}

.carousel-image {
    width: 100%;
    height: 100%; /* La imagen ocupa toda la altura de su contenedor */
    object-fit: cover; /* Cambiado a 'cover' para eliminar el margen blanco rellenando el espacio, incluso si recorta la imagen */
    display: none; /* Ocultar todas las imágenes por defecto */
}

.carousel-image.active {
    display: block; /* Mostrar solo la imagen activa */
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.5em;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active, .dot:hover {
    background-color: #e74c3c; /* Rojo vibrante */
}

.product-details {
    flex: 1.5; /* Ocupa más espacio que la galería */
    min-width: 350px; /* Ancho mínimo para los detalles */
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.content-block {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 30px;
}

.content-block h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    border-bottom: 2px solid #e74c3c;
    display: inline-block;
}

.content-block h3 {
    font-size: 1.4em;
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 15px;
}

.product-data p {
    font-size: 1.05em;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.7;
}

/* Estilo para las listas con "tick" */
.content-block ul {
    list-style: none;
    padding-left: 0;
}

.content-block ul li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 25px;
    font-size: 1.05em;
    color: #555;
    line-height: 1.7;
}

.content-block ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #28a745;
    position: absolute;
    left: 0;
    top: 0;
}

/* Dimension Selector for Llanton (specific to this page) */
.dimension-selector {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.selector-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.selector-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.selector-group select:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
    outline: none;
}

.selector-group select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.7;
}

.result-display {
    padding: 15px;
    background-color: #eef7f4;
    border: 1px solid #d4edda;
    border-left: 5px solid #27ae60; /* Color verde para resaltar */
    border-radius: 8px;
    margin-top: 15px;
    font-size: 1.1em;
    color: #225c3d;
    font-weight: 500;
}

.result-display strong {
    color: #1a422a;
}


/* Product Actions (full width) */
.product-actions-full-width {
    text-align: center;
    margin-top: 40px;
    padding: 40px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.product-actions-full-width h2 {
    margin-bottom: 30px;
    font-size: 2.2em;
    color: #2c3e50;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    border-bottom: 2px solid #e74c3c;
}

.product-actions-buttons {
    display: flex;
    flex-direction: row;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-align: center;
    min-width: 220px;
    max-width: 300px;
}

.btn-primary {
    background-color: #27ae60; /* Verde */
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.btn-primary:hover {
    background-color: #229a56;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(39, 174, 96, 0.4);
}

.btn-secondary {
    background-color: #3498db; /* Azul */
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-secondary:hover {
    background-color: #2184c6;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.4);
}

.btn-secondary i {
    margin-right: 8px;
}

/* Sección de Ventajas (additional-info) */
.additional-info {
    text-align: left;
    margin-top: 50px;
}

.additional-info h2 {
    text-align: left;
    font-size: 2.2em;
    color: #2c3e50;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    border-bottom: 2px solid #e74c3c;
}

/* Related Products Section */
.related-products {
    text-align: center;
    margin-top: 50px;
}

.related-products h2 {
    font-size: 2.2em;
    color: #2c3e50;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.related-products h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #e74c3c;
    margin: 10px auto 0;
    border-radius: 2px;
}

.product-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    justify-content: center;
    padding: 0 20px;
}

.product-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.product-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.product-card h3 {
    font-size: 1.5em;
    color: #2c3e50;
    margin: 15px 15px 10px;
    flex-grow: 1;
}

.product-card p {
    font-size: 1em;
    color: #666;
    padding: 0 15px 15px;
}

.btn-product-card {
    background-color: #e74c3c; /* Rojo vibrante */
    color: #ffffff;
    border: none;
    box-shadow: 0 3px 6px rgba(231, 76, 60, 0.3);
    margin: 0 15px 20px;
    padding: 10px 20px;
    font-size: 1em;
}

.btn-product-card:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(231, 76, 60, 0.4);
}

/* Footer (reutilizado) */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 30px 0;
    text-align: center;
    font-size: 0.9em;
    margin-top: 50px;
}

footer .container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

footer p {
    margin: 0;
}

footer .social-links a {
    color: #ecf0f1;
    font-size: 1.5em;
    margin: 0 10px;
    transition: color 0.3s ease;
}

footer .social-links a:hover {
    color: #e74c3c;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-detail-main .container {
        flex-direction: column;
    }

    .product-content-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .image-gallery, .product-details {
        min-width: unset;
        width: 100%;
        max-width: 600px;
    }

    .image-gallery {
        height: 380px;
    }

    .product-details {
        margin-top: 20px;
    }

    .product-title {
        font-size: 2.5em;
    }

    .related-products .product-cards-container {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 25px;
    }

    .product-actions-full-width {
        padding: 30px;
    }

    .product-actions-full-width h2 {
        font-size: 2em;
    }

    .additional-info {
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: 2em;
    }

    .product-description {
        font-size: 1em;
    }

    .content-block {
        padding: 20px;
    }

    .content-block h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

    .product-data p {
        font-size: 0.95em;
    }

    .product-actions-full-width {
        padding: 25px;
        margin-top: 30px;
    }

    .product-actions-full-width h2 {
        font-size: 1.8em;
        margin-bottom: 25px;
    }

    .product-actions-buttons {
        flex-direction: column;
    }

    .btn {
        padding: 10px 20px;
        font-size: 1em;
        max-width: 280px;
    }

    .carousel-btn {
        padding: 8px 12px;
        font-size: 1.2em;
    }

    .dot {
        width: 10px;
        height: 10px;
    }

    .related-products .product-cards-container {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .product-card {
        max-width: 300px;
        margin: 0 auto;
    }

    .image-gallery {
        height: 300px;
    }

    .additional-info {
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .product-title {
        font-size: 1.7em;
    }

    .content-block h2 {
        font-size: 1.5em;
    }

    .product-actions-full-width h2 {
        font-size: 1.6em;
    }
}
