/* WooCommerce archive grid pagination. Kept deliberately flat to minimise DOM. */
.zdpc-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 28px 0 0;
}

.zdpc-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #d7d7d3;
    border-radius: 9px;
    background: #fff;
    color: #063e38;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
}

.zdpc-pagination .page-numbers.current {
    border-color: #0b5a53;
    background: #0b5a53;
    color: #fff;
}

.zdpc-pagination a.page-numbers:hover,
.zdpc-pagination a.page-numbers:focus-visible {
    border-color: #0b5a53;
    text-decoration: none !important;
}

@media (max-width: 767px) {
    .zdpc-pagination {
        margin-top: 22px;
        gap: 6px;
    }

    .zdpc-pagination .page-numbers {
        min-width: 38px;
        min-height: 38px;
        padding: 7px 10px;
    }
}

/* Current-query AJAX progressive enhancement. Kept DOM-free on purpose. */
.zdpc-widget--grid[data-zdpc-ajax="1"] {
    position: relative;
    min-height: 1px;
}

.zdpc-widget--grid.zdpc-is-pending {
    cursor: progress;
    min-height: var(--zdpc-loading-height, auto);
}

.zdpc-widget--grid.zdpc-is-loading .zdpc-viewport,
.zdpc-widget--grid.zdpc-is-loading .zdpc-pagination {
    opacity: .82;
    pointer-events: none;
    transition: opacity .14s ease;
}

/* The default stable loader relies on the card shimmer only. The old animated
   top progress line was visually noisy and drew attention away from the grid.
   The legacy "progress" value is retained for saved Elementor settings, but
   now renders as a compact spinner instead of a sweeping line. */
.zdpc-widget--grid.zdpc-is-loading.zdpc-loading--progress::before {
    content: "";
    position: absolute;
    z-index: 30;
    top: 112px;
    left: 50%;
    width: 38px;
    height: 38px;
    margin-left: -19px;
    border: 3px solid rgba(11, 90, 83, .16);
    border-top-color: #0b5a53;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 8px 24px rgba(20, 46, 43, .10);
    animation: zdpc-ajax-spinner .72s linear infinite;
    pointer-events: none;
    will-change: transform;
}

.zdpc-widget--grid.zdpc-is-loading .zdpc-card {
    filter: saturate(.9);
}

/* Stable loading keeps the rendered card dimensions in place and paints the
   shimmer as a pseudo-element. No placeholder cards are inserted, so there is
   no reflow, no grid collapse and no extra steady-state DOM. */
.zdpc-widget--grid.zdpc-is-loading.zdpc-loading--stable .zdpc-card {
    pointer-events: none;
}

.zdpc-widget--grid.zdpc-is-loading.zdpc-loading--stable .zdpc-card::after {
    content: "";
    position: absolute;
    z-index: 12;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(
            105deg,
            rgba(246, 247, 244, .22) 0%,
            rgba(246, 247, 244, .48) 34%,
            rgba(255, 255, 255, .82) 49%,
            rgba(246, 247, 244, .48) 64%,
            rgba(246, 247, 244, .22) 100%
        );
    transform: translate3d(-115%, 0, 0);
    animation: zdpc-card-shimmer 1.08s cubic-bezier(.4, 0, .2, 1) infinite;
    will-change: transform;
}

@keyframes zdpc-card-shimmer {
    to { transform: translate3d(115%, 0, 0); }
}

.zdpc-widget--grid.zdpc-is-entering .zdpc-viewport,
.zdpc-widget--grid.zdpc-is-entering .zdpc-pagination {
    animation: zdpc-ajax-enter .18s ease both;
}

@keyframes zdpc-ajax-spinner {
    to { transform: rotate(360deg); }
}

@keyframes zdpc-ajax-enter {
    from { opacity: .72; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .zdpc-widget--grid.zdpc-is-loading.zdpc-loading--progress::before {
        animation: none;
        border-top-color: rgba(11, 90, 83, .58);
    }

    .zdpc-widget--grid.zdpc-is-entering .zdpc-viewport,
    .zdpc-widget--grid.zdpc-is-entering .zdpc-pagination {
        animation: none;
    }

    .zdpc-widget--grid.zdpc-is-loading.zdpc-loading--stable .zdpc-card::after {
        animation: none;
        transform: none;
        background: rgba(246, 247, 244, .46);
    }
}

/* v1.11 WooCommerce archive composition. These elements are emitted only for
   Grid + Current Query, so carousel DOM and styles remain untouched. */
.zdpc-archive-description {
    margin: 0 0 20px;
    padding: 0;
    color: #3f4a47;
    font-size: 15px;
    line-height: 1.65;
}

.zdpc-archive-description > :first-child,
.product-cat-second-text > :first-child { margin-top: 0; }
.zdpc-archive-description > :last-child,
.product-cat-second-text > :last-child { margin-bottom: 0; }

.zdpc-subcategories {
    margin: 0 0 18px;
}

.zdpc-subcategories__list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.zdpc-subcategories__item { min-width: 0; }

.zdpc-subcategory-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    height: 100%;
    padding: 10px 12px;
    border: 1px solid #deded9;
    border-radius: 12px;
    background: #fff;
    color: #063e38;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none !important;
    transition: border-color .16s ease, background-color .16s ease;
}

.zdpc-subcategory-link:hover,
.zdpc-subcategory-link:focus-visible {
    border-color: #0b5a53;
    background: #f8fbfa;
    text-decoration: none !important;
}

.zdpc-archive-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 18px;
}

.zdpc-archive-toolbar--count-right .zdpc-archive-count { order: 2; }
.zdpc-archive-toolbar--count-right .zdpc-ordering { order: 1; }

.zdpc-archive-count {
    color: #596360;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.zdpc-ordering {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
}

.zdpc-ordering__label {
    color: #596360;
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
}

.zdpc-ordering select.orderby {
    min-height: 40px;
    margin: 0;
    padding: 8px 34px 8px 12px;
    border: 1px solid #d7d7d3;
    border-radius: 10px;
    background-color: #fff;
    color: #063e38;
    font-size: 14px;
    line-height: 1.3;
}

.zdpc-ordering .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.product-cat-second-text {
    margin: 0 0 20px;
    color: #3f4a47;
    font-size: 15px;
    line-height: 1.65;
}

.zdpc-widget--grid.zdpc-is-loading .zdpc-archive-description,
.zdpc-widget--grid.zdpc-is-loading .zdpc-subcategories,
.zdpc-widget--grid.zdpc-is-loading .zdpc-archive-toolbar,
.zdpc-widget--grid.zdpc-is-loading .product-cat-second-text {
    opacity: 1;
    transition: none;
}

