/* Two-category layout (regional-products collage + home's "Explora
   Nuestras Categorías") reuses the product-category-grid-two block, but
   with 560x368 rectangular cards instead of the 368x368 squares that
   block's own CSS was tuned for on "Our Products" (3 categories) — scoped
   to this extra class (set via the block's html_attributes.class field)
   so the Our Products page is untouched. Guarded to desktop only: mobile
   already stacks 2 cards per row via its own 47% rule. */
@media (min-width: 769px) {
    /* The base rule hardcodes ".categories" to 1136px (560*2 + 16 gap),
       sized for the ~1296px content width Bootstrap's ".container" gives
       at its xxl breakpoint (>=1400px window). Between 1170-1399px
       (Bootstrap's xl breakpoint) the container only has ~1116px of
       content width, 20px short of 1136px — since margin:auto can't go
       negative, the row pinned to the left edge and overflowed off the
       right instead of centering. Capping at 1136px but otherwise
       letting it shrink to 100% of the container keeps it centered at
       every breakpoint. */
    .product-category-grid-two.cat-grid-two-wide .categories {
        width: 100% !important;
        max-width: 1136px;
    }
    /* Cards split the row's actual width in half (minus half the 16px
       gap) instead of a fixed 560px, so they still fill it exactly when
       the row itself has shrunk below 1136px. */
    .product-category-grid-two.cat-grid-two-wide .categories .card-wrapper {
        width: calc(50% - 8px);
    }
    .product-category-grid-two.cat-grid-two-wide .card-small-desing-two {
        width: 100% !important;
    }
}

/* Pre-existing bug (also present on Home/Regional Products, not introduced
   by cat-grid-two-wide): the base stylesheet's ".categories" rule hardcodes
   `width: 1136px !important` with no responsive override, so below 768px
   the row stays 1136px wide instead of stacking to the viewport — the
   second card silently clips off-screen (no visible scrollbar, since
   `#theme` has overflow:hidden) instead of wrapping below the first.
   Matches the specificity + !important of the base rule so it wins. */
@media (max-width: 768px) {
    .product-category-grid-two.cat-grid-two-wide .categories {
        width: 100% !important;
    }
}
