/* --- CONTENEDOR PRINCIPAL Y COLUMNAS --- */
.textp-barra-categorias {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
}
.textp-columna-categorias {
    width: 80%;
    background-color: #852E4E;
    display: flex;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}
.textp-columna-opciones {
    width: 20%;
    background-color: #A33757;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}
.textp-columna-opciones a:hover {
    color: #F7B994;
}

/* --- BOTONES Y CARRUSEL --- */
.textp-carrusel { overflow: hidden; flex-grow: 1; }
.textp-carrusel-track { display: flex; align-items: center; transition: transform 0.3s ease-in-out; }
.textp-categoria-item { background-color: transparent; border: none; color: white; padding: 10px 15px; margin: 0 5px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.textp-categoria-item.active, .textp-categoria-item:hover { background-color: #A33757; color: #fff; }
.textp-nav-arrow { background-color: transparent; border: none; color: white; font-size: 24px; cursor: pointer; padding: 0 10px; display: none; }
.textp-boton-opciones { background-color: transparent; border: none; color: white; padding: 10px 15px; cursor: pointer; text-align: center; }

/* --- VISTA DE PRODUCTO ÚNICO --- */
#textp-contenedor-productos {
    transition: opacity 0.3s ease-in-out;
}
.textp-producto-unico-contenedor {
    padding: 50px;
    box-sizing: border-box;
    text-align: left;
}
.textp-producto-titulo-categoria {
    font-size: 2.5em;
    color: #4C1D3D;
    margin-bottom: 0 !important;
}
.textp-producto-subtitulo {
    font-size: 1.2em;
    margin-bottom: 30px;
    max-width: 800px;
    color: #4C1D3D;
    margin-left: 0;
    margin-right: 0;
}
.textp-caja-principal {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Relación 16:9 por defecto */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.3s ease-in-out;
    overflow: hidden; 
    border-radius: 10px;
}

/* --- NUEVA GALERÍA HORIZONTAL DEBAJO DE LA IMAGEN --- */
.textp-galeria-horizontal {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.textp-miniatura-item {
    width: 60px;
    height: 60px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 2px solid white;
    transition: border-color 0.2s ease;
    border-radius: 4px;
}

.textp-miniatura-item.active,
.textp-miniatura-item:hover {
    border-color: #A33757;
}
.textp-boton-medida {
    position: absolute;
    right: 20px;
    bottom: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 25px;
    text-decoration: none;
    font-size: 1.1em;
    transition: background-color 0.2s ease;
}
.textp-boton-medida strong {
    display: block; 
    margin-top: 5px;
}
.textp-boton-medida:hover {
    background-color: #A33757;
    color:#F7B994;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .textp-columna-categorias,
    .textp-columna-opciones {
        width: 100%;
    }
    .textp-nav-arrow {
        display: block;
    }
    .textp-producto-unico-contenedor {
        padding: 15px;
    }
    .textp-producto-titulo-categoria {
        font-size: 1.8em;
    }
    .textp-producto-subtitulo {
        font-size: 1em;
    }
    
    /* CAMBIO: Se añade esta regla para la imagen en móvil */
    .textp-caja-principal {
        padding-top: 100%; /* Relación de aspecto 1:1 (cuadrada) */
    }
    
    .textp-galeria-horizontal {
        gap: 8px;
        margin-top: 15px;
    }

    .textp-miniatura-item {
        width: 50px;
        height: 50px;
    }
    .textp-boton-medida {
        position: absolute;
        right: 15px;
        bottom: 15px;
        margin-top: 0;
        width: auto;
    }
}