.zdpc-widget--grid.zdpc-is-loading .zdpc-archive-toolbar button,
.zdpc-widget--grid.zdpc-is-loading .zdpc-archive-toolbar select,
.zdpc-widget--grid.zdpc-is-loading .zdpc-filter-chips button {
    pointer-events: none;
}

@media (max-width: 1024px) {
    .zdpc-subcategories__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .zdpc-archive-description { margin-bottom: 16px; font-size: 14px; }
    .zdpc-subcategories { margin-bottom: 16px; }
    .zdpc-subcategories__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .zdpc-subcategory-link { min-height: 42px; padding: 9px 8px; font-size: 13px; }

    /* Keep result count and sorting on one compact row on phones. */
    .zdpc-archive-toolbar,
    .zdpc-archive-toolbar--count-right {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
    }

    .zdpc-archive-toolbar--count-right .zdpc-archive-count { order: 2; }
    .zdpc-archive-toolbar--count-right .zdpc-ordering { order: 1; }

    .zdpc-archive-count {
        flex: 0 0 auto;
        min-width: 0;
        font-size: 12.5px;
        line-height: 1.3;
        white-space: nowrap;
    }

    .zdpc-ordering {
        display: flex;
        flex: 0 1 auto;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        width: auto;
        min-width: 0;
        margin-left: auto;
    }

    .zdpc-ordering__label {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }

    .zdpc-ordering select.orderby {
        width: auto;
        max-width: 158px;
        min-width: 0;
        min-height: 36px;
        padding: 6px 28px 6px 9px;
        border-radius: 9px;
        font-size: 12.5px;
        line-height: 1.2;
    }

    /* The supplied subcategory slider uses 44px touch arrows. Give them a
       real gutter so the controls never visually touch the category cards. */
    .zdpc-widget .beban-category-section {
        padding-inline: 56px;
    }

    .product-cat-second-text { margin-bottom: 16px; font-size: 14px; }
}

/* v1.11.1: exact ZDOORS subcategory renderer integration. */
.zdpc-widget--grid.zdpc-is-loading .beban-category-section {
    opacity: .58;
    pointer-events: none;
    transition: opacity .14s ease;
}

/* v1.14 advanced archive grid UI. Progressive enhancement only: native
   WooCommerce forms/links remain the source of truth and work without JS.

   v1.14.1: theme-resistant UI variables and scoped control resets.

   v1.15: explicit mobile toolbar visibility/layout controls and drawer modes. These rules
   deliberately win over broad theme button/form rules while Elementor style
   controls continue to work through the variables below. */
.zdpc-widget.zdpc-widget--grid {
    --zdpc-advanced-accent: #063e38;
    --zdpc-advanced-control-bg: #fff;
    --zdpc-advanced-border: #d7d7d3;
    --zdpc-advanced-chip-bg: #fff;
    --zdpc-advanced-chip-color: #35413e;
}
.zdpc-archive-toolbar__primary,
.zdpc-archive-toolbar__secondary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.zdpc-filter-toggle,
.zdpc-load-more,
.zdpc-empty__clear,
.zdpc-filter-clear,
.zdpc-filter-apply,
.zdpc-filter-drawer__close,
.zdpc-density__button {
    font: inherit;
}

.zdpc-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--zdpc-advanced-border);
    border-radius: 10px;
    background: var(--zdpc-advanced-control-bg);
    color: var(--zdpc-advanced-accent);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.zdpc-filter-toggle[hidden] { display: none !important; }

.zdpc-filter-toggle__icon {
    position: relative;
    width: 15px;
    height: 12px;
    flex: 0 0 15px;
    background:
        linear-gradient(currentColor,currentColor) 0 1px/15px 1px no-repeat,
        linear-gradient(currentColor,currentColor) 0 6px/15px 1px no-repeat,
        linear-gradient(currentColor,currentColor) 0 11px/15px 1px no-repeat;
}

.zdpc-filter-toggle__icon::before,
.zdpc-filter-toggle__icon::after {
    content: "";
    position: absolute;
    width: 3px;
    height: 3px;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: #fff;
}

.zdpc-filter-toggle__icon::before { top: -1px; left: 3px; }
.zdpc-filter-toggle__icon::after { top: 4px; right: 3px; }

.zdpc-filter-count {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--zdpc-advanced-accent);
    color: #fff;
    font-size: 11px;
    line-height: 1;
}

.zdpc-density {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid var(--zdpc-advanced-border);
    border-radius: 10px;
    background: #fff;
}

.zdpc-density__button {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border: 0;
    border-right: 1px solid #e7e7e3;
    background: var(--zdpc-advanced-control-bg);
    color: #7a817f;
    cursor: pointer;
}

.zdpc-density__button:last-child { border-right: 0; }
.zdpc-density__button.is-active { background: var(--zdpc-advanced-accent); color: #fff; }

.zdpc-density__glyph {
    display: grid;
    grid-template-columns: repeat(2, 3px);
    gap: 2px;
}

.zdpc-density__glyph::before,
.zdpc-density__glyph::after {
    content: "";
    width: 3px;
    height: 10px;
    border-radius: 1px;
    background: currentColor;
    box-shadow: 5px 0 0 currentColor;
}

.zdpc-density__glyph--3 { transform: scaleX(.82); }
.zdpc-density__glyph--4 { transform: scaleX(.68); }
.zdpc-density__glyph--5 { transform: scaleX(.58); }

@media (min-width: 768px) {
    .zdpc-widget--grid.zdpc-density-user .zdpc-list {
        grid-template-columns: repeat(var(--zdpc-grid-user), minmax(0, 1fr));
    }
}

.zdpc-filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: -4px 0 18px;
}

.zdpc-filter-chips[hidden] { display: none !important; }

.zdpc-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 6px 8px 6px 10px;
    border: 1px solid #deded9;
    border-radius: 999px;
    background: var(--zdpc-advanced-chip-bg);
    color: var(--zdpc-advanced-chip-color);
    font-size: 12px;
    line-height: 1.2;
}

.zdpc-filter-chip button,
.zdpc-filter-chips__clear {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.zdpc-filter-chip button {
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    font-size: 17px;
    line-height: 1;
}

.zdpc-filter-chip button:hover,
.zdpc-filter-chip button:focus-visible { background: #f0f2ef; }

.zdpc-filter-chips__clear {
    padding: 6px 4px;
    color: #596360;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

html.zdpc-filter-open { overflow: hidden; }

.zdpc-filter-backdrop {
    position: fixed;
    z-index: 99990;
    inset: 0;
    background: rgba(18, 24, 22, .34);
    opacity: 0;
    transition: opacity .18s ease;
}

.zdpc-filter-backdrop.is-open { opacity: 1; }

.zdpc-filter-drawer {
    position: fixed;
    z-index: 99991;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    width: min(420px, 92vw);
    flex-direction: column;
    background: #fff;
    box-shadow: -20px 0 50px rgba(0,0,0,.12);
    transform: translateX(102%);
    visibility: hidden;
    transition: transform .2s ease, visibility 0s linear .2s;
}

.zdpc-filter-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform .2s ease;
}

.zdpc-filter-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid #e5e5e1;
    color: #063e38;
    font-size: 18px;
}

.zdpc-filter-drawer__close {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f2f3f0;
    color: #26302d;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.zdpc-filter-drawer__content {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 16px 18px;
    overscroll-behavior: contain;
}

.zdpc-filter-source-clone {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    float: none !important;
}

.zdpc-filter-drawer__footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 18px max(14px, env(safe-area-inset-bottom));
    border-top: 1px solid #e5e5e1;
    background: #fff;
}

