/* =========================================================
   Beo Pelet Shop Catalog v1.6.0
   Scope: .bpsc-catalog only
   ========================================================= */



/* Catalog controls: server-rendered, progressively enhanced with REST/fetch. */
.bpsc-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.bpsc-controls__form {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    /* justify-content: flex-end; */
    gap: 10px;
    width: 100%;
    margin: 0;
}

.bpsc-search {
    position: relative;
    display: flex;
    align-items: center;
    width: min(260px, 100%);
}

.bpsc-search__icon {
    position: absolute;
    left: 13px;
    width: 15px;
    height: 15px;
    pointer-events: none;
    border: 1.8px solid #8f8780;
    border-radius: 50%;
}

.bpsc-search__icon::after {
    content: "";
    position: absolute;
    right: -5px;
    bottom: -3px;
    width: 6px;
    height: 1.8px;
    background: #8f8780;
    border-radius: 999px;
    transform: rotate(45deg);
    transform-origin: center;
}

.bpsc-search__input {
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 8px 36px 8px 38px;
    color: #24211f;
    background-color: #fff;
    border: 1px solid #ded3ca;
    border-radius: 9px;
    font: inherit;
    font-size: 13.5px;
    line-height: 1.2;
    -webkit-appearance: none;
    appearance: none;
}

.bpsc-search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.bpsc-search__input:hover {
    border-color: #cbbcaf;
}

.bpsc-search__input:focus {
    outline: 2px solid rgba(216, 90, 19, .18);
    outline-offset: 2px;
    border-color: #d85a13;
}

.bpsc-search__clear {
    position: absolute;
    right: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    margin: 0;
    padding: 0;
    color: #817871;
    background: transparent;
    border: 0;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.bpsc-search__clear:hover,
.bpsc-search__clear:focus-visible {
    color: #24211f;
    background: #f5eee8;
}

.bpsc-search__clear.is-hidden {
    display: none;
}

.bpsc-sort {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
}

.bpsc-sort__select {
    width: auto;
    min-width: 220px;
    min-height: 42px;
    margin: 0;
    padding: 8px 38px 8px 13px;
    color: #24211f;
    background-color: #fff;
    border: 1px solid #ded3ca;
    border-radius: 9px;
    font: inherit;
    font-size: 13.5px;
    line-height: 1.2;
    cursor: pointer;
}

.bpsc-sort__select:hover {
    border-color: #cbbcaf;
}

.bpsc-sort__select:focus {
    outline: 2px solid rgba(216, 90, 19, .18);
    outline-offset: 2px;
    border-color: #d85a13;
}

.bpsc-sort__submit {
    min-height: 42px;
    margin-left: 8px;
    padding: 8px 14px;
    border: 1px solid #d85a13;
    border-radius: 9px;
    color: #fff;
    background: #d85a13;
    font-weight: 700;
}

/* Dynamic result count shown in the Divi control row. */
.bpsc-result-count {
    display: inline-block;
    color: #736c66;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

.bpsc-catalog {
    --bpsc-accent: #d85a13;
    --bpsc-accent-hover: #bd4d0d;
    --bpsc-text: #24211f;
    --bpsc-muted: #736c66;
    --bpsc-border: #eaded4;
    --bpsc-soft: #fbf6f1;
    --bpsc-green: #247a45;
    --bpsc-green-soft: #edf7f0;
    --bpsc-sale: #c94632;
    --bpsc-star: #e0a11a;
    position: relative;
    width: 100%;
}

.bpsc-catalog::before,
.bpsc-catalog::after {
    pointer-events: none;
    opacity: 0;
    transition: opacity .16s ease;
}

.bpsc-catalog::after {
    content: "";
    position: absolute;
    z-index: 20;
    inset: 0;
    background: rgba(255, 255, 255, .52);
}

.bpsc-catalog::before {
    content: "";
    position: absolute;
    z-index: 21;
    top: 24px;
    left: 50%;
    width: 28px;
    height: 28px;
    margin-left: -14px;
    border: 3px solid rgba(216, 90, 19, .18);
    border-top-color: var(--bpsc-accent);
    border-radius: 50%;
    animation: bpsc-spin .7s linear infinite;
}

.bpsc-catalog.is-loading::before,
.bpsc-catalog.is-loading::after {
    opacity: 1;
}

@keyframes bpsc-spin {
    to { transform: rotate(360deg); }
}

.bpsc-catalog,
.bpsc-catalog * {
    box-sizing: border-box;
}

.bpsc-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.bpsc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--bpsc-border);
    border-radius: 14px;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.bpsc-card:hover {
    transform: translateY(-2px);
    border-color: #dfcbbb;
    box-shadow: 0 10px 28px rgba(50, 38, 28, .07);
}

.bpsc-card__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    min-height: 0;
    padding: 22px;
    overflow: hidden;
    /*background: var(--bpsc-soft); */
}

