.bg-categories{
    --bg-accent:#ff7a00;
    background:linear-gradient(180deg,#fff,#fffdfa);
}
.bg-categories__grid{
    direction:ltr;
    display:grid;
    grid-template-columns:1.1fr 1fr;
    gap:16px;
    align-items:stretch;
}
.bg-categories__mini-grid{
    direction:rtl;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}
.bg-cat-mini,
.bg-cat-featured{
    position:relative;
    overflow:hidden;
    border:1px solid #ece2d8;
    border-radius:12px;
    background:#f5f1ed;
    box-shadow:0 8px 24px rgba(45,33,20,.035);
    text-decoration:none!important;
    color:#1d1a17!important;
    isolation:isolate;
    transition:transform .24s ease,box-shadow .24s ease,border-color .24s ease;
}
.bg-cat-mini:hover,
.bg-cat-featured:hover{
    transform:translateY(-3px);
    box-shadow:0 18px 34px rgba(45,33,20,.12);
    border-color:#e7b47e;
}

/* No white/blur overlay over category images. */
.bg-cat-mini:after,
.bg-cat-featured:after{
    display:none!important;
    content:none!important;
}
.bg-cat-mini{
    min-height:160px;
    padding:18px;
}
.bg-cat-mini__copy{
    direction:rtl;
    position:absolute;
    z-index:2;
    left:14px;
    right:auto;
    bottom:16px;
    width:max-content;
    max-width:calc(100% - 28px);
    margin:0;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    text-align:right;
}
.bg-cat-mini h3{
    margin:0 0 10px;
    font-size:18px;
    font-weight:800;
    color:#171717;
    text-shadow:
        0 1px 1px rgba(255,255,255,.95),
        0 0 8px rgba(255,255,255,.88);
}
.bg-cat-mini span{
    display:inline-flex;
    align-items:center;
    gap:5px;
    min-height:31px;
    padding:5px 11px;
    border:1px solid var(--bg-accent);
    border-radius:7px;
    font-size:10px;
    color:var(--bg-accent);
    background:#fff;
    transition:background-color .2s ease,color .2s ease,border-color .2s ease,transform .2s ease;
}
.bg-cat-mini svg{
    width:12px;
    height:12px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
}
.bg-cat-mini:hover span,
.bg-cat-mini:focus-visible span{
    background:var(--bg-accent);
    border-color:var(--bg-accent);
    color:#fff;
    transform:translateY(-1px);
}
.bg-cat-mini>img,
.bg-cat-featured>img{
    position:absolute;
    inset:0;
    z-index:0;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center;
    filter:none!important;
    opacity:1!important;
    transform:none!important;
}
.bg-cat-featured{
    min-height:336px;
    padding:28px;
    border-color:#e9a55c;
    box-shadow:0 12px 30px rgba(255,122,0,.08);
}
.bg-cat-featured__copy{
    direction:rtl;
    position:absolute;
    z-index:2;
    left:18px;
    right:auto;
    bottom:22px;
    width:max-content;
    max-width:46%;
    margin:0;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    text-align:right;
}
.bg-cat-featured .bg-overline,
.bg-cat-featured h3,
.bg-cat-featured p{
    text-shadow:
        0 1px 1px rgba(255,255,255,.96),
        0 0 10px rgba(255,255,255,.9);
}
.bg-cat-featured h3{
    margin:5px 0 6px;
    font-size:25px;
    font-weight:850;
}
.bg-cat-featured p{
    max-width:100%;
    margin:0 0 14px;
    color:#56504a;
    font-size:12px;
    line-height:1.9;
}
.bg-cat-featured .bg-btn{
    border-radius:8px!important;
    border:1px solid var(--bg-accent)!important;
    background:var(--bg-accent)!important;
    color:#fff!important;
    box-shadow:0 8px 20px rgba(255,122,0,.14);
    transition:background-color .2s ease,color .2s ease,border-color .2s ease,transform .2s ease;
}

@media(max-width:900px){
    .bg-categories__grid{grid-template-columns:1fr}
    .bg-cat-featured{order:-1}
    .bg-cat-mini{min-height:170px}
    .bg-cat-featured__copy{width:min(56%,340px)}
}
@media(max-width:560px){
    .bg-categories__mini-grid{
        grid-template-columns:1fr;
        gap:10px;
    }
    .bg-cat-mini,
    .bg-cat-featured{
        min-height:220px;
        padding:18px;
    }
    .bg-cat-mini__copy,
    .bg-cat-featured__copy{
        left:12px;
        right:auto;
        bottom:12px;
        width:max-content;
        max-width:72%;
        margin:0;
        display:flex;
        flex-direction:column;
        align-items:flex-start;
        text-align:right;
    }
    .bg-cat-mini h3{
        margin-bottom:8px;
        font-size:17px;
    }
    .bg-cat-featured h3{font-size:22px}
    .bg-cat-featured p{
        margin-bottom:11px;
        max-width:100%;
        font-size:11px;
    }
    .bg-cat-mini span,
    .bg-cat-featured .bg-btn{
        min-height:34px;
        padding:7px 11px;
    }
}
@media(prefers-reduced-motion:reduce){
    .bg-cat-mini,
    .bg-cat-featured,
    .bg-cat-mini span,
    .bg-cat-featured .bg-btn{
        transition:none!important;
    }
}

.bg-cat-mini:hover>img,.bg-cat-featured:hover>img{transform:none!important;filter:none!important;opacity:1!important;}

/* v3.6 button-state hardening */
.bg-cat-featured .bg-btn{
    opacity:1!important;
    visibility:visible!important;
    color:#fff!important;
    background:var(--bg-accent)!important;
    border-color:var(--bg-accent)!important;
}

.bg-cat-mini span{
    opacity:1!important;
    visibility:visible!important;
    color:var(--bg-accent)!important;
    background:#fff!important;
    border-color:var(--bg-accent)!important;
}
.bg-cat-mini:hover span,
.bg-cat-mini:focus-visible span{
    color:#fff!important;
    background:var(--bg-accent)!important;
    border-color:var(--bg-accent)!important;
}
.bg-cat-featured .bg-btn svg,
.bg-cat-mini span svg{
    stroke:currentColor!important;
}

/* v3.7: CTA hover belongs to the CTA only, not the whole large category card. */
.bg-cat-featured .bg-btn{
    opacity:1!important;
    visibility:visible!important;
    background:var(--bg-accent)!important;
    border-color:var(--bg-accent)!important;
    color:#fff!important;
}
.bg-cat-featured .bg-btn svg{
    stroke:currentColor!important;
}
.bg-cat-featured .bg-btn:hover{
    background:#fff!important;
    border-color:var(--bg-accent)!important;
    color:#171717!important;
}
.bg-cat-featured:hover .bg-btn:not(:hover){
    background:var(--bg-accent)!important;
    border-color:var(--bg-accent)!important;
    color:#fff!important;
}
