.template-detalle-producto {
    margin: 0 auto;
    padding: 1rem 1rem;
}

.template-detalle-producto .migas-pan {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.template-detalle-producto .miga {
    color: #7E7E7C;
    text-decoration: none;
    transition: color 0.3s ease;
}

.template-detalle-producto .miga:hover {
    color: green;
}

.template-detalle-producto .miga.activa {
    color: #3A3A34;
    font-weight: 500;
}

.template-detalle-producto .separador-miga {
    color: #7E7E7C;
}

.template-detalle-producto .contenedor-detalle-producto {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.3rem;
}

.template-detalle-producto .galeria-producto {
    width: 100%;
}

.template-detalle-producto .galeria-grid {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr;
    gap: 1rem;
}

.template-detalle-producto .imagen-galeria {
    cursor: pointer;
    overflow: hidden;
    background-color: #f5f5f5;
}

.template-detalle-producto img.imagen-galeria {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}


.template-detalle-producto .imagen-grande {
    aspect-ratio: 4/5;
}

.template-detalle-producto .imagen-pequena {
    aspect-ratio: 4/5;
}

.template-detalle-producto .fila2-tres-col {
    grid-column: 1 / span 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}


.template-detalle-producto .info-detalle-producto {
    display: flex;
    flex-direction: column;
    gap: 0rem;
}

.template-detalle-producto .cabecera-info-producto {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-detalle-producto .referencia-producto {
    font-size: 0.875rem;
    color: #7E7E7C;
}

.template-detalle-producto .info-detalle-producto .colores {
    display: flex;
    gap: 0.55rem;
    margin-top: 0.2rem;
    margin-bottom: 0.7rem;
    min-height: 12px;
    align-items: center;
    justify-content: flex-start;
}

.template-detalle-producto .info-detalle-producto .colores .color {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(0, 0, 0, 0);
    outline: 1px solid rgba(0, 0, 0, 0);
    border-radius: 50%;
    transition: all 0.3s;
    cursor: pointer;
}

.template-detalle-producto .info-detalle-producto .colores .color.activo {
    border-color: white;
    outline-color: black;
}


.template-detalle-producto .acciones-producto {
    display: flex;
    gap: 1rem;
}

.template-detalle-producto .boton-accion-producto {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}


.template-detalle-producto .icono-accion-producto {
    width: 100%;
    height: 100%;
}

.template-detalle-producto .titulo-producto {
    font-size: 1.6rem;
    font-weight: 400;
    color: #3A3A34;
    margin: 0;
    line-height: 1.2;
}

.template-detalle-producto .descripcion-corta-producto {
    font-size: 0.8rem;
    color: #7E7E7C;
    margin: 0;
    line-height: 1.6;
}

.template-detalle-producto .precio-producto {
    font-size: 1.3rem;
    font-weight: 600;
    color: #3A3A34;
    margin-bottom: 0.8rem;
}

.template-detalle-producto .precio-producto .precio-anterior {
    color: #7E7E7C;
    text-decoration: line-through;
    line-height: 0.9rem;
    font-weight: 500;
        font-size: 1.2rem;

}

.template-detalle-producto .precio-producto .precio-actual {
    color: #3A3A34;
    padding-right: 0.3rem;
    line-height: 0.9rem;
}

.template-detalle-producto .contenedor-cantidad-producto-carrito {
    display: flex;
    align-items: center;
    overflow: hidden;
    gap: 1rem;
}

.template-detalle-producto .selector-cantidad-producto {
    display: flex;
    flex-basis: 25%;
    border: 1px solid #CCC;
    padding-left: 0.3rem;
    padding-right: 0.3rem;
    align-items: center;
}

.template-detalle-producto .boton-cantidad {
    width: 25%;
    height: 30px;
    background: white;
    border: none;
    font-size: 1.2rem;
    color: #3A3A34;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.template-detalle-producto  .boton-cantidad .icono-cantidad {
    width: 13px;
}

.template-detalle-producto .boton-cantidad:hover {
    background-color: #f5f5f5;
}

.template-detalle-producto .input-cantidad {
    width: 50%;
    border: none;
    text-align: center;
    font-size: 1rem;
    color: #3A3A34;
}

.template-detalle-producto .input-cantidad:focus {
    outline: none;
}

.template-detalle-producto .boton-anadir-carrito-detalle {
    height: 30px;
    background-color: #4a4a4a;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex-basis: 70%;
}

.template-detalle-producto .boton-anadir-carrito-detalle:hover {
    background-color: #3A3A34;
}

.template-detalle-producto .financiacion-producto {
    font-size: 0.875rem;
    color: #7E7E7C;
    margin-top: 0.7rem
}

.template-detalle-producto .acordeones-producto {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #ddd;
    margin-top: 1.5rem;
}

.template-detalle-producto .acordeon-item {
    border-bottom: 1px solid #ddd;
}

.template-detalle-producto .acordeon-cabecera {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.template-detalle-producto .acordeon-titulo {
    font-size: 1rem;
    font-weight: 500;
    color: #3A3A34;
}

.template-detalle-producto .acordeon-icono {
    font-size: 1.5rem;
    color: #3A3A34;
    font-weight: 300;
    transition: opacity 0.3s ease;
}

.template-detalle-producto .acordeon-contenido {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.4s ease;
    padding-bottom: 0;
}

.template-detalle-producto .acordeon-contenido.visible {
    max-height: 500px;
    padding-bottom: 1.5rem;
}

.template-detalle-producto .acordeon-contenido p {
    font-size: 0.875rem;
    color: #7E7E7C;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.template-detalle-producto .acordeon-contenido p:last-child {
    margin-bottom: 0;
}

.template-detalle-producto .condiciones-producto {
    margin-top: 2rem;
    font-size: 0.7rem;
    color: #7E7E7C;
}

.template-detalle-producto .condiciones-producto p {
    margin-bottom: 1rem;
}

@media (max-width: 975px) {
    .template-detalle-producto {
        padding: 1.5rem 1rem;
    }

    .template-detalle-producto .contenedor-detalle-producto {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .template-detalle-producto .galeria-grid {
        display: none;
    }

    .template-detalle-producto .punto-galeria {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background-color: #ddd;
        border: none;
        cursor: pointer;
        padding: 0;
        transition: background-color 0.3s ease;
    }

    .template-detalle-producto .punto-galeria.activo {
        background-color: #3A3A34;
    }

}


/*************************************************/
/*         TEMPLATE CARRUSEL PRODUCTOS            */
/*************************************************/

.template-carrusel-productos-relacionados {
    width: 100%;
    padding: 1rem;
}

.template-carrusel-productos-relacionados .titulo-seccion {
    font-size: 1.6rem;
    color: #7E7E7C;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.template-carrusel-productos-relacionados .carrusel-contenedor {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.template-carrusel-productos-relacionados .carrusel-contenedor::-webkit-scrollbar {
    display: none;
}

.template-carrusel-productos-relacionados .carrusel-track {
    display: flex;
    gap: 0.5rem;
    width: fit-content;
}

.template-carrusel-productos-relacionados .tarjeta-producto {
    flex-shrink: 0;
    width: calc((100vw - 4rem - 5.5rem) / 6.1);
    min-width: 150px;
}

.template-carrusel-productos-relacionados .enlace-producto {
    text-decoration: none;
    color: inherit;
    display: block;
}

.template-carrusel-productos-relacionados .contenedor-imagen {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    background-color: #f5f5f5;
}

.template-carrusel-productos-relacionados .contenedor-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-carrusel-productos-relacionados .contenedor-imagen .imagen-principal {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.template-carrusel-productos-relacionados .contenedor-imagen .imagen-secundaria {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.template-carrusel-productos-relacionados .contenedor-imagen .contenedor-imagen:has(.imagen-secundaria):hover .imagen-principal {
    opacity: 0;
}

.template-carrusel-productos-relacionados .contenedor-imagen:hover .imagen-secundaria {
    opacity: 1;
}


.template-carrusel-productos-relacionados .boton-favorito {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    z-index: 10;
}

.template-carrusel-productos-relacionados .icono-oferta-naranja {
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
}

.template-carrusel-productos-relacionados .info-producto {
    padding: 0.05rem 0 0 0;
}

.template-carrusel-productos-relacionados .linea-principal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0rem;
}

.template-carrusel-productos-relacionados .nombre-producto {
    font-size: 0.85rem;
    font-weight: 700;
    color: #3A3A34;
    margin: 0;
    padding-right: 5px;
    line-height: 0.9rem;
}

.template-carrusel-productos-relacionados .precios {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.template-carrusel-productos-relacionados .precio-anterior {
    font-size: 0.85rem;
    color: #7E7E7C;
    text-decoration: line-through;
    line-height: 0.9rem;
}

.template-carrusel-productos-relacionados .precio-actual {
    font-size: 0.85rem;
    color: #3A3A34;
    font-weight: 600;
    padding-right: 0.3rem;
    line-height: 0.9rem;
}

.template-carrusel-productos-relacionados .descripcion {
    font-size: 0.85rem;
    color: #7E7E7C;
    margin: 0;
}

@media (min-width: 769px) {
    .template-carrusel-productos-relacionados .carrusel-contenedor {
        cursor: grab;
        user-select: none;
    }

    .template-carrusel-productos-relacionados .carrusel-contenedor.arrastrando {
        cursor: grabbing;
    }
}

@media (max-width: 1400px) {
    .template-carrusel-productos-relacionados .tarjeta-producto {
        width: calc((100vw - 4rem - 3.5rem) / 4.1);
    }
}

@media (max-width: 768px) {
    .template-carrusel-productos-relacionados .titulo-seccion {
        font-size: 1.5rem;
    }

    .template-carrusel-productos-relacionados .carrusel-track {
        display: flex;
        gap: 0;
        width: fit-content;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .template-carrusel-productos-relacionados .tarjeta-producto {
        flex-basis: 49%;
    }
}

@media (hover: none) {
    .template-detalle-producto .miga:hover {
        color: #7E7E7C;
    }
    
    .template-detalle-producto .boton-cantidad:hover {
        background-color: white;
    }
    
    .template-detalle-producto .boton-anadir-carrito-detalle:hover {
        background-color: #4a4a4a;
    }
    
    .template-carrusel-productos-relacionados .contenedor-imagen:hover .imagen-secundaria {
        opacity: 0;
    }
}