.bpsc-card__image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.bpsc-card__image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    object-fit: contain;
    transition: transform .25s ease;
}

.bpsc-card:hover .bpsc-card__image {
    transform: scale(1.025);
}

.bpsc-badge {
    position: absolute;
    z-index: 2;
    top: 13px;
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .015em;
    white-space: nowrap;
}

.bpsc-badge--quality {
    left: 13px;
    color: var(--bpsc-green);
    background: var(--bpsc-green-soft);
    border: 1px solid rgba(36, 122, 69, .18);
}

.bpsc-badge--sale {
    right: 13px;
    color: #fff;
    background: var(--bpsc-sale);
    border: 1px solid var(--bpsc-sale);
}

.bpsc-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 19px;
}

.bpsc-catalog .bpsc-card__title {
    margin: 0 0 8px !important;
    padding: 0 !important;
    color: var(--bpsc-text) !important;
    font-size: 18px !important;
    line-height: 1.28 !important;
    font-weight: 700 !important;
    letter-spacing: -.012em;
}

.bpsc-card__title a {
    color: inherit !important;
    text-decoration: none !important;
}

.bpsc-card__title a:hover {
    color: var(--bpsc-accent) !important;
}

.bpsc-card__meta {
    min-height: 20px;
    margin: 0 0 16px;
    color: var(--bpsc-muted);
    font-size: 13px;
    line-height: 1.45;
}

.bpsc-card__prices {
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding-top: 2px;
}

.bpsc-price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #f0e7df;
}

.bpsc-price-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.bpsc-price-row__label {
    min-width: 0;
    color: var(--bpsc-muted);
    font-size: 12.5px;
    line-height: 1.3;
    font-weight: 600;
}

.bpsc-price-row__prices {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 5px 7px;
    text-align: right;
}

.bpsc-price-row__regular,
.bpsc-price-row__regular .woocommerce-Price-amount {
    color: #99918b !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
}

.bpsc-price-row__current,
.bpsc-price-row__current .woocommerce-Price-amount {
    color: var(--bpsc-text) !important;
    font-size: 18px !important;
    line-height: 1.15 !important;
    font-weight: 750 !important;
    white-space: nowrap;
}

.bpsc-card__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 10px;
    min-height: 27px;
    margin-top: 13px;
}

.bpsc-stock {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--bpsc-muted);
    font-size: 12.5px;
    line-height: 1.3;
    font-weight: 600;
}

.bpsc-stock__dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #9d9690;
}

.bpsc-stock.is-in-stock {
    color: var(--bpsc-green);
}

.bpsc-stock.is-in-stock .bpsc-stock__dot {
    background: var(--bpsc-green);
}

.bpsc-stock.is-out-of-stock {
    color: var(--bpsc-sale);
}

.bpsc-stock.is-out-of-stock .bpsc-stock__dot {
    background: var(--bpsc-sale);
}

.bpsc-rating {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--bpsc-muted);
    font-size: 12px;
    line-height: 1;
}

.bpsc-rating__stars {
    position: relative;
    display: inline-block;
    overflow: hidden;
    font-family: Arial, sans-serif;
    font-size: 13px;
    line-height: 1;
    letter-spacing: 1px;
    white-space: nowrap;
}

.bpsc-rating__stars-bg {
    color: #dfd8d2;
}

.bpsc-rating__stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    overflow: hidden;
    color: var(--bpsc-star);
    white-space: nowrap;
}

.bpsc-rating__value {
    color: var(--bpsc-text);
    font-weight: 700;
}

.bpsc-card__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    margin-top: 15px;
    padding: 10px 14px;
    color: #fff !important;
    background: var(--bpsc-accent);
    border: 1px solid var(--bpsc-accent);
    border-radius: 9px;
    font-size: 13.5px;
    line-height: 1.2;
    font-weight: 700;
    text-decoration: none !important;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.bpsc-card__cta:hover {
    color: #fff !important;
    background: var(--bpsc-accent-hover);
    border-color: var(--bpsc-accent-hover);
}

.bpsc-card__cta-arrow {
    font-size: 16px;
    line-height: 1;
    transition: transform .2s ease;
}

