/* ==================================================== */
/* ESTILOS ESPECÍFICOS DE LA PÁGINA DE PRODUCTO         */
/* ==================================================== */

.contenedor-detalle-principal {
    max-width: 1300px;
    margin: 0 auto;
    padding: 60px 5% 80px 5%;
    background-color: #fafbfc; /* Mismo fondo de contacto */
}

/* ================= GRID DETALLE PRODUCTO ================= */
.producto-detalle-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 50px;
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    border: 1px solid #eaeaea;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    align-items: flex-start;
    margin-bottom: 60px;
}

@media(max-width: 900px) {
    .producto-detalle-grid { grid-template-columns: 1fr; gap: 30px; padding: 25px; }
}

/* Imagen con Zoom */
.producto-imagen-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    background: #fcfcfc;
    border: 1px solid #f0f0f0;
    position: relative;
    cursor: zoom-in;
}

.producto-imagen-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.1s ease-out;
}

/* Información del producto (Derecha) */
.producto-info-container {
    display: flex;
    flex-direction: column;
}

.producto-titulo {
    font-size: 32px; 
    font-weight: 800;
    color: #2b231d; 
    margin-bottom: 15px;
    margin-top: 15px;
    line-height: 1.15;
}

.producto-precio {
    font-size: 26px; 
    font-weight: 800;
    color: #a31621; 
    margin-bottom: 25px;
}

.producto-descripcion {
    font-size: 15px; 
    color: #666; 
    line-height: 1.7;
    margin-bottom: 35px;
}

.producto-acciones-row {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Selector de cantidad */
.cantidad-selector {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fafbfc;
}

.cantidad-selector button {
    background: transparent;
    border: none;
    padding: 14px 18px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    color: #333;
    transition: background 0.2s;
}
.cantidad-selector button:hover { background: #e2e8f0; }

.cantidad-selector input {
    width: 50px;
    text-align: center;
    background: transparent;
    border: none;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    outline: none;
}

/* Botón Añadir al Carrito en Rojo Institucional */
.btn-añadir-carrito {
    background-color: #a31621;
    color: #ffffff;
    border: none;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(163, 22, 33, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1; 
}
.btn-añadir-carrito:hover { 
    background-color: #c52a36; 
    transform: translateY(-2px);
}

/* ================= PRODUCTOS RELACIONADOS ================= */
.relacionados-seccion {
    margin-top: 50px;
}

.relacionados-titulo {
    font-size: 24px; 
    font-weight: 800;
    color: #2b231d;
    margin-bottom: 30px;
}

.carrusel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.carrusel-track-container {
    overflow: hidden;
    width: 100%;
    padding: 10px 0;
}

.carrusel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease-in-out;
}

/* Tarjetas de productos relacionados */
.card-producto-relacionado {
    min-width: calc(25% - 15px); 
    max-width: calc(25% - 15px);
    height: 380px; 
    background-color: #ffffff;
    border-radius: 16px;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 15px;
    box-sizing: border-box;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-producto-relacionado:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

@media(max-width: 1024px) { 
    .card-producto-relacionado { 
        min-width: calc(50% - 10px); 
        max-width: calc(50% - 10px); 
    } 
}
@media(max-width: 768px)  { 
    .card-producto-relacionado { 
        min-width: 100%; 
        max-width: 100%; 
    } 
}

.card-img-wrapper {
    width: 100%;
    height: 170px; 
    background-color: #fcfcfc;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-content { 
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
    justify-content: space-between;
    margin-top: 10px;
}

.categoria-producto { 
    font-size: 11px; 
    font-weight: 700; 
    color: #a31621; 
    text-transform: uppercase; 
    margin-bottom: 4px; 
}

.nombre { 
    font-size: 14px; 
    font-weight: 700; 
    color: #2b231d; 
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 36px; 
}

.card-divider { 
    border: none; 
    border-top: 1px solid #eaeaea; 
    margin: 8px 0; 
}

.card-footer-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.precio { 
    font-size: 16px; 
    font-weight: 800; 
    color: #2b231d; 
}

.btn-comprar {
    background-color: #fff1f2;
    color: #a31621;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}
.btn-comprar:hover { 
    background-color: #a31621; 
    color: #ffffff; 
}

/* Botones de navegación (Flechas) del carrusel */
.carrusel-btn {
    background-color: #ffffff;
    border: 1px solid #eaeaea;
    color: #2b231d;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    position: absolute;
    z-index: 10;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.carrusel-btn:hover { 
    background-color: #e6b33d; 
    color: #ffffff; 
    border-color: #e6b33d; 
}
.prev-btn { left: -20px; }
.next-btn { right: -20px; }