/* CAIZUN Homepage Product Categories V4
   Page-only styles. Shared typography, spacing, and .container stay in common_base.css.
   Use Bootstrap 5 grid; do not override its standard breakpoints or max-widths. */

.cz-home-2026 .cz-home-categories {
    background: #fff;
}

.cz-home-2026 .cz-home-categories__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--cz-space-6);
    margin-bottom: var(--cz-space-6);
}

.cz-home-2026 .cz-home-categories__heading-copy { min-width: 0; }

.cz-home-2026 .cz-home-categories__title {
    margin-bottom: 0;
    line-height: 1.15;
}

.cz-home-2026 .cz-home-categories__title em {
    font-weight: 400;
}

.cz-home-2026 .cz-home-categories__all {
    display: inline-flex;
    align-items: center;
    gap: var(--cz-space-2);
    flex: none;
    padding-bottom: .3rem;
    border-bottom: 1px solid currentColor;
    color: var(--cz-ink);
    font: 600 .6875rem/1.5 var(--cz-font-sans);
    letter-spacing: .035em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color var(--cz-motion-fast), gap var(--cz-motion-fast);
}

.cz-home-2026 .cz-home-categories__all:hover,
.cz-home-2026 .cz-home-categories__all:focus-visible {
    gap: var(--cz-space-3);
    color: var(--cz-muted);
}

.cz-home-2026 .cz-home-categories__row + .cz-home-categories__row {
    margin-top: 0; /* Bootstrap .row/gutters create consistent row gaps. */
}

.cz-home-2026 .cz-home-categories__card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1.16 / 1;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(145deg, #aaa39a 0%, #6b6c69 46%, #343738 100%);
    color: #fff;
    text-decoration: none;
}

.cz-home-2026 .cz-home-categories__row--wide .cz-home-categories__card {
    aspect-ratio: 1.98 / 1;
}

.cz-home-2026 .cz-home-categories__img {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .6s ease;
}

.cz-home-2026 .cz-home-categories__card.is-image-missing .cz-home-categories__img {
    display: none;
}

.cz-home-2026 .cz-home-categories__overlay {
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 48%, rgba(0,0,0,.64) 100%);
    transition: background .25s ease;
}

.cz-home-2026 .cz-home-categories__card-content {
    position: absolute;
    z-index: 2;
    inset: auto var(--cz-space-5) var(--cz-space-5);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    color: #fff;
}

.cz-home-2026 .cz-home-categories__card-title {
    font: 500 clamp(1rem, 1.45vw, 1.375rem)/1.25 var(--cz-font-serif);
    letter-spacing: -.015em;
    color: #fff;
    text-shadow: 0 1px 9px rgba(0,0,0,.22);
}

.cz-home-2026 .cz-home-categories__card-arrow {
    font: 400 1.1rem/1 var(--cz-font-sans);
    color: #fff;
    opacity: 0;
    transform: translate(-5px, 5px);
    transition: opacity var(--cz-motion-fast), transform var(--cz-motion-fast);
}

@media (hover: hover) and (pointer: fine) {
    .cz-home-2026 .cz-home-categories__card:hover .cz-home-categories__img { transform: scale(1.055); }
    .cz-home-2026 .cz-home-categories__card:hover .cz-home-categories__card-arrow {
        opacity: 1;
        transform: translate(0, 0);
    }
    .cz-home-2026 .cz-home-categories__card:hover .cz-home-categories__overlay {
        background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.73) 100%);
    }
}

.cz-home-2026 .cz-home-categories__card:focus-visible {
    outline: 3px solid var(--cz-ink);
    outline-offset: 3px;
}
.cz-home-2026 .cz-home-categories__card:focus-visible .cz-home-categories__card-arrow {
    opacity: 1;
    transform: none;
}

/* Tablets smaller than the md/768px breakpoint use uncluttered wide tiles. */
@media (max-width: 767.98px) {
    .cz-home-2026 .cz-home-categories__heading { margin-bottom: var(--cz-space-5); }
    .cz-home-2026 .cz-home-categories__card,
    .cz-home-2026 .cz-home-categories__row--wide .cz-home-categories__card { aspect-ratio: 1.85 / 1; }
    .cz-home-2026 .cz-home-categories__card-title { font-size: 1.25rem; }
    .cz-home-2026 .cz-home-categories__card-arrow { opacity: .85; transform: none; }
}

/* Mobile: one card per row; title and the View All link do not overlap. */
@media (max-width: 575.98px) {
    .cz-home-2026 .cz-home-categories__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: var(--cz-space-4);
    }
    .cz-home-2026 .cz-home-categories__card,
    .cz-home-2026 .cz-home-categories__row--wide .cz-home-categories__card { aspect-ratio: 1.5 / 1; }
    .cz-home-2026 .cz-home-categories__card-content {
        inset: auto var(--cz-space-4) var(--cz-space-4);
    }
    .cz-home-2026 .cz-home-categories__card-title { font-size: 1.125rem; }
}

@media (prefers-reduced-motion: reduce) {
    .cz-home-2026 .cz-home-categories__img,
    .cz-home-2026 .cz-home-categories__overlay,
    .cz-home-2026 .cz-home-categories__all,
    .cz-home-2026 .cz-home-categories__card-arrow { transition: none; }
}
