/**
 * DOCHI — Home CSS
 * Feed vertical: categorías, secciones, carruseles
 */

.dochi-home {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 80px;
}

/* Buscador home (mobile, prominente) */
.dochi-home-search {
    padding: 8px 16px 4px;
}

.dochi-search-input--home {
    width: 100%;
    padding: 14px 16px 14px 40px;
    font-size: 15px;
    background: var(--dochi-input-bg);
    border: none;
    border-radius: var(--dochi-radius);
    font-family: var(--dochi-font);
    outline: none;
    color: var(--dochi-text-name);
}

.dochi-search-input--home:focus {
    box-shadow: 0 0 0 2px var(--dochi-accent);
    background: var(--dochi-white);
}

/* === SECCIONES === */
.dochi-section {
    margin-bottom: 28px;
}

.dochi-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 16px;
    margin-bottom: 14px;
}

.dochi-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dochi-text-price);
    margin: 0;
    line-height: 1.2;
}

.dochi-section-link {
    font-size: 14px;
    color: var(--dochi-accent);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.dochi-section-link:hover {
    text-decoration: underline;
}

/* Mobile: link al lado del título, ocultar el de abajo */
.dochi-section-link-desktop {
    display: none;
}

/* Desktop: link debajo del carrusel, ocultar el de arriba */
@media (min-width: 768px) {
    .dochi-section-link-mobile {
        display: none;
    }

    .dochi-section-link-desktop {
        display: block;
        text-align: right;
        padding: 8px 16px 0;
        font-size: 14px;
    }
}

/* === CATEGORÍAS DESTACADAS === */
.dochi-categories {
    padding: 0 16px;
    margin-bottom: 28px;
}

.dochi-categories .dochi-section-title {
    margin-bottom: 14px;
}

.dochi-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.dochi-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #EAEAEA;
    border-radius: var(--dochi-radius-lg);
    padding: 18px 8px 14px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, max-height 0.3s, opacity 0.3s, padding 0.3s;
    overflow: hidden;
}

.dochi-category-card:active {
    transform: scale(0.96);
}

.dochi-category-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dochi-category-card img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    margin-bottom: 8px;
}

.dochi-category-card span {
    font-size: 12px;
    font-weight: 600;
    color: var(--dochi-text-name);
    text-align: center;
    line-height: 1.25;
}

/* Ocultar categorías extra en mobile (>3) */
.dochi-cat-hidden-mobile {
    display: none;
}

/* En desktop mostrar las mobile-hidden (hasta 6) */
@media (min-width: 768px) {
    .dochi-cat-hidden-mobile {
        display: flex;
    }
}

/* Ocultar categorías extra globalmente (>6) */
.dochi-cat-hidden {
    display: none;
}

/* Cuando están expandidas — mostrar todas */
.dochi-categories-grid.dochi-cats-expanded .dochi-cat-hidden-mobile,
.dochi-categories-grid.dochi-cats-expanded .dochi-cat-hidden {
    display: flex;
}

.dochi-more-categories {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: none;
    border: none;
    color: var(--dochi-text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--dochi-font);
    transition: color 0.15s;
}

.dochi-more-categories:hover {
    color: var(--dochi-text-name);
}

.dochi-more-categories:focus {
    outline: none;
    box-shadow: none;
}

.dochi-more-categories.dochi-cats-open {
    color: var(--dochi-accent);
}

/* === CARRUSEL — estilos base en dochi-main.css === */
/* Acá solo overrides específicos del home */

/* === BANNER "LOS MÁS VENDIDOS" (gris) === */
.dochi-section-bestsellers .dochi-bestsellers-banner {
    background: #F0F0F0;
    border-radius: var(--dochi-radius-lg);
    margin: 0;
    padding: 20px 0 16px;
}

.dochi-section-bestsellers .dochi-bestsellers-banner .dochi-section-header {
    padding: 0 20px;
    margin-bottom: 16px;
}

.dochi-section-bestsellers .dochi-bestsellers-banner .dochi-carousel {
    padding: 0 20px 8px;
}

/* === BANNER DE OFERTAS === */
.dochi-section-offers {
    margin-bottom: 32px;
}

.dochi-offers-banner {
    background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD0 100%);
    border-radius: var(--dochi-radius-lg);
    margin: 0;
    padding: 24px 0 20px;
}

.dochi-offers-banner .dochi-section-header {
    padding: 0 20px;
    margin-bottom: 16px;
}

.dochi-offers-title {
    color: #C2185B !important;
    font-size: 22px !important;
}

.dochi-offers-link {
    color: #C2185B !important;
}

.dochi-carousel-offers {
    padding: 0 20px 8px;
}

.dochi-carousel-offers > .dochi-card {
    flex: 0 0 calc(50% - 16px);
}

/* === DESKTOP === */
@media (min-width: 768px) {
    .dochi-home-search {
        display: none;
    }

    .dochi-categories-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .dochi-carousel-offers > .dochi-card {
        flex: 0 0 200px;
    }

    .dochi-section-title {
        font-size: 22px;
    }

    .dochi-offers-title {
        font-size: 24px !important;
    }
}

@media (min-width: 1024px) {
    .dochi-section-title {
        font-size: 24px;
    }
}
