﻿/* =============================================
   COLECCIONES — Home collection grid
   ============================================= */

.container_colecciones {
    width: 100%;
    padding: 60px 120px 80px;
    box-sizing: border-box;
    background: linear-gradient(180deg, var(--color-bg-warm) 0%, var(--color-bg-soft) 40%, var(--color-bg-warm) 100%);
}

/* Force the iPOS col8 wrapper and its row to go full width */
.container_cell.container_colecciones,
.container_cell_col8.container_colecciones {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    flex: none !important;
}

    /* Hide the spacer cells when colecciones is present */
    .container_cell.container_colecciones ~ .container_last_cell,
    .container_cell_col8.container_colecciones ~ .container_last_cell {
        display: none !important;
    }

.container_row:has(.container_colecciones) {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}

    .container_row:has(.container_colecciones) .container_first_cell {
        display: none !important;
    }

/* Section title */
.container_colecciones .texto_titulo2 h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    font-weight: 400;
    font-style: italic;
    color: #111111;
    -webkit-text-stroke: 0;
    text-align: center;
    margin: 0 0 40px 0;
    line-height: 1.2;
}

/* ── Grid ── */
.container_colecciones_home {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    width: 100%;
    box-sizing: border-box;
}

/* ── Card ── */
.coleccion_home {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    box-shadow: 0 8px 30px rgba(0,0,0,0.10);
    transition: transform 0.45s cubic-bezier(0.4,0,0.2,1), box-shadow 0.45s cubic-bezier(0.4,0,0.2,1);
    /* Fallback solid bg when no image is set */
    background-color: #cccccc;
}

    /* Neutral fallback when no image */

    .coleccion_home:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 50px rgba(var(--color-primary-rgb), 0.20);
    }

/* ── Background photo ── */
.coleccion_home_foto {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
}

.coleccion_home:hover .coleccion_home_foto {
    transform: scale(1.06);
}

/* ── Colour overlay per card — palette colours ── */
.coleccion_home::before {
    display: none !important;
}

/* ── Title ── */
.coleccion_home_texto {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 60px 24px 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
    transition: padding 0.35s ease;
}

.coleccion_home:hover .coleccion_home_texto {
    padding-bottom: 32px;
}

.coleccion_home_texto div {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    font-weight: 400;
    font-style: italic;
    color: #ffffff;
    line-height: 1.2;
    text-align: center;
}

/* Discover pill — appears on hover */
.coleccion_home_texto::after {
    content: 'Descubrir →';
    display: block;
    margin-top: 12px;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease 0.05s, transform 0.35s ease 0.05s;
    text-align: center;
}

.coleccion_home:hover .coleccion_home_texto::after {
    opacity: 1;
    transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .container_colecciones {
        padding: 50px 24px 60px;
    }

    .container_colecciones_home {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 540px) {
    .container_colecciones_home {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .coleccion_home {
        aspect-ratio: 16 / 9;
        border-radius: 16px;
    }

    .container_colecciones {
        padding: 40px 0 60px;
    }
}

/* Hide the left spacer cell — targets it by position within the row */
.container_row:has(.container_colecciones) > div:first-child {
    display: none !important;
    width: 0 !important;
}

/* Also cover browsers without :has() by targeting common iPOS class names */
.container_first_cell:has(+ .container_colecciones),
.container_first_cell + .container_colecciones ~ .container_last_cell {
    display: none !important;
}

/* ── Strip all iPOS container padding/background that wraps colecciones ── */
.container:has(.container_colecciones),
.container_row:has(.container_colecciones) {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: none !important;
}

/* Make sure the colecciones cell itself has no side padding */
.container_cell.container_colecciones,
.container_cell_col8.container_colecciones {
    padding: 0 !important;
    margin: 0 !important;
}

/* Hide both spacer cells */
.container_row:has(.container_colecciones) > div:first-child,
.container_row:has(.container_colecciones) > div:last-child {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
}
