.detalle-producto {
    padding: 100px 20px;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: auto;
}

.detalle-container {
    display: flex;
    gap: 50px;
    align-items: center;
}

/* IMAGEN CONTROLADA */
.detalle-img img:hover {
    transform: scale(1.05);
    transition: 0.3s;
}

/* TEXTO */
.detalle-info {
    max-width: 500px;
}

.detalle-info h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.detalle-info p {
    color: #555;
    margin-bottom: 20px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .detalle-container {
        flex-direction: column;
        text-align: center;
    }
}

/* ================= DETALLE DE PRODUCTO (ACTUALIZADO) ================= */
.detalle-main.section {
    padding-top: 30px;
    padding-bottom: 40px;
}

.detalle-layout {
    max-width: 1300px;
    margin: 0 auto 40px;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    align-items: start;
}

.detalle-sidebar {
    background: #fff;
    padding: 30px 25px;
    border-radius: 16px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.03);
    position: sticky;
    top: 140px;
}

.btn-volver {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #0b3a63;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 25px;
    padding: 8px 18px;
    background: #f4f7fa;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.btn-volver:hover {
    background: #0b3a63;
    color: #fff;
}

.btn-volver span {
    transition: transform 0.3s ease;
}

.btn-volver:hover span {
    transform: translateX(-4px);
}

.detalle-sidebar h3 {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #0b3a63;
    margin-top: 35px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detalle-sidebar h3::after {
    content: "";
    height: 2px;
    flex: 1;
    background: #00bfc6;
}

.detalle-sidebar h3:first-child {
    margin-top: 0;
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-category {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #0b3a63;
    font-weight: 700;
    margin-top: 10px;
    padding: 10px 15px;
    display: block;
    text-decoration: none;
    border-radius: 8px;
    background: #f4f7fa;
    transition: all 0.3s ease;
}

.sidebar-category:hover, .sidebar-category.active {
    background: #0b3a63;
    color: #fff;
}

.sidebar-item {
    padding: 10px 15px;
    background: transparent;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-item::after {
    content: "›";
    font-size: 1.4rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: #00bfc6;
}

.sidebar-item:hover {
    background: #0b3a63;
    color: #fff;
    font-weight: 600;
    padding-left: 22px;
}

.sidebar-item:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-item.active {
    background: #0b3a63;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(11, 58, 99, 0.15);
}

.sidebar-item.active::after {
    content: "›";
    opacity: 1;
    transform: translateX(0);
    color: #00bfc6;
}

.detalle-producto-container {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
}
}

.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.detalle-producto-img img {
    width: 100%;
    height: 350px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.detalle-producto-info h1 {
    font-size: 2rem;
    color: #0b3a63;
    margin-bottom: 10px;
}

.desc-principal {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
}

.producto-specs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
}

.spec-icon {
    font-size: 1.3rem;
    flex-shrink: 0; /* Evita que el ícono se aplaste si el texto de al lado ocupa varias líneas en móvil */
}

.spec-item p {
    margin: 0;
    color: #444;
}

.producto-refs h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #0b3a63;
}

.ref-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 35px;
}

.ref-card {
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #eee;
    transition: transform 0.3s ease;
}

.ref-card:hover {
    transform: translateY(-5px);
}

.ref-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.ref-card h4 {
    font-size: 0.95rem;
    color: #0b3a63;
    margin: 0;
}

@media (max-width: 900px) {
    .detalle-layout {
        grid-template-columns: 1fr;
        padding: 0 20px;
        gap: 20px;
                width: 100%;
    }
    .detalle-sidebar {
        position: static;
        padding: 20px 15px;
                min-width: 0; /* Permite que la lista horizontal se comprima sin desbordar la pantalla */
    }
    .sidebar-list {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 10px;
        gap: 10px;
        scrollbar-width: none;
    }
    .sidebar-list::-webkit-scrollbar {
        display: none;
    }
    .sidebar-item {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 8px 18px !important;
        border-radius: 30px;
        border: 1px solid #eaeaea;
    }
    .sidebar-item::after {
        display: none;
    }
    .detalle-producto-container {
        grid-template-columns: 1fr;
        padding: 15px; /* Reducimos el margen interno */
        gap: 20px; /* Reducimos la separación entre la imagen y el texto */
    }
    .detalle-producto-img img {
        height: 250px; /* Reducimos la altura de la imagen para que no abarque toda la pantalla */
    }
    .detalle-producto-info h1 {
        font-size: 1.6rem; /* Ajustamos el tamaño del título */
    }
    .desc-principal {
        font-size: 0.95rem; /* Ajustamos ligeramente la descripción */
    }
    .spec-item {
        padding: 10px; /* Hacemos las cajas de especificaciones un poco más compactas */
    }
    .ref-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.detalle-interactivo {
    padding: 80px 20px;
}

.detalle-wrapper {
    display: flex;
    gap: 40px;
}

/* LISTA IZQUIERDA */
.detalle-lista {
    width: 30%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* CARD PEQUEÑA */
.item-card {
    background: #0b3a63;
    color: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
}

.item-card:hover {
    background: #072a4a;
    transform: scale(1.05);
}

/* DETALLE DERECHO */
.detalle-contenido {
    width: 70%;
    display: flex;
    align-items: center;
    gap: 30px;
}

/* TEXTO IZQUIERDA */
.detalle-texto {
    width: 50%;
}

/* IMAGEN DERECHA */
.detalle-imagen {
    width: 50%;
}

.detalle-imagen img {
    width: 100%;
    border-radius: 10px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .detalle-wrapper {
        flex-direction: column;
    }

    .detalle-lista,
    .detalle-contenido {
        width: 100%;
    }

    .detalle-contenido {
        flex-direction: column;
    }
}