/* Category sheet. Colors and toolbar height follow the existing navigation settings. */
.wmca-category-popup[hidden] { display: none !important; }
.wmca-mobile-ui[aria-modal="true"] { position: fixed; inset: 0; z-index: 100000; }
.wmca-mobile-ui .wmca-mobile-nav { z-index: 100001; }
.wmca-category-popup,
.wmca-category-popup * { box-sizing: border-box; }
.wmca-category-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    font-family: inherit;
    color: var(--wmca-nav-text, #333);
    isolation: isolate;
}
.wmca-category-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 28, 27, .42);
    opacity: 0;
    transition: opacity .26s ease;
    -webkit-tap-highlight-color: transparent;
}
.wmca-category-sheet {
    position: absolute;
    inset-inline: 0;
    bottom: calc(var(--wmca-nav-height, 84px) + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 620px;
    max-height: calc(90vh - var(--wmca-nav-height, 84px) - env(safe-area-inset-bottom, 0px));
    max-height: calc(90dvh - var(--wmca-nav-height, 84px) - env(safe-area-inset-bottom, 0px) - env(safe-area-inset-top, 0px));
    margin: 0 auto;
    padding: 10px 0 0;
    overflow: hidden;
    border: 0;
    border-radius: 28px 28px 0 0;
    background: #f7f8f8;
    box-shadow: 0 -12px 48px rgba(14, 36, 30, .14);
    transform: translateY(110%);
    opacity: 0;
    transition: transform .28s cubic-bezier(.22, .8, .3, 1), opacity .2s ease;
}
.wmca-mobile-ui.is-category-open .wmca-category-popup__backdrop { opacity: 1; }
.wmca-mobile-ui.is-category-open .wmca-category-sheet { transform: translateY(0); opacity: 1; }
.wmca-category-sheet__handle {
    display: block;
    flex: 0 0 4px;
    width: 40px;
    height: 4px;
    margin: 0 auto 8px;
    border-radius: 8px;
    background: #d9e1de;
}
.wmca-category-sheet__header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 4px 20px 14px;
}
.wmca-category-sheet__header h2 {
    margin: 0;
    padding: 0;
    color: inherit;
    font-family: inherit;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: normal;
    text-transform: none;
}
.wmca-category-sheet__close {
    appearance: none;
    display: inline-flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 0;
    height: 40px;
    min-height: 0;
    margin: 0;
    padding: 10px;
    border: 1px solid #e4eae7;
    border-radius: 50%;
    background: #fff;
    color: #354d45;
    box-shadow: none;
    cursor: pointer;
    line-height: 1;
}
.wmca-category-sheet__close:hover { background: var(--wmca-nav-active-bg, #eaf4f2); color: var(--wmca-nav-accent, #126965); }
.wmca-category-sheet__close::before,
.wmca-category-sheet__close::after { display: none; }
.wmca-category-sheet__close svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}
.wmca-category-sheet__content {
    min-height: 0;
    padding: 0 16px 20px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c8d9d3 transparent;
    touch-action: pan-y;
}
.wmca-category-sheet__content:focus-visible,
.wmca-category-sheet__close:focus-visible,
.wmca-category-card:focus-visible { outline: 2px solid var(--wmca-nav-accent, #126965); outline-offset: -3px; }
.wmca-category-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.wmca-category-list > li { margin: 0; padding: 0; list-style: none; }
.wmca-category-card {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 36px;
    align-items: center;
    gap: 10px;
    min-height: 128px;
    margin: 0;
    padding: 12px 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 22px;
    background: linear-gradient(135deg, #fff, #f2f7f5);
    color: var(--wmca-nav-text, #333);
    box-shadow: 0 5px 20px rgba(30, 60, 48, .045);
    font-family: inherit;
    text-align: right;
    text-decoration: none !important;
    -webkit-tap-highlight-color: transparent;
    transition: box-shadow .18s ease, transform .18s ease;
}
.wmca-category-list > li:nth-child(2n) .wmca-category-card { background: linear-gradient(135deg, #fffdfa, #f8f3ee); }
.wmca-category-card:hover { color: var(--wmca-nav-accent, #126965); box-shadow: 0 7px 24px rgba(30, 60, 48, .09); transform: translateY(-1px); }
.wmca-category-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: clamp(104px, 29vw, 158px);
}
.wmca-category-card__image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    border: 0;
    border-radius: 10px;
    box-shadow: none;
    object-fit: contain;
}
.wmca-category-card__image > svg {
    width: 48px;
    height: 48px;
    fill: none;
    stroke: var(--wmca-nav-accent, #126965);
    stroke-width: 1.2;
    opacity: .3;
}
.wmca-category-card__label {
    align-self: end;
    min-width: 0;
    padding-bottom: 15px;
    overflow-wrap: anywhere;
    font-size: clamp(14px, 3.8vw, 18px);
    font-weight: 600;
    line-height: 1.85;
}
.wmca-category-card__arrow {
    display: flex;
    align-self: end;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--wmca-nav-accent, #126965);
    color: #fff;
    box-shadow: 0 4px 10px rgba(18, 75, 60, .12);
}
.wmca-category-card__arrow svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wmca-category-sheet__empty { margin: 0; padding: 32px 12px 40px; text-align: center; font-size: 14px; line-height: 2; }
@media (max-width: 360px) {
    .wmca-category-sheet__header { padding-inline: 16px; }
    .wmca-category-sheet__content { padding-inline: 10px; }
    .wmca-category-card { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 32px; gap: 8px; padding-inline: 10px; border-radius: 18px; }
    .wmca-category-card__arrow { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
    .wmca-category-popup__backdrop, .wmca-category-sheet, .wmca-category-card { transition: none; }
}
