/* ALANETPC – filter widget test. Porto sidebar containers remain untouched. */
.apc-facets-shortcode .apc-facets-title { font-size: 1.15rem; margin-bottom: 12px; }
.apc-facets { font-family: inherit; font-size: 13px; line-height: 1.5; color: inherit; }
.apc-facets-clear { display: inline-block; margin: 0 0 12px; color: #147ab6; font-weight: 600; text-decoration: none; }
.apc-facet { margin: 0; padding: 0; border-bottom: 1px solid rgba(90, 108, 128, .18); }
.apc-facet:first-of-type { border-top: 1px solid rgba(90, 108, 128, .18); }
.apc-facet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0; font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.apc-facet-head::-webkit-details-marker { display: none; }
.apc-facet-head .apc-chevron { display: block; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s ease; margin-right: 5px; opacity: .7; }
.apc-facet[open] .apc-chevron { transform: rotate(225deg); }
.apc-facet-values { list-style: none; margin: 0 0 12px !important; padding: 0 !important; max-height: 260px; overflow-y: auto; }
.apc-facet-value { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.apc-facet-value a { display: flex; align-items: center; gap: 9px; padding: 5px 0; color: inherit; text-decoration: none !important; min-height: 28px; }
.apc-facet-value a:hover, .apc-facet-value a:focus-visible { color: #1469ad; }
.apc-facet-check { width: 15px; height: 15px; flex: 0 0 15px; display: inline-flex; justify-content: center; align-items: center; border: 1px solid #a8b2bc; border-radius: 3px; color: #fff; font-size: 11px; line-height: 1; }
.apc-facet-value.is-selected .apc-facet-check { background: #147ab6; border-color: #147ab6; }
.apc-facet-text { min-width: 0; overflow-wrap: anywhere; }


/* v0.1.3 — Mobile-only floating filters; no desktop layout changes. */
.apc-filter-floating-trigger,
.apc-filter-backdrop,
.apc-filter-drawer-heading { display: none; }

@media (max-width: 767px) {
    body.apc-mobile-filters-ready .apc-filter-floating-trigger {
        position: fixed;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 52px;
        min-height: 92px;
        padding: 12px 7px;
        margin: 0;
        background: #087ec1;
        color: #fff;
        border: 0;
        border-radius: 13px 0 0 13px;
        box-shadow: -4px 4px 17px rgba(8, 43, 77, .23);
        cursor: pointer;
        font-family: inherit;
        font-size: 12px;
        line-height: 1.2;
        z-index: 2147481001;
        -webkit-tap-highlight-color: transparent;
    }
    body.apc-mobile-filters-ready .apc-filter-floating-trigger:focus-visible,
    body.apc-mobile-filters-ready .apc-filter-drawer-close:focus-visible {
        outline: 3px solid #f1bd31;
        outline-offset: 2px;
    }
    body.apc-mobile-filters-ready .apc-filter-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(8, 20, 37, .62);
        z-index: 2147481002;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        display: block;
        transition: opacity .2s ease, visibility .2s;
    }
    body.apc-mobile-filters-ready .apc-mobile-filters-sidebar {
        display: block !important;
        position: fixed !important;
        inset: 0 0 0 auto !important;
        float: none !important;
        width: min(88vw, 380px) !important;
        max-width: min(88vw, 380px) !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 20px 24px !important;
        box-sizing: border-box !important;
        background: #fff !important;
        color: #25354a;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        box-shadow: -10px 0 30px rgba(0, 20, 48, .2);
        z-index: 2147481003 !important;
        transform: translate3d(105%,0,0) !important;
        visibility: hidden !important;
        pointer-events: none !important;
        opacity: 1 !important;
        transition: transform .22s ease, visibility .22s !important;
    }
    body.apc-mobile-filters-ready.apc-filters-open {
        overflow: hidden !important;
    }
    body.apc-mobile-filters-ready.apc-filters-open .apc-mobile-filters-sidebar {
        transform: translate3d(0,0,0) !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    body.apc-mobile-filters-ready.apc-filters-open .apc-filter-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    body.apc-mobile-filters-ready.apc-filters-open .apc-filter-floating-trigger {
        visibility: hidden;
        pointer-events: none;
    }
    body.apc-mobile-filters-ready .apc-filter-drawer-heading {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 64px;
        margin: 0 -20px 14px;
        padding: 12px 20px;
        background: #fff;
        border-bottom: 1px solid #e5eaf1;
    }
    body.apc-mobile-filters-ready .apc-filter-drawer-title {
        color: #182c4c;
        font-size: 18px;
        line-height: 1.3;
        font-weight: 700;
    }
    body.apc-mobile-filters-ready .apc-filter-drawer-close {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        border: 1px solid #dee6ed;
        border-radius: 10px;
        background: #f6f9fc;
        color: #173252;
        font-size: 29px;
        line-height: 1;
        cursor: pointer;
    }
    body.apc-mobile-filters-ready .apc-mobile-filters-sidebar .apc-facets,
    body.apc-mobile-filters-ready .apc-mobile-filters-sidebar .apc-facet-head { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .apc-filter-backdrop,
    .apc-mobile-filters-sidebar { transition: none !important; }
}

/* v0.1.5 – Counts represent published products in the current category,
   before intersecting any other filters. */
.apc-facet-count { margin-left:auto; flex:0 0 auto; color:#68788d; font-size:12px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.apc-facet-value.is-selected .apc-facet-count {color:#0d62a3; font-weight:700;}
.apc-active-filters { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin:0 0 18px; padding:12px; background:#f6f9fc; border:1px solid #e6edf4; border-radius:10px; font-family:inherit; }
.apc-active-filters-heading { font-size:12px; font-weight:700; color:#304056; margin-right:6px; }
.apc-active-filter-chip { display:inline-flex; gap:9px; align-items:center; min-height:32px; padding:6px 10px; background:white; color:#18406d; border:1px solid #cddfeb; border-radius:7px; font-size:12px; line-height:1.3; text-decoration:none !important; }
.apc-active-filter-chip:hover, .apc-active-filter-chip:focus-visible {color:#075c95; border-color:#087ec1;}
.apc-active-filter-x {font-size:18px; line-height:1; font-weight:600;}
.apc-active-filters-reset {font-size:12px; font-weight:700; color:#087ec1; margin-left:auto; text-decoration:underline;}
@media(max-width:767px){.apc-active-filters{margin:0 0 16px; padding:10px; gap:6px;} .apc-active-filters-heading{flex-basis:100%;} .apc-active-filter-chip{max-width:100%;}}

/* Elevated select dropdowns. Select2 commonly appends its popover to <body>,
   whereas the mobile filters panel has a deliberately high z-index. */
@media (max-width:767px) {
  body.apc-filters-open .select2-container--open,
  body.apc-filters-open .select2-container--open .select2-dropdown,
  body.apc-filters-open .select2-dropdown,
  body.apc-filters-open .select2-results { z-index:2147481100 !important; }
  body.apc-filters-open .apc-mobile-filters-sidebar .select2-container,
  body.apc-filters-open .apc-mobile-filters-sidebar .chosen-container,
  body.apc-filters-open .apc-mobile-filters-sidebar .nice-select { z-index:2147481100 !important; }
  body.apc-filters-open .apc-mobile-filters-sidebar .chosen-drop,
  body.apc-filters-open .apc-mobile-filters-sidebar .nice-select .list { z-index:2147481101 !important; }
}

/* v0.1.6 – Contextual WooCommerce subcategories, matching Porto's clean text carousel. */
.apc-subcategory-carousel { position:relative; clear:both; width:100%; min-width:0; margin:15px 0 30px; padding:12px 0 16px; border-bottom:1px solid #e5e8ee; font-family:inherit; }
.apc-subcategory-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 10px; color:#152a4e; font-weight:700; font-size:15px; }
.apc-subcategory-actions { display:flex; align-items:center; gap:7px; flex-shrink:0; }
.apc-subcategory-arrow { display:flex; align-items:center; justify-content:center; padding:0; width:31px; height:31px; border:1px solid #e3e8f0; border-radius:50%; background:#fff; color:#183a78; font-size:23px; line-height:1; cursor:pointer; }
.apc-subcategory-arrow:hover:not(:disabled), .apc-subcategory-arrow:focus-visible { border-color:#1469b2; color:#087ec1; }
.apc-subcategory-arrow:disabled { opacity:.3; cursor:default; }
.apc-subcategory-track { display:flex; align-items:stretch; gap:10px; overflow-x:auto; scroll-behavior:smooth; scroll-snap-type:x mandatory; padding:3px 1px 10px; scrollbar-width:thin; overscroll-behavior-inline:contain; }
.apc-subcategory-item { box-sizing:border-box; min-width:156px; flex:0 0 156px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:5px; min-height:68px; padding:10px 12px; color:#1b2435; text-align:center; text-decoration:none !important; background:#fff; border:1px solid #ecedf1; border-radius:8px; scroll-snap-align:start; transition:border-color .15s,box-shadow .15s; }
.apc-subcategory-item strong { font-size:13px; line-height:1.3; font-weight:700; color:#17253e; }
.apc-subcategory-item span { color:#80868c; font-size:12px; line-height:1.25; }
.apc-subcategory-item:hover, .apc-subcategory-item:focus-visible { border-color:#1673bc; box-shadow:0 2px 9px rgba(0,45,90,.08); }
.apc-subcategory-item.is-current { border-color:#a6cbe6; background:#f4f9fd; }
@media(max-width:767px) { .apc-subcategory-carousel { margin:10px 0 19px; } .apc-subcategory-head { font-size:14px; } .apc-subcategory-item { min-width:136px; flex-basis:136px; min-height:64px; } }
@media(prefers-reduced-motion:reduce) { .apc-subcategory-track { scroll-behavior:auto; } .apc-subcategory-item { transition:none; } }

/* Less-frequent facets remain accessible without creating a very long sidebar. */
.apc-facets-more {margin:12px 0 0; border:1px solid #e4ebf1; border-radius:7px; background:#fafcff;}
.apc-facets-more > summary {cursor:pointer; padding:11px 12px; font-size:13px; font-weight:700; color:#1269a7; list-style:none;}
.apc-facets-more > summary::-webkit-details-marker {display:none;}
.apc-facets-more > summary::after {content:' +'; float:right; font-weight:700;}
.apc-facets-more[open] > summary::after {content:' −';}
.apc-facets-more-content {padding:0 12px 10px; background:#fff;}