.bpsc-card__cta:hover .bpsc-card__cta-arrow {
    transform: translateX(2px);
}

.bpsc-empty {
    width: 100%;
    padding: 24px;
    color: #736c66;
    background: #fbf6f1;
    border: 1px solid #eaded4;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

/* Load More + crawlable no-JS pagination fallback. */
.bpsc-load-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 28px;
}

.bpsc-load-more.is-hidden {
    display: none !important;
}

.bpsc-load-more__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 250px;
    min-height: 48px;
    padding: 11px 22px;
    color: #fff !important;
    background: var(--bpsc-accent) !important;
    border: 1px solid var(--bpsc-accent) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease, opacity .2s ease;
}

.bpsc-load-more__button:hover:not(:disabled) {
    background: var(--bpsc-accent-hover) !important;
    border-color: var(--bpsc-accent-hover) !important;
    transform: translateY(-1px);
}

.bpsc-load-more__button:focus-visible {
    outline: 3px solid rgba(216, 90, 19, .22);
    outline-offset: 3px;
}

.bpsc-load-more__button:disabled {
    cursor: wait;
    opacity: .72;
}

.bpsc-load-more__button.is-hidden {
    display: none !important;
}

.bpsc-load-more__button.is-loading .bpsc-load-more__arrow {
    animation: bpsc-load-pulse .8s ease-in-out infinite alternate;
}

@keyframes bpsc-load-pulse {
    to { transform: translateY(3px); }
}

.bpsc-load-more__progress {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--bpsc-muted) !important;
    font-size: 12.5px !important;
    line-height: 1.4 !important;
    text-align: center;
}

.bpsc-pagination-fallback {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) auto minmax(100px, 1fr);
    align-items: center;
    gap: 14px;
    width: min(560px, 100%);
    margin-top: 4px;
}

.bpsc-pagination-fallback__link {
    color: var(--bpsc-accent) !important;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
    text-decoration: none !important;
}

.bpsc-pagination-fallback__link:last-child {
    text-align: right;
}

.bpsc-pagination-fallback__status {
    color: var(--bpsc-muted);
    font-size: 12.5px;
    white-space: nowrap;
}

/* With JS, page 1 uses Load More. The real links remain in the HTML for
   no-JS/crawler discovery. Direct entry on a later fallback page keeps nav. */
html.bpsc-js .bpsc-pagination-fallback {
    display: none;
}

html.bpsc-js .bpsc-load-more.is-paged-entry .bpsc-pagination-fallback {
    display: grid;
}

html.bpsc-js .bpsc-load-more.is-paged-entry .bpsc-load-more__button {
    display: none !important;
}