.zdpc-filter-clear,
.zdpc-filter-apply {
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.zdpc-filter-clear { border: 1px solid #d7d7d3; background: #fff; color: #063e38; }
.zdpc-filter-apply { border: 1px solid #063e38; background: #063e38; color: #fff; }

/* Skeletons exist only during an actual AJAX request, so the steady-state DOM
   stays as shallow as the regular grid. */
.zdpc-skeleton-grid {
    display: none;
    grid-template-columns: repeat(var(--zdpc-grid-cols), minmax(0, 1fr));
    gap: var(--zdpc-gap);
}

.zdpc-widget--grid.zdpc-is-loading .zdpc-skeleton-grid { display: grid; }
.zdpc-widget--grid.zdpc-is-loading .zdpc-skeleton-grid + .zdpc-viewport { display: none; } /* only when no rendered products exist */

.zdpc-skeleton-card {
    display: flex;
    min-width: 0;
    min-height: 420px;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    padding: 0 14px 16px;
    border: 1px solid #e1e1dc;
    border-radius: 16px;
    background: #fff;
}

.zdpc-skeleton-media,
.zdpc-skeleton-line {
    position: relative;
    overflow: hidden;
    background: #eceeea;
}

.zdpc-skeleton-media {
    display: block;
    width: calc(100% + 28px);
    aspect-ratio: 1/1;
    margin: 0 -14px 5px;
}

.zdpc-skeleton-line { display: block; width: 92%; height: 12px; border-radius: 999px; }
.zdpc-skeleton-line--short { width: 38%; }
.zdpc-skeleton-line--medium { width: 68%; }
.zdpc-skeleton-line--price { width: 32%; height: 16px; margin-top: auto; }

.zdpc-skeleton-media::after,
.zdpc-skeleton-line::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 15%, rgba(255,255,255,.72) 45%, transparent 75%);
    transform: translateX(-110%);
    animation: zdpc-skeleton-shimmer 1.15s linear infinite;
}

@keyframes zdpc-skeleton-shimmer { to { transform: translateX(110%); } }

.zdpc-pagination--js-hidden { display: none !important; }

.zdpc-load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    min-height: 44px;
    margin: 26px auto 0;
    padding: 10px 20px;
    border: 1px solid #063e38;
    border-radius: 10px;
    background: var(--zdpc-advanced-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.zdpc-load-more:disabled { opacity: .55; cursor: progress; }
.zdpc-infinite-sentinel { width: 100%; height: 1px; margin-top: 30px; }

.zdpc-item--entering { opacity: .4; transform: translateY(4px); }
.zdpc-item { transition: opacity .18s ease, transform .18s ease; }

.zdpc-empty--archive {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 34px 20px;
    border: 1px dashed #d3d5cf;
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

.zdpc-empty__title { color: #063e38; font-size: 18px; }
.zdpc-empty__text { max-width: 520px; color: #68716f; font-size: 14px; line-height: 1.55; }
.zdpc-empty__clear {
    min-height: 40px;
    margin-top: 8px;
    padding: 8px 14px;
    border: 1px solid #063e38;
    border-radius: 9px;
    background: var(--zdpc-advanced-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}


/* Theme override shield ---------------------------------------------------
   Many WooCommerce themes apply broad `button`, `.button`, `select` and link
   rules. Keep the advanced toolbar deterministic without resetting native
   focus semantics or blocking Elementor's configurable colours. */
.zdpc-widget.zdpc-widget--grid .zdpc-archive-toolbar,
.zdpc-widget.zdpc-widget--grid .zdpc-archive-toolbar__primary,
.zdpc-widget.zdpc-widget--grid .zdpc-archive-toolbar__secondary,
.zdpc-widget.zdpc-widget--grid .zdpc-filter-chips {
    box-sizing: border-box;
}

.zdpc-widget.zdpc-widget--grid :is(
    .zdpc-filter-toggle,
    .zdpc-density__button,
    .zdpc-filter-chip > button,
    .zdpc-filter-chips__clear,
    .zdpc-filter-drawer__close,
    .zdpc-filter-clear,
    .zdpc-filter-apply,
    .zdpc-load-more,
    .zdpc-empty__clear
) {
    -webkit-appearance: none !important;
    appearance: none !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    text-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
    transform: none;
}

.zdpc-widget.zdpc-widget--grid .zdpc-filter-toggle {
    border-color: var(--zdpc-advanced-border) !important;
    background: var(--zdpc-advanced-control-bg) !important;
    color: var(--zdpc-advanced-accent) !important;
}

.zdpc-widget.zdpc-widget--grid .zdpc-ordering {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.zdpc-widget.zdpc-widget--grid .zdpc-ordering select.orderby {
    -webkit-appearance: auto !important;
    appearance: auto !important;
    box-sizing: border-box !important;
    width: auto !important;
    margin: 0 !important;
    border: 1px solid var(--zdpc-advanced-border) !important;
    border-radius: 10px !important;
    background-color: var(--zdpc-advanced-control-bg) !important;
    color: var(--zdpc-advanced-accent) !important;
    box-shadow: none !important;
    text-transform: none !important;
    text-decoration: none !important;
}

.zdpc-widget.zdpc-widget--grid .zdpc-density {
    border-color: var(--zdpc-advanced-border) !important;
    background: var(--zdpc-advanced-control-bg) !important;
    box-shadow: none !important;
}

.zdpc-widget.zdpc-widget--grid .zdpc-density__button {
    margin: 0 !important;
    border: 0 !important;
    border-right: 1px solid #e7e7e3 !important;
    border-radius: 0 !important;
    background: var(--zdpc-advanced-control-bg) !important;
    color: #7a817f !important;
}
.zdpc-widget.zdpc-widget--grid .zdpc-density__button:last-child { border-right: 0 !important; }
.zdpc-widget.zdpc-widget--grid .zdpc-density__button.is-active {
    background: var(--zdpc-advanced-accent) !important;
    color: #fff !important;
}

.zdpc-widget.zdpc-widget--grid .zdpc-filter-chip {
    border-color: var(--zdpc-advanced-border) !important;
    background: var(--zdpc-advanced-chip-bg) !important;
    color: var(--zdpc-advanced-chip-color) !important;
    box-shadow: none !important;
}
.zdpc-widget.zdpc-widget--grid .zdpc-filter-chip > button {
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
}
.zdpc-widget.zdpc-widget--grid .zdpc-filter-chip > button:hover,
.zdpc-widget.zdpc-widget--grid .zdpc-filter-chip > button:focus-visible {
    background: #f0f2ef !important;
}
.zdpc-widget.zdpc-widget--grid .zdpc-filter-chips__clear {
    margin: 0 !important;
    padding: 6px 4px !important;
    border: 0 !important;
    background: transparent !important;
    color: #596360 !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
}

.zdpc-widget.zdpc-widget--grid :is(.zdpc-filter-count, .zdpc-filter-apply, .zdpc-load-more, .zdpc-empty__clear) {
    border-color: var(--zdpc-advanced-accent) !important;
    background: var(--zdpc-advanced-accent) !important;
    color: #fff !important;
}
.zdpc-widget.zdpc-widget--grid .zdpc-filter-clear {
    border-color: var(--zdpc-advanced-border) !important;
    background: var(--zdpc-advanced-control-bg) !important;
    color: var(--zdpc-advanced-accent) !important;
}

.zdpc-widget.zdpc-widget--grid :is(
    .zdpc-filter-toggle, .zdpc-density__button, .zdpc-filter-chip > button,
    .zdpc-filter-chips__clear, .zdpc-filter-drawer__close, .zdpc-filter-clear,
    .zdpc-filter-apply, .zdpc-load-more, .zdpc-empty__clear, .zdpc-ordering select.orderby
):focus-visible {
    outline: 2px solid color-mix(in srgb, var(--zdpc-advanced-accent) 72%, white) !important;
    outline-offset: 2px !important;
}

@media (max-width: 767px) {
    .zdpc-archive-toolbar__primary,
    .zdpc-archive-toolbar__secondary { gap: 7px; }
    .zdpc-filter-toggle { min-height: 38px; padding: 7px 10px; font-size: 13px; }
    .zdpc-density { display: none; }
    .zdpc-filter-chips { margin-bottom: 14px; gap: 6px; }
    .zdpc-filter-chip { min-height: 30px; font-size: 11px; }
    .zdpc-skeleton-grid { grid-template-columns: repeat(var(--zdpc-grid-mobile), minmax(0, 1fr)); }
    .zdpc-skeleton-card { min-height: 300px; padding: 0 10px 12px; }
    .zdpc-skeleton-media { width: calc(100% + 20px); margin: 0 -10px 2px; }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .zdpc-skeleton-grid { grid-template-columns: repeat(var(--zdpc-grid-tablet), minmax(0, 1fr)); }
}


/* v1.15 mobile advanced-grid controls --------------------------------------
   Mobile visibility/layout is explicit rather than depending on incidental
   flex wrapping. All selectors are scoped to the ZDPC grid so theme CSS does
   not decide whether archive controls survive on small screens. */
@media (min-width: 768px) {
    .zdpc-widget--grid .zdpc-density__button[data-zdpc-density="1"] { display: none !important; }
}

@media (max-width: 767px) {
    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-archive-toolbar {
        width: 100% !important;
        min-width: 0 !important;
        margin-bottom: 12px !important;
        gap: var(--zdpc-mobile-control-gap, 8px) !important;
    }

    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-archive-toolbar__primary,
    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-archive-toolbar__secondary {
        min-width: 0 !important;
        gap: var(--zdpc-mobile-control-gap, 8px) !important;
    }

    .zdpc-widget--grid.zdpc-mobile-toolbar--two_rows .zdpc-archive-toolbar,
    .zdpc-widget--grid.zdpc-mobile-toolbar--two-rows .zdpc-archive-toolbar {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: stretch !important;
    }

    .zdpc-widget--grid.zdpc-mobile-toolbar--two_rows .zdpc-archive-toolbar__primary,
    .zdpc-widget--grid.zdpc-mobile-toolbar--two_rows .zdpc-archive-toolbar__secondary,
    .zdpc-widget--grid.zdpc-mobile-toolbar--two-rows .zdpc-archive-toolbar__primary,
    .zdpc-widget--grid.zdpc-mobile-toolbar--two-rows .zdpc-archive-toolbar__secondary {
        width: 100% !important;
        justify-content: space-between !important;
    }

    .zdpc-widget--grid.zdpc-mobile-toolbar--compact .zdpc-archive-toolbar {
        display: flex !important;
        flex-flow: row wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .zdpc-widget--grid.zdpc-mobile-toolbar--compact .zdpc-archive-toolbar__primary,
    .zdpc-widget--grid.zdpc-mobile-toolbar--compact .zdpc-archive-toolbar__secondary {
        width: auto !important;
        flex: 0 1 auto !important;
    }

    .zdpc-widget--grid.zdpc-mobile-toolbar--stacked .zdpc-archive-toolbar,
    .zdpc-widget--grid.zdpc-mobile-toolbar--stacked .zdpc-archive-toolbar__primary,
    .zdpc-widget--grid.zdpc-mobile-toolbar--stacked .zdpc-archive-toolbar__secondary {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
    }

    .zdpc-widget--grid.zdpc-mobile-toolbar--stacked .zdpc-ordering,
    .zdpc-widget--grid.zdpc-mobile-toolbar--stacked .zdpc-ordering select.orderby,
    .zdpc-widget--grid.zdpc-mobile-toolbar--stacked .zdpc-filter-toggle {
        width: 100% !important;
        max-width: none !important;
    }

    .zdpc-widget--grid.zdpc-mobile-hide-count .zdpc-archive-count,
    .zdpc-widget--grid.zdpc-mobile-hide-sort .zdpc-ordering,
    .zdpc-widget--grid.zdpc-mobile-hide-filter .zdpc-filter-toggle,
    .zdpc-widget--grid.zdpc-mobile-hide-chips .zdpc-filter-chips,
    .zdpc-widget--grid.zdpc-mobile-hide-density .zdpc-density {
        display: none !important;
    }

    /* Density remains opt-in on phones. When enabled only practical 1–3
       column choices are shown; 4/5 are still available on desktop. */
    .zdpc-widget--grid.zdpc-advanced-grid:not(.zdpc-mobile-hide-density) .zdpc-density {
        display: inline-flex !important;
    }
    .zdpc-widget--grid .zdpc-density__button[data-zdpc-density="4"],
    .zdpc-widget--grid .zdpc-density__button[data-zdpc-density="5"] {
        display: none !important;
    }
    .zdpc-widget--grid.zdpc-density-user-mobile .zdpc-list {
        grid-template-columns: repeat(var(--zdpc-grid-user-mobile), minmax(0, 1fr)) !important;
    }

    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-filter-toggle {
        display: inline-flex;
        flex: 0 0 auto;
        min-height: 40px !important;
        max-width: 100%;
    }
    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-filter-toggle[hidden] { display: none !important; }

    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-archive-count {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-ordering {
        min-width: 0 !important;
        margin-left: 0 !important;
    }
    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-ordering select.orderby {
        width: 100% !important;
        max-width: none !important;
        min-height: 40px !important;
    }

    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-filter-chips {
        display: flex;
        flex-wrap: nowrap !important;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 6px !important;
        margin: 0 0 14px !important;
        padding: 1px 0 3px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-filter-chips::-webkit-scrollbar { display: none; }
    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-filter-chip,
    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-filter-chips__clear { flex: 0 0 auto; }
    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-filter-chips[hidden] { display: none !important; }

    .zdpc-widget--grid.zdpc-mobile-toolbar-sticky .zdpc-archive-toolbar {
        position: sticky !important;
        top: var(--zdpc-mobile-sticky-top, 0px);
        z-index: 24;
        padding: 8px !important;
        border: 1px solid var(--zdpc-advanced-border) !important;
        border-radius: 12px;
        background: color-mix(in srgb, var(--zdpc-advanced-control-bg) 94%, transparent) !important;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }

    /* Bottom sheet is the safe mobile default. Side drawer remains selectable. */
    .zdpc-widget--grid.zdpc-mobile-drawer--bottom .zdpc-filter-drawer {
        top: auto !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: none !important;
        max-height: min(82dvh, 760px) !important;
        border-radius: 20px 20px 0 0 !important;
        transform: translate3d(0, 104%, 0) !important;
    }
    .zdpc-widget--grid.zdpc-mobile-drawer--bottom .zdpc-filter-drawer.is-open {
        transform: translate3d(0, 0, 0) !important;
    }

    .zdpc-widget--grid.zdpc-mobile-drawer--side .zdpc-filter-drawer {
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: min(92vw, var(--zdpc-filter-drawer-width, 390px)) !important;
        max-height: none !important;
        border-radius: 0 !important;
        transform: translate3d(104%, 0, 0) !important;
    }
    .zdpc-widget--grid.zdpc-mobile-drawer--side .zdpc-filter-drawer.is-open {
        transform: translate3d(0, 0, 0) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zdpc-filter-backdrop,
    .zdpc-filter-drawer,
    .zdpc-item { transition: none; }
    .zdpc-skeleton-media::after,
    .zdpc-skeleton-line::after { animation: none; }
}
.zdpc-empty__clear { text-decoration: none !important; }

/* v1.16 conditional filter profiles --------------------------------------- */
.zdpc-widget--grid.zdpc-has-conditional-filters {
    --zdpc-filter-sidebar-width: 260px;
    --zdpc-filter-gap: 20px;
    --zdpc-filter-radius: 14px;
}

.zdpc-widget--grid .zdpc-filter-grid-shell {
    display: grid;
    grid-template-columns: minmax(180px, var(--zdpc-filter-sidebar-width)) minmax(0, 1fr);
    gap: var(--zdpc-filter-gap);
    align-items: start;
}

.zdpc-widget--grid .zdpc-filter-grid-main { min-width: 0; }

.zdpc-widget--grid .zdpc-filter-sidebar {
    position: sticky;
    top: 18px;
    min-width: 0;
}

.zdpc-widget--grid .zdpc-conditional-filters,
.zdpc-widget--grid .zdpc-native-filters {
    width: 100%;
    min-width: 0;
}

.zdpc-widget--grid .zdpc-filter-block {
    margin: 0 0 12px;
    padding: 0;
    border: 1px solid var(--zdpc-advanced-border, #e2e2dd) !important;
    border-radius: var(--zdpc-filter-radius);
    background: var(--zdpc-advanced-control-bg, #fff) !important;
    overflow: hidden;
}

.zdpc-widget--grid .zdpc-filter-block__toggle {
    display: flex !important;
    width: 100% !important;
    min-height: 44px !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 10px 13px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--zdpc-advanced-accent, #063e38) !important;
    box-shadow: none !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    cursor: pointer;
}

.zdpc-widget--grid .zdpc-filter-block__body {
    display: block;
    padding: 0 13px 12px;
}

.zdpc-widget--grid .zdpc-filter-block.is-collapsed .zdpc-filter-block__body { display: none; }

.zdpc-widget--grid .zdpc-filter-options {
    display: grid;
    gap: 2px;
}

.zdpc-widget--grid .zdpc-filter-option {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    width: 100%;
    min-height: 34px;
    margin: 0 !important;
    padding: 5px 0 !important;
    color: #343b39 !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    cursor: pointer;
}

.zdpc-widget--grid .zdpc-filter-option input {
    flex: 0 0 auto;
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    accent-color: var(--zdpc-advanced-accent, #063e38);
}

.zdpc-widget--grid .zdpc-filter-option__label { min-width: 0; flex: 1 1 auto; }
.zdpc-widget--grid .zdpc-filter-option__count { flex: 0 0 auto; color: #8a918e; font-size: 11px; }

.zdpc-widget--grid .zdpc-filter-block--pills .zdpc-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.zdpc-widget--grid .zdpc-filter-option--pill {
    position: relative;
    width: auto !important;
    min-height: 32px;
    padding: 6px 10px !important;
    border: 1px solid var(--zdpc-advanced-border, #e2e2dd) !important;
    border-radius: 999px;
    background: #fff !important;
}

.zdpc-widget--grid .zdpc-filter-option--pill input {
    position: absolute;
    width: 1px !important;
    height: 1px !important;
    opacity: 0;
    pointer-events: none;
}

.zdpc-widget--grid .zdpc-filter-option--pill:has(input:checked) {
    border-color: var(--zdpc-advanced-accent, #063e38) !important;
    background: color-mix(in srgb, var(--zdpc-advanced-accent, #063e38) 8%, white) !important;
    color: var(--zdpc-advanced-accent, #063e38) !important;
}

.zdpc-widget--grid .zdpc-filter-select,
.zdpc-widget--grid .zdpc-price-filter input {
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 40px !important;
    margin: 0 !important;
    border: 1px solid var(--zdpc-advanced-border, #e2e2dd) !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #27302d !important;
    box-shadow: none !important;
}

.zdpc-widget--grid .zdpc-price-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.zdpc-widget--grid .zdpc-price-filter label { display: grid; gap: 4px; color: #69716f; font-size: 11px; }

.zdpc-widget--grid .zdpc-native-filters__actions { padding-top: 5px; }
.zdpc-widget--grid .zdpc-native-filters__actions .zdpc-filter-apply { width: 100%; min-height: 42px; }
.zdpc-widget--grid .zdpc-filter-empty { display: block; padding: 4px 0 8px; color: #8a918e; font-size: 12px; }

.zdpc-widget--grid.zdpc-filter-layout--horizontal .zdpc-conditional-filters--horizontal {
    margin-bottom: 14px;
}

.zdpc-widget--grid.zdpc-filter-layout--horizontal .zdpc-native-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.zdpc-widget--grid.zdpc-filter-layout--horizontal .zdpc-filter-block { margin-bottom: 0; }
.zdpc-widget--grid.zdpc-filter-layout--drawer .zdpc-filter-sidebar,
.zdpc-widget--grid.zdpc-filter-layout--drawer .zdpc-conditional-filters--horizontal { display: none; }

.zdpc-widget--grid .zdpc-filter-drawer .zdpc-conditional-filters--drawer { width: 100%; }
.zdpc-widget--grid .zdpc-filter-drawer .zdpc-filter-block { border-radius: 12px; }

.zdpc-widget--grid .zdpc-filter-block__toggle:focus-visible,
.zdpc-widget--grid .zdpc-filter-select:focus-visible,
.zdpc-widget--grid .zdpc-price-filter input:focus-visible,
.zdpc-widget--grid .zdpc-filter-option input:focus-visible + .zdpc-filter-option__label {
    outline: 2px solid color-mix(in srgb, var(--zdpc-advanced-accent, #063e38) 70%, white) !important;
    outline-offset: 2px !important;
}

@media (max-width: 1024px) {
    .zdpc-widget--grid .zdpc-filter-grid-shell {
        grid-template-columns: minmax(190px, min(var(--zdpc-filter-sidebar-width), 230px)) minmax(0, 1fr);
        gap: 14px;
    }
}

@media (max-width: 767px) {
    .zdpc-widget--grid .zdpc-filter-grid-shell { display: block !important; }
    .zdpc-widget--grid .zdpc-filter-sidebar,
    .zdpc-widget--grid .zdpc-conditional-filters--horizontal { display: none !important; }
    .zdpc-widget--grid .zdpc-filter-grid-main { width: 100%; }
    .zdpc-widget--grid .zdpc-filter-drawer__content { padding-bottom: 6px; }
    .zdpc-widget--grid .zdpc-filter-drawer .zdpc-filter-block { margin-bottom: 9px; }
    .zdpc-widget--grid .zdpc-filter-block__toggle { min-height: 42px !important; padding: 9px 11px !important; }
    .zdpc-widget--grid .zdpc-filter-block__body { padding: 0 11px 10px; }
    .zdpc-widget--grid .zdpc-filter-option { min-height: 32px; font-size: 12px !important; }
    .zdpc-widget--grid .zdpc-price-filter { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
    .zdpc-widget--grid.zdpc-has-conditional-filters.zdpc-filter-layout--sidebar .zdpc-filter-toggle,
    .zdpc-widget--grid.zdpc-has-conditional-filters.zdpc-filter-layout--horizontal .zdpc-filter-toggle {
        display: none !important;
    }
}
.zdpc-widget--grid .zdpc-filter-block__title {
    display:flex;align-items:center;min-height:44px;padding:10px 13px;
    color:var(--zdpc-advanced-accent,#063e38);font-size:13px;font-weight:700;line-height:1.25;
}

/* v1.16.4 archive rhythm + long-filter scrolling -------------------------
   Keep archive sections visually separated and prevent long attribute lists
   from stretching the sidebar indefinitely. The first six options remain
   visible; only filters with seven or more options become independently
   scrollable. */
.zdpc-widget--grid.zdpc-has-conditional-filters {
    --zdpc-archive-section-gap: 20px;
    --zdpc-filter-block-gap: 14px;
}

.zdpc-widget--grid .zdpc-archive-description,
.zdpc-widget--grid .product-cat-second-text,
.zdpc-widget--grid .zdpc-subcategories,
.zdpc-widget--grid .beban-category-section {
    margin-bottom: var(--zdpc-archive-section-gap) !important;
}

.zdpc-widget--grid .zdpc-archive-toolbar {
    margin-bottom: var(--zdpc-archive-section-gap) !important;
}

.zdpc-widget--grid.zdpc-filter-layout--horizontal .zdpc-conditional-filters--horizontal {
    margin-bottom: var(--zdpc-archive-section-gap) !important;
}

.zdpc-widget--grid .zdpc-filter-block {
    margin-bottom: var(--zdpc-filter-block-gap) !important;
}

.zdpc-widget--grid .zdpc-filter-block:last-child {
    margin-bottom: 0 !important;
}

.zdpc-widget--grid .zdpc-filter-options--scroll {
    max-height: 214px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--zdpc-advanced-accent, #063e38) 32%, #cfd5d2) transparent;
    padding-right: 5px;
    margin-right: -5px;
}

.zdpc-widget--grid .zdpc-filter-options--scroll::-webkit-scrollbar {
    width: 6px;
}

.zdpc-widget--grid .zdpc-filter-options--scroll::-webkit-scrollbar-track {
    background: transparent;
}

.zdpc-widget--grid .zdpc-filter-options--scroll::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--zdpc-advanced-accent, #063e38) 28%, #d9dddb);
    border-radius: 999px;
}

.zdpc-widget--grid .zdpc-filter-options--scroll::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--zdpc-advanced-accent, #063e38) 44%, #cbd1ce);
}

/* Keep the first/last option from visually touching the clipped edges. */
.zdpc-widget--grid .zdpc-filter-options--scroll > .zdpc-filter-option:first-child {
    margin-top: 1px !important;
}
.zdpc-widget--grid .zdpc-filter-options--scroll > .zdpc-filter-option:last-child {
    margin-bottom: 1px !important;
}

@media (max-width: 767px) {
    .zdpc-widget--grid.zdpc-has-conditional-filters {
        --zdpc-archive-section-gap: 16px;
        --zdpc-filter-block-gap: 10px;
    }

    .zdpc-widget--grid .zdpc-filter-options--scroll {
        max-height: 202px;
        padding-right: 4px;
        margin-right: -4px;
    }
}


/* v1.16.5 sticky offset + refined filter UI + empty-category full width ----
   Keep the sticky filter rail slightly away from the viewport edge, improve
   the filter card polish, and let naturally empty categories use the full
   content width instead of reserving a dead sidebar column. */
.zdpc-widget--grid.zdpc-has-conditional-filters {
    --zdpc-filter-sticky-top: 32px;
}

.zdpc-widget--grid .zdpc-filter-sidebar {
    top: calc(var(--zdpc-filter-sticky-top) + env(safe-area-inset-top, 0px));
}

.zdpc-widget--grid .zdpc-filter-sidebar .zdpc-conditional-filters,
.zdpc-widget--grid .zdpc-filter-drawer .zdpc-conditional-filters,
.zdpc-widget--grid.zdpc-filter-layout--horizontal .zdpc-conditional-filters {
    display: grid;
    gap: 0;
}

.zdpc-widget--grid .zdpc-filter-sidebar .zdpc-conditional-filters {
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--zdpc-advanced-border, #d7d7d3) 92%, white);
    border-radius: 18px;
    background: color-mix(in srgb, var(--zdpc-advanced-control-bg, #fff) 96%, #f7f6f2);
    box-shadow: 0 12px 28px rgba(6, 62, 56, .05);
}

.zdpc-widget--grid .zdpc-filter-block {
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.zdpc-widget--grid .zdpc-filter-block:hover {
    border-color: color-mix(in srgb, var(--zdpc-advanced-accent, #063e38) 18%, var(--zdpc-advanced-border, #e2e2dd)) !important;
}

.zdpc-widget--grid .zdpc-filter-block__toggle,
.zdpc-widget--grid .zdpc-filter-block__title {
    position: relative;
}

.zdpc-widget--grid .zdpc-filter-block__toggle span:last-child {
    color: #7a817f;
    font-size: 18px;
    line-height: 1;
}

.zdpc-widget--grid .zdpc-filter-block__body {
    padding-top: 2px;
}

.zdpc-widget--grid .zdpc-filter-option {
    border-radius: 10px;
    transition: background-color .16s ease, color .16s ease;
}

.zdpc-widget--grid .zdpc-filter-option:hover {
    background: #f7f7f4;
}

.zdpc-widget--grid .zdpc-filter-option__label {
    overflow-wrap: anywhere;
}

.zdpc-widget--grid .zdpc-filter-select,
.zdpc-widget--grid .zdpc-price-filter input {
    padding: 0 12px !important;
}

.zdpc-widget--grid .zdpc-price-filter label > span {
    font-weight: 600;
    letter-spacing: .01em;
}

.zdpc-widget--grid.zdpc-empty-category .zdpc-filter-toggle,
.zdpc-widget--grid.zdpc-empty-category .zdpc-filter-chips {
    display: none !important;
}

.zdpc-widget--grid.zdpc-empty-category .zdpc-empty--archive,
.zdpc-widget--grid .zdpc-empty--archive.zdpc-empty--full {
    width: 100%;
    max-width: none;
    min-height: clamp(260px, 46vh, 520px);
}

.zdpc-widget--grid.zdpc-empty-category .zdpc-empty--archive {
    border-style: solid;
    border-color: #e4e5df;
}

@media (max-width: 1024px) {
    .zdpc-widget--grid.zdpc-has-conditional-filters {
        --zdpc-filter-sticky-top: 18px;
    }
}

@media (max-width: 767px) {
    .zdpc-widget--grid.zdpc-has-conditional-filters {
        --zdpc-filter-sticky-top: 14px;
    }

    .zdpc-widget--grid .zdpc-filter-sidebar .zdpc-conditional-filters {
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    .zdpc-widget--grid .zdpc-empty--archive.zdpc-empty--full {
        min-height: 220px;
    }
}


/* v1.16.9 simplified filter cards -------------------------------------------------
   Keep the requested borderless look, but preserve the rounded filter-card shape.
   The previous v1.16.7 override removed the radius as well, which made the sidebar
   look like a flat table. */
.zdpc-widget--grid .zdpc-filter-sidebar .zdpc-conditional-filters {
    padding: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
}

.zdpc-widget--grid .zdpc-filter-block {
    border: 0 !important;
    border-radius: var(--zdpc-filter-radius, 14px) !important;
    background: var(--zdpc-advanced-control-bg, #fff) !important;
    box-shadow: none !important;
    overflow: hidden;
}

.zdpc-widget--grid .zdpc-filter-block:hover {
    border-color: transparent !important;
    box-shadow: none !important;
}

.zdpc-widget--grid .zdpc-filter-block__toggle,
.zdpc-widget--grid .zdpc-filter-block__title {
    padding: 10px 13px !important;
}

.zdpc-widget--grid .zdpc-filter-block__body {
    padding: 0 13px 12px !important;
}

.zdpc-widget--grid .zdpc-filter-option {
    border-radius: 8px;
}

.zdpc-widget--grid .zdpc-filter-option:hover {
    background: #f7f6f2;
}

/* A true empty category has nothing to sort/filter. Hide the dead toolbar and
   stretch the empty state across the full available archive content width. */
.zdpc-widget--grid.zdpc-empty-category .zdpc-archive-toolbar,
.zdpc-widget--grid.zdpc-empty-category .zdpc-filter-toggle,
.zdpc-widget--grid.zdpc-empty-category .zdpc-filter-chips,
.zdpc-widget--grid.zdpc-empty-category .zdpc-pagination {
    display: none !important;
}

.zdpc-widget--grid.zdpc-empty-category,
.zdpc-widget--grid.zdpc-empty-category .zdpc-viewport,
.zdpc-widget--grid.zdpc-empty-category .zdpc-empty--archive,
.zdpc-widget--grid .zdpc-empty--archive.zdpc-empty--full {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

.zdpc-widget--grid.zdpc-empty-category .zdpc-viewport {
    display: block !important;
}

.zdpc-widget--grid.zdpc-empty-category .zdpc-empty--archive,
.zdpc-widget--grid .zdpc-empty--archive.zdpc-empty--full {
    min-height: clamp(300px, 52vh, 620px);
    margin: 0 !important;
    padding-inline: clamp(24px, 5vw, 72px);
}

/* Elementor can retain widget width constraints from the shared archive
   template. For an empty category, let the product-card widget consume the
   available archive column instead of preserving a narrow intrinsic width. */
.elementor-widget-zdoors-product-cards:has(.zdpc-empty-category),
.elementor-widget-zdoors-product-cards:has(.zdpc-empty-category) > .elementor-widget-container {
    width: 100% !important;
    max-width: none !important;
}

@media (max-width: 767px) {
    .zdpc-widget--grid.zdpc-empty-category .zdpc-empty--archive,
    .zdpc-widget--grid .zdpc-empty--archive.zdpc-empty--full {
        min-height: 260px;
        padding-inline: 20px;
    }
}


/* v1.17 category content owned by the archive widget ---------------------
   Both WooCommerce's native product-category description and the existing
   ZDOORS second text now live inside the same AJAX-replaced widget root. */
.zdpc-widget--grid .zdpc-category-content {
    width: 100%;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
    color: #343b39;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.zdpc-widget--grid .zdpc-category-content > :first-child,
.zdpc-widget--grid .zdpc-category-content .product-cat-second-text > :first-child {
    margin-top: 0;
}

.zdpc-widget--grid .zdpc-category-content > :last-child,
.zdpc-widget--grid .zdpc-category-content .product-cat-second-text > :last-child {
    margin-bottom: 0;
}

.zdpc-widget--grid .zdpc-category-content p,
.zdpc-widget--grid .zdpc-category-content ul,
.zdpc-widget--grid .zdpc-category-content ol,
.zdpc-widget--grid .zdpc-category-content h2,
.zdpc-widget--grid .zdpc-category-content h3,
.zdpc-widget--grid .zdpc-category-content h4 {
    max-width: 100%;
}

.zdpc-widget--grid .zdpc-category-content a {
    text-underline-offset: 2px;
}

.zdpc-widget--grid .zdpc-category-content--primary,
.zdpc-widget--grid .zdpc-category-content--secondary {
    margin-bottom: var(--zdpc-archive-section-gap, 20px);
}

.zdpc-widget--grid .zdpc-category-content--secondary .product-cat-second-text {
    margin: 0 !important;
}

@media (max-width: 767px) {
    .zdpc-widget--grid .zdpc-category-content {
        line-height: 1.6;
    }
}


/* v1.17.2 archive layout refinements --------------------------------------
   Bottom category copy sits outside the sidebar/grid shell at full width,
   the sticky filter rail keeps a deliberate viewport offset, and the mobile
   toolbar gets a clearer, touch-friendly filter control with real spacing. */
.zdpc-widget--grid .zdpc-category-content--primary {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 32px;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

.zdpc-widget--grid .zdpc-category-content--primary .term-description,
.zdpc-widget--grid .zdpc-category-content--primary > * {
    max-width: 100% !important;
}

.zdpc-widget--grid .zdpc-filter-sidebar {
    top: calc(var(--zdpc-filter-sticky-top, 32px) + env(safe-area-inset-top, 0px));
}

@media (max-width: 767px) {
    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-archive-toolbar {
        row-gap: 12px !important;
        margin-bottom: 16px !important;
    }

    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-archive-toolbar__primary,
    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-archive-toolbar__secondary {
        width: 100% !important;
        gap: 10px !important;
    }

    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-archive-toolbar__primary {
        justify-content: space-between !important;
    }

    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-archive-count {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
        font-size: 13px;
        line-height: 1.35;
    }

    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-filter-toggle {
        order: 2;
        flex: 0 0 auto;
        min-width: 118px !important;
        min-height: 44px !important;
        padding: 0 14px !important;
        border: 1px solid var(--zdpc-advanced-accent) !important;
        border-radius: 12px !important;
        background: var(--zdpc-advanced-accent) !important;
        color: #fff !important;
        box-shadow: 0 5px 14px rgba(6, 62, 56, .12) !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        line-height: 1 !important;
    }

    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-filter-toggle:hover,
    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-filter-toggle:focus-visible {
        background: color-mix(in srgb, var(--zdpc-advanced-accent) 92%, black) !important;
        color: #fff !important;
    }

    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-filter-toggle__icon::before,
    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-filter-toggle__icon::after {
        background: var(--zdpc-advanced-accent);
    }

    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-filter-count {
        min-width: 21px;
        height: 21px;
        padding: 0 6px;
        border: 1px solid rgba(255,255,255,.72) !important;
        background: #fff !important;
        color: var(--zdpc-advanced-accent) !important;
        font-size: 10px;
        font-weight: 800;
    }

    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-archive-toolbar__secondary {
        justify-content: stretch !important;
    }

    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-ordering {
        width: 100% !important;
        flex: 1 1 100% !important;
    }

    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-ordering select.orderby {
        width: 100% !important;
        min-height: 44px !important;
        border-radius: 12px !important;
        padding-inline: 12px !important;
    }

    .zdpc-widget--grid.zdpc-advanced-grid .zdpc-filter-chips {
        margin: 2px 0 16px !important;
        padding-bottom: 4px !important;
    }

    .zdpc-widget--grid .zdpc-category-content--primary {
        margin-top: 24px;
        margin-bottom: 20px;
    }
}


/* v1.17.3 mobile filter readability + unconditional empty archive width --- */
@media (max-width: 767px) {
    .zdpc-widget--grid .zdpc-filter-drawer__header {
        padding: 18px 18px 14px;
        font-size: 18px;
        line-height: 1.25;
    }

    .zdpc-widget--grid .zdpc-filter-drawer .zdpc-filter-block__toggle,
    .zdpc-widget--grid .zdpc-filter-drawer .zdpc-filter-block__title {
        min-height: 46px !important;
        padding: 11px 12px !important;
        font-size: 15px !important;
        line-height: 1.3 !important;
    }

    .zdpc-widget--grid .zdpc-filter-drawer .zdpc-filter-block__body {
        padding: 2px 12px 12px !important;
    }

    .zdpc-widget--grid .zdpc-filter-drawer .zdpc-filter-option {
        min-height: 39px !important;
        padding: 7px 2px !important;
        gap: 10px !important;
        font-size: 14px !important;
        line-height: 1.4 !important;
    }

    .zdpc-widget--grid .zdpc-filter-drawer .zdpc-filter-option input {
        width: 18px !important;
        height: 18px !important;
    }

    .zdpc-widget--grid .zdpc-filter-drawer .zdpc-filter-option__count {
        font-size: 12px !important;
        line-height: 1.2 !important;
    }

    .zdpc-widget--grid .zdpc-filter-drawer .zdpc-filter-select,
    .zdpc-widget--grid .zdpc-filter-drawer .zdpc-price-filter input {
        min-height: 44px !important;
        font-size: 14px !important;
    }

    .zdpc-widget--grid .zdpc-filter-drawer .zdpc-price-filter label {
        font-size: 12.5px !important;
    }

    .zdpc-widget--grid .zdpc-filter-drawer__footer {
        gap: 10px;
    }

    .zdpc-widget--grid .zdpc-filter-drawer__footer .zdpc-filter-clear,
    .zdpc-widget--grid .zdpc-filter-drawer__footer .zdpc-filter-apply {
        min-height: 46px;
        font-size: 14px;
    }
}

/* Elementor flex containers can preserve a saved widget width even when the
   current archive is empty. Explicit flex-basis/grow values make the empty
   state occupy the entire available archive row. */
.elementor-element.elementor-widget-zdoors-product-cards:has(> .elementor-widget-container > .zdpc-empty-category),
.elementor-element.elementor-widget-zdoors-product-cards:has(.zdpc-empty-category) {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    flex-basis: 100% !important;
    align-self: stretch !important;
    --width: 100% !important;
}

.elementor-element.elementor-widget-zdoors-product-cards:has(.zdpc-empty-category) > .elementor-widget-container,
.zdpc-widget--grid.zdpc-empty-category,
.zdpc-widget--grid.zdpc-empty-category .zdpc-viewport,
.zdpc-widget--grid.zdpc-empty-category .zdpc-empty--archive {
    width: 100% !important;
    max-width: 100% !important;
}
