/*
 * Mallaro fixes on top of the real Amerce template (not part of the source
 * template itself -- see amerce_literal_port_plan.md). The source template's
 * hero/banner text overlays assume a curated lifestyle photo with built-in
 * negative space; real shop owners upload banners that already have their
 * own text/graphics baked in, which collides with our overlay text without
 * a scrim. Kept as a small additive stylesheet instead of editing the
 * verbatim-copied styles.css, so that file stays diffable against the
 * original template.
 */
.tf-slideshow .sld_image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.45) 100%);
    pointer-events: none;
}
.tf-slideshow .sld_image {
    position: relative;
}

.banner-image-text.type-abs .bn-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 40%, rgba(0, 0, 0, 0.55) 100%);
    pointer-events: none;
}
.banner-image-text.type-abs .bn-image {
    position: relative;
}

/*
 * .category-v03 .cate-image has no height of its own in the source stylesheet --
 * it's entirely sized by the real <img> inside it (width:100%/height:100% on the
 * img, nothing on the container). A shop whose categories have no icon set has no
 * img to size it, so the card collapsed to 0 height. Reserve the same 372:623
 * ratio the source template's own img width/height attributes use, with or
 * without a real image, and style the text fallback above.
 */
.category-v03 .cate-image {
    aspect-ratio: 372 / 623;
    display: block;
}
.mallaro-cate-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface, #f2f2f2);
    color: var(--text, #1a1a1a);
    font-size: 64px;
    font-weight: 600;
}

/*
 * styles.css's .overlay-filter sets `cursor: url(../images/cursor-close.svg), auto`.
 * That SVG was never in the local Envato extraction this port was built from (see
 * amerce_literal_port_plan.md's asset-gap list -- same situation as the missing
 * wow.min.js/PhotoSwipe), so the browser silently 404s on it every time the filter
 * drawer opens. Drop the dead reference rather than invent/fetch an icon.
 */
.overlay-filter {
    cursor: pointer;
}

/*
 * Defensive only -- the real fix is the condensed pager itself
 * (partials/_pagination.blade.php). styles.css's .tf-page-pagination is
 * `display:flex` with no wrap and fixed 40px items, which is how a real
 * catalog's full page list (previously printed in a flat, unbounded loop)
 * forced the row to ~1000px wide on a 375px viewport and broke every
 * position:fixed offcanvas drawer's positioning on every page with that
 * much pagination. Wrapping here is a safety net in case any viewport is
 * still narrower than the condensed window's worst case.
 */
.tf-page-pagination {
    flex-wrap: wrap;
}