/* Large desktop: 4 cards. Smaller desktop: 3. Tablet: 2. */
@media (max-width: 1279px) {
    .bpsc-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .bpsc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

/* Mobile controls. */
@media (max-width: 767px) {
    .bpsc-controls,
    .bpsc-sort {
        width: 100%;
        justify-content: stretch;
    }

    .bpsc-sort__select {
        width: 100%;
        min-width: 0;
    }
}

/* Mobile: intentionally keep 2 compact cards per row. */
@media (max-width: 767px) {
    .bpsc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .bpsc-card {
        border-radius: 11px;
    }

    .bpsc-card:hover {
        transform: none;
        box-shadow: none;
    }

    .bpsc-card__media {
        aspect-ratio: 4 / 3;
        padding: 0;

    }

    .bpsc-badge {
        top: 7px;
        min-height: 22px;
        padding: 4px 6px;
        font-size: 9px;
    }

    .bpsc-badge--quality {
        left: 7px;
    }

    .bpsc-badge--sale {
        right: 7px;
    }

    .bpsc-card__body {
        padding: 11px;
    }

    .bpsc-catalog .bpsc-card__title {
        margin-bottom: 6px !important;
        font-size: 14px !important;
        line-height: 1.28 !important;
    }

    .bpsc-card__meta {
        min-height: 0;
        margin-bottom: 10px;
        font-size: 10.5px;
        line-height: 1.35;
    }

    /* Mobile product cards stay in the existing 2-column product grid, while
       bag and pallet prices sit next to each other inside each card. */
    .bpsc-card__prices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        border-top: 1px solid #f0e7df;
        padding-top: 8px;
    }

    .bpsc-price-row {
        display: block;
        min-width: 0;
        padding: 0 7px 0 0;
        border-top: 0;
    }

    .bpsc-price-row + .bpsc-price-row {
        padding-right: 0;
        padding-left: 7px;
        border-left: 1px solid #f0e7df;
    }

    .bpsc-price-row:only-child {
        grid-column: 1 / -1;
        padding-right: 0;
    }

    .bpsc-price-row__label {
        display: block;
        min-height: 2.5em;
        margin-bottom: 3px;
        font-size: 9.5px;
        line-height: 1.25;
    }

    .bpsc-price-row__prices {
        display: block;
        min-width: 0;
        text-align: left;
    }

    .bpsc-price-row__regular,
    .bpsc-price-row__regular .woocommerce-Price-amount {
        display: block;
        margin-bottom: 2px;
        font-size: 9.5px !important;
    }

    .bpsc-price-row__current,
    .bpsc-price-row__current .woocommerce-Price-amount {
        font-size: 11px !important;
        letter-spacing: -.03em;
    }

    .bpsc-card__footer {
        display: block;
        min-height: 0;
        margin-top: 9px;
    }

    .bpsc-stock {
        font-size: 10.5px;
    }

    .bpsc-rating {
        margin-top: 6px;
        font-size: 10px;
    }

    .bpsc-rating__stars {
        font-size: 10px;
    }

    .bpsc-card__cta {
        min-height: 36px;
        margin-top: 10px;
        padding: 7px 6px;
        border-radius: 7px;
        font-size: 10.5px;
    }

    .bpsc-card__cta-arrow {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bpsc-catalog::before {
        animation: none;
    }

    .bpsc-card,
    .bpsc-card__image,
    .bpsc-card__cta,
    .bpsc-card__cta-arrow {
        transition: none;
    }
}


/* v1.4.0 search/control responsiveness. Final visual polishing remains in Divi pass. */
@media (max-width: 767px) {
    .bpsc-controls__form {
        justify-content: stretch;
    }

    .bpsc-search,
    .bpsc-sort,
    .bpsc-sort__select {
        width: 100%;
    }

    .bpsc-sort__select {
        min-width: 0;
    }
}

/* =========================================================
   Beo Pelet Shop Catalog v1.7.0
   Responsive professional filter UI + body portal layer.
   The popup/drawer is moved to <body> by JS while open so
   Divi rows/columns cannot intercept pointer events or clip it.
   ========================================================= */

.bpsc-controls {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.bpsc-controls__form {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    /*justify-content: flex-end; */
    gap: 10px;
    width: 100%;
    margin: 0 !important;
}

.bpsc-controls .bpsc-search {
    position: relative;
    display: flex;
    align-items: center;
    width: min(270px, 100%);
}

.bpsc-controls input.bpsc-search__input {
    width: 100% !important;
    min-height: 30px !important;
    margin: 0 !important;
    padding: 9px 39px 9px 39px !important;
    color: #24211f !important;
    background: #fff !important;
    border: 1px solid #ded3ca !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 13.5px !important;
    line-height: 1.2 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.bpsc-controls input.bpsc-search__input:hover {
    border-color: #cbbcaf !important;
}

.bpsc-controls input.bpsc-search__input:focus {
    outline: 2px solid rgba(216, 90, 19, .16) !important;
    outline-offset: 2px !important;
    border-color: #d85a13 !important;
}

.bpsc-search__icon {
    z-index: 2;
    left: 14px;
}

.bpsc-controls button.bpsc-search__clear {
    position: absolute !important;
    z-index: 3;
    right: 8px !important;
    top: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #817871 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 20px !important;
    line-height: 1 !important;
    transform: translateY(-50%) !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.bpsc-controls button.bpsc-search__clear:hover,
.bpsc-controls button.bpsc-search__clear:focus-visible {
    color: #24211f !important;
    background: #f5eee8 !important;
}

.bpsc-controls button.bpsc-search__clear.is-hidden {
    display: none !important;
}

.bpsc-controls .bpsc-sort {
    display: flex;
    align-items: center;
    width: auto;
    margin: 0 !important;
}

.bpsc-controls select.bpsc-sort__select {
    width: auto !important;
    min-width: 220px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 9px 38px 9px 14px !important;
    color: #24211f !important;
    background-color: #fff !important;
    border: 1px solid #ded3ca !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
}

.bpsc-controls select.bpsc-sort__select:hover {
    border-color: #cbbcaf !important;
}

.bpsc-controls select.bpsc-sort__select:focus {
    outline: 2px solid rgba(216, 90, 19, .16) !important;
    outline-offset: 2px !important;
    border-color: #d85a13 !important;
}

.bpsc-filter-details {
    position: relative;
    width: auto;
    margin: 0 !important;
    padding: 0 !important;
}

.bpsc-filter-trigger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    width: auto;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 9px 14px !important;
    color: #24211f !important;
    background: #fff !important;
    border: 1px solid #d85a13 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 650 !important;
    cursor: pointer !important;
    list-style: none !important;
    user-select: none;
}

.bpsc-filter-trigger::-webkit-details-marker { display: none; }
.bpsc-filter-trigger::marker { content: ""; display: none; }

.bpsc-filter-trigger:hover,
.bpsc-filter-details[open] > .bpsc-filter-trigger {
    color: #bd4d0d !important;
    background: #fbf6f1 !important;
    border-color: #bd4d0d !important;
}

.bpsc-filter-trigger:focus-visible {
    outline: 2px solid rgba(216, 90, 19, .18) !important;
    outline-offset: 2px !important;
}

.bpsc-filter-trigger__icon {
    color: #d85a13;
    font-size: 16px;
    line-height: 1;
    transform: rotate(90deg);
}

.bpsc-filter-trigger__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    color: #fff;
    background: #d85a13;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    font-weight: 750;
}

.bpsc-filter-trigger__count.is-hidden { display: none; }

/* Hidden at its original Divi DOM position. While open JS moves it directly
   under <body> and applies .is-portal-open. */
.bpsc-filter-panel {
    display: none;
    box-sizing: border-box;
    flex-direction: column;
    overflow: hidden;
    color: #24211f;
    background: #fff;
    border: 1px solid #e7dcd3;
    border-radius: 15px;
    box-shadow: 0 20px 54px rgba(47, 35, 26, .16);
}

body > .bpsc-filter-panel.is-portal-open {
    position: fixed !important;
    z-index: 2147483000 !important;
    display: flex !important;
    width: min(390px, calc(100vw - 32px));
    max-height: min(650px, calc(100dvh - 32px));
    pointer-events: auto !important;
    isolation: isolate;
}

.bpsc-filter-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 0 0 auto;
    padding: 17px 18px 14px;
    background: #fff;
    border-bottom: 1px solid #f0e7df;
}

.bpsc-filter-panel__header strong {
    margin: 0 !important;
    color: #24211f !important;
    font-size: 16px !important;
    line-height: 1.25 !important;
    font-weight: 750 !important;
}

.bpsc-filter-panel__header-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.bpsc-filter-panel button.bpsc-filter-reset,
.bpsc-filter-panel button.bpsc-filter-close,
.bpsc-filter-panel button.bpsc-filter-apply {
    font-family: inherit !important;
    box-shadow: none !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.bpsc-filter-panel button.bpsc-filter-reset {
    margin: 0 !important;
    padding: 6px 8px !important;
    color: #736c66 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 7px !important;
    font-size: 12.5px !important;
    line-height: 1.2 !important;
    font-weight: 650 !important;
}

.bpsc-filter-panel button.bpsc-filter-reset:hover,
.bpsc-filter-panel button.bpsc-filter-reset:focus-visible {
    color: #d85a13 !important;
    background: #fbf6f1 !important;
}

.bpsc-filter-panel button.bpsc-filter-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #736c66 !important;
    background: #f8f3ef !important;
    border: 0 !important;
    border-radius: 50% !important;
    font-size: 21px !important;
    line-height: 1 !important;
}

.bpsc-filter-panel button.bpsc-filter-close:hover,
.bpsc-filter-panel button.bpsc-filter-close:focus-visible {
    color: #24211f !important;
    background: #efe4db !important;
}

.bpsc-filter-panel__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 18px 10px;
    scrollbar-width: thin;
    scrollbar-color: #d7c9bd transparent;
}

