/* Ajustes del catálogo recuperados para pantallas pequeñas. */
.dh-catalog__categories-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dh-catalog__categories-header .dh-catalog__categories-heading {
    margin: 0;
    line-height: 1.4;
}

.dh-catalog__categories-close { display: none; }

@media (max-width: 767px) {
    .dh-catalog__products .dh-home-product__media {
        height: 23rem;
        padding: 1.2rem 1.6rem 1rem;
    }

    .dh-catalog__products .dh-home-product__image-link { max-width: 30rem; }
    .dh-catalog__products .dh-home-product__body { padding-top: .9rem; }
}

@media (max-width: 599px) {
    .dh-catalog-page-header { padding: 2.4rem 0 2.7rem; }
    .dh-catalog-page-header h1 { font-size: 2.6rem; line-height: 1.2; }

    .dh-catalog__sort { display: none; }

    .dh-catalog__categories-dialog {
        position: fixed;
        inset: 0;
        width: min(38rem, calc(100vw - 2.4rem));
        max-width: none;
        max-height: min(64rem, calc(100dvh - 3.2rem));
        margin: auto;
        padding: 0;
        overflow: hidden;
        border: 0;
        border-radius: .9rem;
        background: #fff;
        box-shadow: 0 2rem 5rem rgba(18, 35, 46, .24);
    }

    .dh-catalog__categories-dialog:not([open]) { display: none; }
    .dh-catalog__categories-dialog[open] { display: flex; flex-direction: column; }
    .dh-catalog__categories-dialog::backdrop { background: rgba(18, 35, 46, .48); }

    .dh-catalog__categories-dialog .dh-catalog__categories-menu {
        position: static;
        display: flex;
        flex: 1;
        width: 100%;
        min-height: 0;
        max-height: none;
        padding: 1.8rem;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .dh-catalog__categories-dialog .dh-catalog__categories-links {
        flex: 1;
        min-height: 0;
    }

    .dh-catalog__categories-dialog .dh-catalog__category-list {
        flex: 1;
        max-height: none;
        overscroll-behavior: contain;
    }

    .dh-catalog__categories-dialog .dh-catalog__categories-close {
        display: grid;
        flex: none;
        width: 3.6rem;
        height: 3.6rem;
        padding: 0;
        place-items: center;
        border: 0;
        border-radius: 50%;
        background: #eef7fc;
        color: #17516f;
        cursor: pointer;
    }

    .dh-catalog__categories-dialog .dh-catalog__categories-close:focus-visible {
        outline: 2px solid var(--dh-blue);
        outline-offset: 2px;
    }

    .dh-catalog__products .dh-home-products__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }

    .dh-catalog__products .dh-home-product__media {
        height: clamp(24rem, 78vw, 30rem);
        padding: 1.5rem 1.8rem 1rem;
    }

    .dh-catalog__products .dh-home-product__body {
        min-width: 0;
        padding: .8rem 1.4rem 1.7rem;
    }

    .dh-catalog__products .dh-home-product__name {
        margin-bottom: .35rem;
        overflow-wrap: anywhere;
    }

    .dh-catalog__bottom {
        flex-direction: column;
        align-items: center;
        gap: 1.4rem;
        margin-top: 2.8rem;
    }

    .dh-catalog__count { text-align: center; }

    .dh-catalog__pagination {
        justify-content: center;
        gap: .7rem;
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 359px) {
    .dh-catalog__pagination { gap: .4rem; }
    .dh-catalog__page-group { gap: .25rem; }
    .dh-catalog__pagination .dh-catalog__page-step { padding-inline: .6rem; }
    .dh-catalog__pagination .dh-catalog__page-number { min-width: 2.9rem; }
}
