/* =================== HOME LAYOUT =================== */
.home {
    background: var(--blue);
    overflow: hidden;
}

.home-container {
    height: 100vh;
    height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(0.6rem, 2vh, 1.4rem);
    padding: 0 2rem;
    position: relative;
    overflow: hidden;
}

/* Hero stack: círculo + logo en el mismo centro */
.hero-stack {
    position: relative;
    width: clamp(400px, 68vw, 780px);
    aspect-ratio: 1 / 1;
    max-height: 70vh;
    flex-shrink: 0;
    transform-style: preserve-3d;
    will-change: transform;
}

/* =================== HEADER =================== */
.header {
    padding: 1.6rem 0;
    text-align: center;
    background: var(--white);
}

.header-light { background: var(--blue); }

/* =================== CONTENT =================== */
.content {
    padding: 2rem 2rem 3.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* =================== GRID SYSTEM =================== */
.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    transition: grid-template-columns 0.3s ease;
}
.grid > * { min-width: 0; }
.grid.grid--1 { grid-template-columns: 1fr; }
.grid.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid.grid--5 { grid-template-columns: repeat(5, 1fr); }

/* =================== CATALOG CONTROLS =================== */
.catalog-controls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1.4rem;
}

.search-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 520px;
}

.search-wrap .search-input {
    flex: 1;
}

.cols-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: transparent;
    border: 1.5px solid rgba(0,21,255,0.3);
    color: var(--blue);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cols-toggle:hover {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
}

/* =================== RESPONSIVE LAYOUT =================== */
@media (max-width: 900px) {
    .grid.grid--5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-stack {
        max-height: 58vh;
    }

    .cols-toggle {
        width: 36px;
        height: 36px;
    }

    .grid.grid--4,
    .grid.grid--5 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid { gap: 14px; }
}

@media (max-width: 480px) {
    .home-container {
        gap: 0.5rem;
    }

    .hero-stack {
        width: clamp(300px, 88vw, 420px);
        max-height: 54vh;
    }

    .content {
        padding: 1.5rem 1rem 3rem;
    }

    .grid { gap: 8px; }
}