.bpsc-filter-group {
    min-width: 0;
    margin: 0 !important;
    padding: 15px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #f0e7df !important;
}

.bpsc-filter-group:last-child { border-bottom: 0 !important; }

.bpsc-filter-group__title {
    float: none !important;
    width: 100% !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    color: #24211f !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    font-weight: 750 !important;
}

.bpsc-filter-group__options {
    display: grid;
    gap: 2px;
}

/* True native checkbox + label. No JS click simulation. */
body .bpsc-filter-panel label.bpsc-filter-option {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
    width: 100% !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 7px 7px !important;
    color: #403b37 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 9px !important;
    font-size: 13.5px !important;
    line-height: 1.35 !important;
    cursor: pointer !important;
    user-select: none;
    pointer-events: auto !important;
    touch-action: manipulation;
}

body .bpsc-filter-panel label.bpsc-filter-option:hover {
    background: #fbf6f1 !important;
}

body .bpsc-filter-panel label.bpsc-filter-option > input.bpsc-filter-option__input[type="checkbox"] {
    -webkit-appearance: checkbox !important;
    appearance: auto !important;
    display: inline-block !important;
    flex: 0 0 19px !important;
    width: 19px !important;
    height: 19px !important;
    min-width: 19px !important;
    min-height: 19px !important;
    max-width: 19px !important;
    max-height: 19px !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    inset: auto !important;
    clip: auto !important;
    clip-path: none !important;
    transform: none !important;
    pointer-events: auto !important;
    z-index: 1 !important;
    accent-color: #d85a13;
    cursor: pointer !important;
}

