/* Gallos Osuna — Responsive refinements */

/* Prevent horizontal overflow from long labels, prices and WooCommerce tables. */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}

.site-content,
.page-wrap,
.shop-layout,
.single-gallo,
.woocommerce {
    min-width: 0;
}

.gallo-card__title,
.gallo-card__meta,
.gallo-card__price,
.single-gallo__title,
.single-gallo__short-desc,
.shop-header__title,
.shop-header__desc {
    overflow-wrap: anywhere;
}

/* Touch-first controls. */
.btn,
button,
input[type="submit"],
input[type="button"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    min-height: 48px;
}

.category-chip-row {
    scrollbar-width: thin;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
}

.category-chip {
    scroll-snap-align: start;
    flex: 0 0 auto;
}

/* Tablets: more breathing room without wasting the available width. */
@media (min-width: 600px) and (max-width: 899px) {
    .page-wrap {
        padding-inline: 24px;
    }

    .gallos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }

    .site-footer__inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Phones. */
@media (max-width: 599px) {
    :root {
        --texto-base: 17px;
    }

    .page-wrap {
        padding: 18px 14px 48px;
    }

    .site-header__bar {
        padding-inline: 12px;
    }

    .site-header__actions {
        gap: 6px;
    }

    .header-icon-btn {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
    }

    .menu-toggle {
        min-width: 44px;
        height: 44px;
        padding-inline: 11px;
    }

    .menu-toggle__label {
        display: none;
    }

    .hero__content,
    .section-header,
    .shop-header {
        text-align: left;
    }

    .hero__actions,
    .single-gallo__actions,
    .single-gallo__add-to-cart,
    .single-gallo__add-to-cart form.cart {
        width: 100%;
    }

    .hero__actions .btn,
    .single-gallo__actions .btn,
    .single-gallo__add-to-cart .single_add_to_cart_button {
        width: 100%;
        justify-content: center;
    }

    .trust-strip,
    .features-grid,
    .gallos-grid,
    .site-footer__inner {
        grid-template-columns: 1fr;
    }

    .category-chip-row--scroll {
        margin-inline: -14px;
        padding-inline: 14px;
        scroll-padding-inline: 14px;
    }

    .shop-toolbar {
        align-items: stretch;
        gap: 10px;
    }

    .shop-toolbar > * {
        width: 100%;
    }

    .woocommerce-ordering,
    .woocommerce-ordering select {
        width: 100%;
    }

    .gallo-card__image {
        aspect-ratio: 4 / 3;
    }

    .gallo-card__body {
        padding: 15px;
    }

    .single-gallo__main {
        gap: 20px;
    }

    .single-gallo__summary {
        min-width: 0;
    }

    .gallo-ficha {
        grid-template-columns: 1fr;
    }

    .gallo-ficha__item {
        min-width: 0;
    }

    .single-gallo__pago-nota {
        display: flex;
        align-items: flex-start;
        gap: 9px;
    }

    .woocommerce table.shop_table,
    .woocommerce-page table.shop_table {
        font-size: 0.92rem;
    }

    .woocommerce form .form-row-first,
    .woocommerce form .form-row-last {
        float: none;
        width: 100%;
    }

    .site-footer {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }

    .whatsapp-float {
        right: max(14px, env(safe-area-inset-right));
        bottom: max(14px, env(safe-area-inset-bottom));
    }
}

/* Very small phones. */
@media (max-width: 380px) {
    .site-logo img,
    .custom-logo {
        max-width: 150px;
    }

    .header-icon-btn {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .category-chip {
        max-width: 85vw;
        white-space: normal;
        text-align: center;
    }
}
