/* ========================================
   CATÁLOGO PÚBLICO - Flyflops
   Página de catálogo de productos sin login
   ======================================== */

/* ===== RESET (sobreescribir body de main.css) ===== */
.catalogo-page {
    display: block;
    background: #f5f8fa;
    min-height: 100vh;
    align-items: initial;
    justify-content: initial;
}

/* ===== TOPBAR (¿Ya eres parte del equipo?) ===== */
.catalogo-topbar {
    background: linear-gradient(135deg, #4A8BA5, #3A7A94);
    color: white;
    padding: 8px 0;
    text-align: center;
    font-size: 0.9rem;
    position: relative;
    z-index: 1001;
}

.catalogo-topbar__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.catalogo-topbar__btn {
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    padding: 4px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
}

.catalogo-topbar__btn:hover {
    background: white;
    color: #4A8BA5;
}

/* ===== NAVEGACIÓN ===== */
.catalogo-nav {
    background: white;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.catalogo-nav.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.catalogo-nav__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 20px;
}

.catalogo-nav__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #2C5F73;
    font-weight: 700;
    font-size: 1.3rem;
    white-space: nowrap;
}

.catalogo-nav__logo-img {
    height: 36px;
    width: auto;
}

.catalogo-nav__search {
    flex: 1;
    max-width: 500px;
}

.catalogo-nav__search input {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid #e0e8ec;
    border-radius: 25px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease;
    background: #f8fafb;
}

.catalogo-nav__search input:focus {
    border-color: #5B9CB8;
    background: white;
}

.catalogo-nav__login-btn {
    background: #5B9CB8;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.catalogo-nav__login-btn:hover {
    background: #4A8BA5;
    transform: translateY(-1px);
}

/* ===== HERO CATÁLOGO ===== */
.catalogo-hero {
    background: linear-gradient(180deg, #5B9CB8 0%, #7BB8D0 50%, #A8D4E5 100%);
    padding: 3rem 1.5rem;
    text-align: center;
    color: white;
}

.catalogo-hero__content h1 {
    font-size: 2.2rem;
    margin: 0 0 0.5rem 0;
    font-weight: 800;
}

.catalogo-hero__content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.catalogo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ===== FILTROS ===== */
.catalogo-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 2rem;
}

.catalogo-filters__inner {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    border: 2px solid #e0e8ec;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #555;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: #5B9CB8;
    color: #5B9CB8;
}

.filter-btn.active {
    background: #5B9CB8;
    border-color: #5B9CB8;
    color: white;
}

.catalogo-filters__count {
    font-size: 0.9rem;
    color: #888;
    font-weight: 500;
}

/* ===== GRID DE PRODUCTOS ===== */
.catalogo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* ===== TARJETA DE PRODUCTO ===== */
.producto-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #f0f0f0;
}

.producto-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(91,156,184,0.18);
}

.producto-card--oferta {
    border-color: #ff6b35;
}

.producto-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff6b35;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255,107,53,0.3);
}

.producto-card__image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f5f8fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.producto-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.producto-card:hover .producto-card__image img {
    transform: scale(1.05);
}

.producto-card__placeholder {
    font-size: 4rem;
    opacity: 0.3;
}

.producto-card__info {
    padding: 1rem 1.2rem 1.2rem;
}

.producto-card__name {
    font-size: 1rem;
    font-weight: 600;
    color: #2C5F73;
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.producto-card__price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.precio-original {
    text-decoration: line-through;
    color: #aaa;
    font-size: 0.85rem;
}

.precio-final {
    font-size: 1.2rem;
    font-weight: 800;
    color: #2C5F73;
}

.producto-card--oferta .precio-final {
    color: #ff6b35;
}

.producto-card__oferta-tag {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #ff6b35;
    font-weight: 600;
}

/* ===== ESTADOS (Loading / Empty / Error) ===== */
.catalogo-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 16px;
    color: #888;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e8ec;
    border-top-color: #5B9CB8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.catalogo-empty,
.catalogo-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: #888;
}

.catalogo-empty__icon,
.catalogo-error__icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

.catalogo-empty h3,
.catalogo-error h3 {
    margin: 0 0 8px 0;
    color: #555;
}

.catalogo-empty p,
.catalogo-error p {
    margin: 0;
}

.retry-btn {
    margin-top: 16px;
    background: #5B9CB8;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #4A8BA5;
}

/* ===== CTA DESCARGA ===== */
.catalogo-cta {
    background: linear-gradient(180deg, #4A8BA5, #3A7A94);
    padding: 3rem 1.5rem;
    text-align: center;
    color: white;
    margin-top: 3rem;
}

.catalogo-cta__content h2 {
    font-size: 1.8rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.catalogo-cta__content p {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0 0 1.5rem 0;
}

.catalogo-cta__buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.cta-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.cta-store-btn:hover {
    background: white;
    color: #3A7A94;
}

/* ===== FOOTER ===== */
.catalogo-footer {
    background: #2C5F73;
    color: rgba(255,255,255,0.7);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
}

.catalogo-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.catalogo-footer__links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.catalogo-footer__links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.catalogo-footer__links a:hover {
    color: white;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .catalogo-nav__inner {
        flex-wrap: wrap;
    }

    .catalogo-nav__search {
        order: 3;
        max-width: 100%;
        flex: 1 1 100%;
    }

    .catalogo-nav__login-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .catalogo-hero__content h1 {
        font-size: 1.6rem;
    }

    .catalogo-hero {
        padding: 2rem 1rem;
    }

    .catalogo-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .producto-card__info {
        padding: 0.8rem;
    }

    .producto-card__name {
        font-size: 0.9rem;
    }

    .precio-final {
        font-size: 1rem;
    }

    .catalogo-filters__inner {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }

    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 6px 14px;
        font-size: 0.85rem;
    }

    .catalogo-cta__content h2 {
        font-size: 1.4rem;
    }

    .catalogo-footer__inner {
        flex-direction: column;
        text-align: center;
    }

    .catalogo-footer__links {
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .catalogo-topbar {
        font-size: 0.8rem;
        padding: 6px 0;
    }

    .catalogo-topbar__btn {
        font-size: 0.78rem;
        padding: 3px 12px;
    }

    .catalogo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .producto-card__image {
        aspect-ratio: 1;
    }

    .producto-card__placeholder {
        font-size: 2.5rem;
    }
}