body .bpsc-filter-panel label.bpsc-filter-option > input.bpsc-filter-option__input[type="checkbox"]:focus-visible {
    outline: 2px solid rgba(216, 90, 19, .26) !important;
    outline-offset: 2px !important;
}

.bpsc-filter-option__label {
    flex: 1 1 auto;
    min-width: 0;
}

.bpsc-filter-panel__footer {
    display: none;
    flex: 0 0 auto;
    padding: 13px 16px 16px;
    background: #fff;
    border-top: 1px solid #f0e7df;
}

.bpsc-filter-panel button.bpsc-filter-apply {
    width: 100% !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 11px 16px !important;
    color: #fff !important;
    background: #d85a13 !important;
    border: 1px solid #d85a13 !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 750 !important;
}

.bpsc-filter-panel button.bpsc-filter-apply:hover,
.bpsc-filter-panel button.bpsc-filter-apply:focus-visible {
    color: #fff !important;
    background: #bd4d0d !important;
    border-color: #bd4d0d !important;
}

/* Active filters are moved by JS to the one-column grid Code module, directly
   before the catalog. This prevents the 30/70 Divi control row from squeezing
   chips beside the search field on mobile. */
.bpsc-active-filters {
    display: none;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px 10px;
    width: 100%;
    margin: 0 0 16px !important;
    padding: 0 !important;
}

.bpsc-active-filters.is-visible { display: flex; }

.bpsc-active-filters__chips {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 7px;
}

.bpsc-active-filters button.bpsc-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-height: 32px !important;
    margin: 0 !important;
    padding: 6px 10px !important;
    color: #554c46 !important;
    background: #fbf6f1 !important;
    border: 1px solid #e5d6cb !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.bpsc-active-filters button.bpsc-chip:hover,
.bpsc-active-filters button.bpsc-chip:focus-visible {
    color: #bd4d0d !important;
    background: #fff7f1 !important;
    border-color: #dfc1ab !important;
}

