/*
 * assets/css/slider_imagenes.css
 * Versión mejorada con diseño moderno y profesional
 */

/* ===== FUENTES ===== */
@font-face {
    font-family: "zurichExtended";
    src: url("/assets/fonts/zurichExtended/zurichExtended-ultraBlack.ttf") format("truetype");
    font-display: swap;
}

/* ===== VARIABLES CSS ===== */
:root {
    --tbbs-primary-color: #000;
    --tbbs-secondary-color: #333;
    --tbbs-text-light: #666;
    --tbbs-bg-white: #ffffff;
    --tbbs-bg-overlay: rgba(0, 0, 0, 0.75);
    --tbbs-border-radius: 20px;
    --tbbs-border-radius-sm: 12px;
    --tbbs-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --tbbs-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --tbbs-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --tbbs-gap: 30px;
}

/* ===== WRAPPER PRINCIPAL ===== */
#slider-imagenes-wrapper {
    background-color: var(--tbbs-bg-white);
    width: 100%;
    padding: 80px 0;
    box-sizing: border-box;
    position: relative;
}

/* ===== ENCABEZADO DE SECCIÓN ===== */
.tbbs-section-header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tbbs-section-title {
    font-family: "zurichExtended", sans-serif;
    font-size: clamp(24px, 4vw, 36px);
    text-transform: uppercase;
    letter-spacing: 6px;
    color: var(--tbbs-primary-color);
    margin: 0 0 12px 0;
    font-weight: 900;
}

.tbbs-section-subtitle {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: clamp(14px, 2vw, 16px);
    color: var(--tbbs-text-light);
    margin: 0;
    font-weight: 400;
    letter-spacing: 1px;
}

/* ===== CONTENEDOR DEL CARRUSEL ===== */
.tbbs-carousel-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 60px;
    box-sizing: border-box;
}

/* ===== CONTENEDOR DE PRODUCTOS ===== */
.tbbs-productos {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    gap: var(--tbbs-gap);
    padding: 20px;
    box-sizing: border-box;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE y Edge */
}

/* Ocultar scrollbar en Chrome, Safari y Opera */
.tbbs-productos::-webkit-scrollbar {
    display: none;
}

/* ===== PRODUCTO INDIVIDUAL ===== */
.tbbs-producto {
    flex: 0 0 auto;
    width: 280px;
    text-align: center;
    font-family: system-ui, -apple-system, sans-serif;
    animation: fadeInUp 0.6s ease-out backwards;
    transition: transform 0.3s ease;
}

.tbbs-producto:nth-child(1) { animation-delay: 0.1s; }
.tbbs-producto:nth-child(2) { animation-delay: 0.2s; }
.tbbs-producto:nth-child(3) { animation-delay: 0.3s; }
.tbbs-producto:nth-child(4) { animation-delay: 0.4s; }
.tbbs-producto:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tbbs-producto:hover {
    transform: translateY(-5px);
}

/* ===== CONTENEDOR DE IMÁGENES ===== */
.tbbs-imagen-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: var(--tbbs-border-radius);
    margin-bottom: 20px;
    box-shadow: var(--tbbs-shadow);
    transition: var(--tbbs-transition);
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.tbbs-imagen-container:hover {
    box-shadow: var(--tbbs-shadow-hover);
    transform: scale(1.02);
}

.tbbs-imagen {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--tbbs-transition);
    position: absolute;
    top: 0;
    left: 0;
}

.tbbs-imagen-principal {
    opacity: 1;
    z-index: 1;
}

.tbbs-imagen-hover {
    opacity: 0;
    z-index: 2;
    transform: scale(1.1);
}

.tbbs-imagen-container:hover .tbbs-imagen-principal {
    opacity: 0;
    transform: scale(1.05);
}

.tbbs-imagen-container:hover .tbbs-imagen-hover {
    opacity: 1;
    transform: scale(1);
}

/* ===== BADGE DE PRODUCTO ===== */
.tbbs-product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 3;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: badgePulse 2s ease-in-out infinite;
}

.tbbs-badge-popular {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ===== OVERLAY Y BOTÓN ===== */
.tbbs-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--tbbs-bg-overlay);
    opacity: 0;
    transition: var(--tbbs-transition);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.tbbs-imagen-container:hover .tbbs-overlay {
    opacity: 1;
}

