﻿.public-page {
    width: 100%;
}

/* ── HEADER UNIFICADO ── */
.public-header-unified {
    background: linear-gradient(180deg, #4c3528 0%, #6a4b37 100%);
}

.home-top {
    display: grid;
    grid-template-columns: 70px 1fr 70px;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
}

.home-logo-link {
    text-decoration: none;
}

.home-logo-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #e2cdb5; /* un toque más oscuro */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; 
}
    .home-logo-placeholder img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.home-search-wrap {
    display: flex;
    justify-content: center;
}

.home-search-input {
    width: min(620px, 100%);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 14px;
    padding: 14px 16px;
    outline: none;
    background: rgba(255,255,255,0.08);
    color: white;
    font-size: 1rem;
}

    .home-search-input::placeholder {
        color: rgba(255,255,255,0.75);
    }

.home-icons {
    display: flex;
    justify-content: flex-end;
}

.home-cart-link {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.08);
    color: white;
    font-size: 1.1rem;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #f0dfcd;
    color: #2c211b;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── NAVBAR ── */
.home-nav {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    padding: 10px 0 14px;
    margin: 0 auto;
    max-width: 1200px;
    border: none;
}

.public-nav-with-margin {
    max-width: 1200px;
    margin: 0 auto;
}

.home-nav a {
    text-decoration: none;
    color: #f0dfcd;
    font-weight: 600;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
}

    .home-nav a:hover,
    .home-nav a.active {
        color: #ffffff;
        border-bottom-color: #f0dfcd;
    }

/* ── BANNER ── */
.home-hero-image-section {
    width: 100%;
    margin: 0;
}

.hero-banner-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

/* ── PRODUCTOS ── */
.home-products-section {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 24px;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.producto-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.producto-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.producto-img-wrap {
    aspect-ratio: 1 / 1; 
    background: #f3eadf;
}

.producto-imagen {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.producto-info {
    padding: 18px;
}

    .producto-info h3 {
        margin: 0 0 10px;
        min-height: 3rem;
        line-height: 1.35;
    }

.producto-precio {
    margin: 0;
    color: var(--primary);
    font-weight: 700;
}

.empty-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 28px;
    color: var(--muted);
    text-align: center;
}

/* ── PAGINACIÓN ── */
.home-page-selector {
    margin-top: 26px;
    margin-bottom: 10px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-link {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
}

    .page-link.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }

.nav-page-link {
    min-width: auto;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-banner-img {
        height: 300px;
    }
}

@media (max-width: 700px) {
    .home-top {
        grid-template-columns: 56px 1fr 56px;
        gap: 12px;
        padding: 12px;
    }

    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .hero-banner-img {
        height: 220px;
    }

    .home-nav,
    .home-page-selector,
    .home-products-section {
        width: calc(100% - 24px);
    }

    .public-nav-with-margin {
        width: calc(100% - 24px);
    }
}