.bpsc-active-filters button.bpsc-active-filters__clear {
    margin: 0 !important;
    padding: 6px 4px !important;
    color: #736c66 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    font-weight: 650 !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.bpsc-active-filters button.bpsc-active-filters__clear:hover,
.bpsc-active-filters button.bpsc-active-filters__clear:focus-visible {
    color: #d85a13 !important;
}

/* Real viewport overlay exists only on mobile. */
.bpsc-filter-overlay {
    position: fixed !important;
    z-index: 2147482990 !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(30, 24, 20, .48) !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: default !important;
    backdrop-filter: blur(1.5px);
    -webkit-appearance: none !important;
    appearance: none !important;
}

/* Tablet: search gets its own row; Sort + Filter share the second row. */
@media (min-width: 768px) and (max-width: 1024px) {
    .bpsc-controls__form {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(180px, .55fr);
        gap: 10px !important;
        width: 100% !important;
    }

    .bpsc-controls .bpsc-search {
        grid-column: 1 / -1;
        width: 100% !important;
    }

    .bpsc-controls .bpsc-sort,
    .bpsc-controls .bpsc-filter-details,
    .bpsc-controls select.bpsc-sort__select,
    .bpsc-filter-trigger {
        width: 100% !important;
        min-width: 0 !important;
    }

    body > .bpsc-filter-panel.is-portal-open.is-desktop-popover {
        width: min(430px, calc(100vw - 32px));
    }

    body .bpsc-filter-panel label.bpsc-filter-option {
        min-height: 44px !important;
        font-size: 14px !important;
    }
}

/* Mobile: professional stacked controls + full-width bottom drawer. */
@media (max-width: 767px) {
    html.bpsc-filter-lock,
    body.bpsc-filter-lock {
        overflow: hidden !important;
        overscroll-behavior: none;
    }

    .bpsc-controls__form {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, .72fr);
        gap: 9px !important;
        width: 100% !important;
    }

    .bpsc-controls .bpsc-search {
        grid-column: 1 / -1;
        width: 100% !important;
    }

    .bpsc-controls .bpsc-sort,
    .bpsc-controls .bpsc-filter-details {
        width: 100% !important;
        min-width: 0 !important;
    }

    .bpsc-controls select.bpsc-sort__select,
    .bpsc-filter-trigger {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 46px !important;
        font-size: 13.5px !important;
    }

    .bpsc-filter-trigger {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    body > .bpsc-filter-panel.is-portal-open.is-mobile-drawer {
        top: auto !important;
        right: 8px !important;
        bottom: max(8px, env(safe-area-inset-bottom)) !important;
        left: 8px !important;
        width: auto !important;
        max-height: min(90dvh, 760px) !important;
        border-radius: 19px !important;
        box-shadow: 0 24px 80px rgba(28, 20, 15, .30) !important;
    }

    .bpsc-filter-panel__header {
        padding: 16px 16px 13px;
    }

    .bpsc-filter-panel__header strong {
        font-size: 17px !important;
    }

    .bpsc-filter-panel__body {
        padding: 3px 14px 8px;
    }

    .bpsc-filter-group {
        padding: 14px 0 !important;
    }

    .bpsc-filter-group__title {
        margin-bottom: 7px !important;
        font-size: 13.5px !important;
    }

    body .bpsc-filter-panel label.bpsc-filter-option {
        min-height: 46px !important;
        padding: 9px 7px !important;
        font-size: 14px !important;
    }

    body .bpsc-filter-panel label.bpsc-filter-option > input.bpsc-filter-option__input[type="checkbox"] {
        flex-basis: 21px !important;
        width: 21px !important;
        height: 21px !important;
        min-width: 21px !important;
        min-height: 21px !important;
        max-width: 21px !important;
        max-height: 21px !important;
    }

    .bpsc-filter-panel__footer {
        display: block !important;
        padding: 13px 14px max(14px, env(safe-area-inset-bottom));
    }

    .bpsc-active-filters {
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 15px !important;
    }

    .bpsc-active-filters__chips {
        width: 100%;
        gap: 7px;
    }

    .bpsc-active-filters button.bpsc-chip {
        min-height: 34px !important;
        padding: 7px 10px !important;
        font-size: 12px !important;
    }

    .bpsc-active-filters button.bpsc-active-filters__clear {
        flex: 0 0 100%;
        padding: 4px 2px !important;
        text-align: left;
    }
}

@media (max-width: 390px) {
    .bpsc-controls__form {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
        gap: 8px !important;
    }

    .bpsc-filter-trigger__icon {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bpsc-filter-panel,
    .bpsc-filter-overlay {
        scroll-behavior: auto;
    }
}

/* =========================================================
   Beo Pelet Shop Catalog v1.9.0
   Mobile commerce toolbar: Search + Sortiraj + Filteri.
   Sortiranje dobija sopstveni portal bottom-sheet na telefonu.
   ========================================================= */

.bpsc-sort-mobile-trigger,
.bpsc-sort-panel {
    display: none;
}

.bpsc-sort-mobile-trigger {
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-height: 30px !important;
    margin: 0 !important;
    padding: 6px 6px !important;
    color: #24211f !important;
    background: #fff !important;
    border: 1px solid #ded3ca !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 650 !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.bpsc-sort-mobile-trigger:hover,
.bpsc-sort-mobile-trigger:focus-visible,
.bpsc-sort-mobile-trigger.is-active {
    border-color: #cbbcaf !important;
    background: #fbf8f5 !important;
}

.bpsc-sort-mobile-trigger:focus-visible {
    outline: 2px solid rgba(216, 90, 19, .18) !important;
    outline-offset: 2px !important;
}

.bpsc-sort-mobile-trigger__icon,
.bpsc-filter-trigger__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #d85a13;
    transform: none !important;
}

.bpsc-sort-mobile-trigger__dot {
    width: 7px;
    height: 7px;
    margin-left: 1px;
    background: #d85a13;
    border-radius: 50%;
}

.bpsc-sort-mobile-trigger__dot.is-hidden {
    display: none;
}

.bpsc-sort-panel {
    box-sizing: border-box;
    flex-direction: column;
    overflow: hidden;
    color: #24211f;
    background: #fff;
    border: 1px solid #e7dcd3;
    border-radius: 19px;
    box-shadow: 0 24px 80px rgba(28, 20, 15, .30);
}

body > .bpsc-sort-panel.is-portal-open.is-mobile-sheet {
    position: fixed !important;
    z-index: 2147483000 !important;
    right: 8px !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    display: flex !important;
    width: auto !important;
    max-height: min(72dvh, 620px) !important;
    pointer-events: auto !important;
    isolation: isolate;
}

.bpsc-sort-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 0 0 auto;
    padding: 17px 16px 14px;
    background: #fff;
    border-bottom: 1px solid #f0e7df;
}

.bpsc-sort-panel__header strong {
    margin: 0 !important;
    color: #24211f !important;
    font-size: 17px !important;
    line-height: 1.25 !important;
    font-weight: 750 !important;
}

.bpsc-sort-panel button.bpsc-sort-panel__close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #736c66 !important;
    background: #f8f3ef !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    font: inherit !important;
    font-size: 22px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.bpsc-sort-panel button.bpsc-sort-panel__close:hover,
.bpsc-sort-panel button.bpsc-sort-panel__close:focus-visible {
    color: #24211f !important;
    background: #f1e9e3 !important;
}

.bpsc-sort-panel__body {
    display: grid;
    gap: 2px;
    margin: 0 !important;
    padding: 7px 10px max(10px, env(safe-area-inset-bottom)) !important;
    border: 0 !important;
    overflow-y: auto;
    overscroll-behavior: contain;
}

body .bpsc-sort-panel label.bpsc-sort-option {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px !important;
    width: 100% !important;
    min-height: 54px !important;
    margin: 0 !important;
    padding: 11px 10px !important;
    color: #322e2b !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 11px !important;
    font-size: 14.5px !important;
    line-height: 1.3 !important;
    font-weight: 550 !important;
    cursor: pointer !important;
    user-select: none;
    touch-action: manipulation;
}

body .bpsc-sort-panel label.bpsc-sort-option:hover {
    background: #fbf6f1 !important;
}

.bpsc-sort-option__label {
    flex: 1 1 auto;
    min-width: 0;
}

body .bpsc-sort-panel input.bpsc-sort-option__input[type="radio"] {
    -webkit-appearance: radio !important;
    appearance: auto !important;
    display: inline-block !important;
    flex: 0 0 21px !important;
    width: 21px !important;
    height: 21px !important;
    min-width: 21px !important;
    min-height: 21px !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    accent-color: #d85a13;
    cursor: pointer !important;
}

.bpsc-sort-overlay {
    position: fixed !important;
    z-index: 2147482990 !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(30, 24, 20, .48) !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: default !important;
    backdrop-filter: blur(1.5px);
    -webkit-appearance: none !important;
    appearance: none !important;
}

@media (max-width: 767px) {
    /* Two equal, explicit commerce actions below full-width search. */
    .bpsc-controls__form {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
    }

    .bpsc-controls .bpsc-search {
        grid-column: 1 / -1;
    }

    /* Keep the native select as a no-JS fallback. With JS, show the dedicated
       Sortiraj action and the bottom sheet instead. */
    html.bpsc-js .bpsc-controls select.bpsc-sort__select {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: -1px !important;
        padding: 0 !important;
        overflow: hidden !important;
        clip: rect(0 0 0 0) !important;
        clip-path: inset(50%) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }

    html.bpsc-js .bpsc-sort-mobile-trigger {
        display: inline-flex !important;
    }

    .bpsc-controls .bpsc-sort,
    .bpsc-controls .bpsc-filter-details,
    .bpsc-sort-mobile-trigger,
    .bpsc-filter-trigger {
        width: 100% !important;
        min-width: 0 !important;
    }

    .bpsc-filter-trigger {
        min-height: 30px !important;
        padding: 6px 6px !important;
    }

    .bpsc-load-more {
        margin-top: 22px;
    }

    .bpsc-load-more__button {
        width: 100%;
        min-width: 0;
        min-height: 46px;
    }

    .bpsc-pagination-fallback {
        gap: 8px;
    }

    /* One product should not look like a half-empty two-column grid. As soon as
       more cards exist the mobile catalog returns to the agreed 2-column mode. */
    @supports selector(.bpsc-grid:has(> .bpsc-card:only-child)) {
        .bpsc-grid:has(> .bpsc-card:only-child) {
            grid-template-columns: minmax(0, 1fr) !important;
        }
    }
}

@media (max-width: 390px) {
    .bpsc-sort-mobile-trigger,
    .bpsc-filter-trigger {
        padding-left: 10px !important;
        padding-right: 10px !important;
        font-size: 13.5px !important;
    }
}