.tbbs-overlay-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--tbbs-primary-color);
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    transform: translateY(10px);
    transition: var(--tbbs-transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tbbs-imagen-container:hover .tbbs-overlay-button {
    transform: translateY(0);
}

.tbbs-overlay-button:hover {
    background: var(--tbbs-primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.tbbs-overlay-button svg {
    transition: transform 0.3s ease;
}

.tbbs-overlay-button:hover svg {
    transform: translateX(3px);
}

/* ===== INFO DEL PRODUCTO ===== */
.tbbs-producto-info {
    padding: 0 10px;
}

.tbbs-nombre-producto {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: var(--tbbs-primary-color);
    font-family: "zurichExtended", sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
    transition: color 0.3s ease;
}

.tbbs-producto:hover .tbbs-nombre-producto {
    color: var(--tbbs-secondary-color);
}

.tbbs-precio-producto {
    margin: 0;
    font-size: 14px;
    color: var(--tbbs-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tbbs-precio-valor {
    font-weight: 700;
    color: var(--tbbs-primary-color);
    font-size: 16px;
}

.tbbs-precio-moneda {
    font-weight: 400;
    font-size: 12px;
    opacity: 0.7;
}

/* ===== FLECHAS DE NAVEGACIÓN ===== */
.tbbs-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: var(--tbbs-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tbbs-primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tbbs-arrow:hover {
    background: var(--tbbs-primary-color);
    color: white;
    border-color: var(--tbbs-primary-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.tbbs-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.tbbs-arrow-left {
    left: 10px;
}

.tbbs-arrow-right {
    right: 10px;
}

/* ===== INDICADORES DEL CARRUSEL ===== */
.tbbs-carousel-indicators {
    display: none;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.tbbs-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d0d0d0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tbbs-indicator.active {
    width: 24px;
    border-radius: 4px;
    background: var(--tbbs-primary-color);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets */
@media (max-width: 1024px) {
    #slider-imagenes-wrapper {
        padding: 60px 0;
    }

    .tbbs-carousel-wrapper {
        padding: 0 40px;
    }

    .tbbs-productos {
        gap: 24px;
    }

    .tbbs-producto {
        width: 240px;
    }

    .tbbs-section-header {
        margin-bottom: 50px;
    }
}

/* Móviles */
@media (max-width: 768px) {
    :root {
        --tbbs-gap: 20px;
        --tbbs-border-radius: 16px;
    }

    #slider-imagenes-wrapper {
        padding: 50px 0;
    }

    .tbbs-section-header {
        margin-bottom: 40px;
        padding: 0 20px;
    }

    .tbbs-section-title {
        letter-spacing: 4px;
        margin-bottom: 8px;
    }

    .tbbs-section-subtitle {
        letter-spacing: 0.5px;
    }

    .tbbs-carousel-wrapper {
        padding: 0 20px;
        overflow: hidden;
    }

    .tbbs-productos {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 16px;
        padding: 20px 10px;
        scrollbar-width: none;
        justify-content: flex-start;
    }

    .tbbs-productos::-webkit-scrollbar {
        display: none;
    }

    .tbbs-producto {
        flex: 0 0 auto;
        scroll-snap-align: center;
        width: 200px;
        margin: 0;
    }

    .tbbs-producto:first-child {
        margin-left: 10px;
    }

    .tbbs-producto:last-child {
        margin-right: 10px;
    }

    .tbbs-imagen-container {
        margin-bottom: 16px;
    }

    .tbbs-overlay-button {
        padding: 12px 20px;
        font-size: 13px;
        gap: 6px;
    }

    .tbbs-overlay-button svg {
        width: 14px;
        height: 14px;
    }

    .tbbs-nombre-producto {
        font-size: 13px;
        letter-spacing: 2px;
    }

    .tbbs-precio-valor {
        font-size: 15px;
    }

    .tbbs-precio-moneda {
        font-size: 11px;
    }

    .tbbs-product-badge {
        font-size: 10px;
        padding: 5px 12px;
        top: 12px;
        right: 12px;
    }

    /* Mostrar flechas en móvil */
    .tbbs-arrow {
        display: flex;
        width: 44px;
        height: 44px;
    }

    .tbbs-arrow svg {
        width: 20px;
        height: 20px;
    }

    .tbbs-arrow-left {
        left: 5px;
    }

    .tbbs-arrow-right {
        right: 5px;
    }

    /* Mostrar indicadores en móvil */
    .tbbs-carousel-indicators {
        display: flex;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .tbbs-producto {
        width: 170px;
    }

    .tbbs-carousel-wrapper {
        padding: 0 10px;
    }

    .tbbs-overlay-button {
        padding: 10px 18px;
        font-size: 12px;
    }

    .tbbs-arrow {
        width: 40px;
        height: 40px;
    }
}

/* Desktop grande */
@media (min-width: 1400px) {
    .tbbs-productos {
        max-width: 1600px;
        gap: 40px;
    }

    .tbbs-producto {
        width: 320px;
    }

    .tbbs-section-header {
        margin-bottom: 70px;
    }
}