/* ========================================================================
   BARGCHI CUSTOM SHOP
   Minimal, RTL, responsive and intentionally isolated from WoodMart loops.
   ======================================================================== */

.bargchi-shop,
.bargchi-shop * {
    box-sizing: border-box;
}

.bargchi-shop {
    --bs-navy: #102a46;
    --bs-text: #172638;
    --bs-muted: #748090;
    --bs-border: #e5e9ee;
    --bs-border-strong: #d7dde4;
    --bs-soft: #f8fafb;
    --bs-white: #fff;
    --bs-green: #1f8b55;
    --bs-orange: #ef6c24;
    --bs-red: #e6123d;
    width: 100%;
    color: var(--bs-text);
    background: #fff;
    direction: rtl;
}

.bargchi-shop a {
    color: inherit;
    text-decoration: none;
}

.bargchi-shop button,
.bargchi-shop input,
.bargchi-shop select {
    font: inherit;
}

.bargchi-shop__shell {
    width: min(1440px, calc(100% - 48px));
    margin: 0 auto;
    padding: 34px 0 72px;
}

/* Header ---------------------------------------------------------------- */
.bargchi-shop__intro {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--bs-border);
}

.bargchi-shop__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #8b95a1;
    font-size: 12px;
    line-height: 1.7;
}

.bargchi-shop__breadcrumb a:hover {
    color: var(--bs-navy);
}

.bargchi-shop__intro-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
}

.bargchi-shop__intro h1 {
    margin: 0 0 8px;
    color: #13263d;
    font-size: clamp(26px, 2.2vw, 36px);
    font-weight: 850;
    line-height: 1.35;
    letter-spacing: -0.6px;
}

.bargchi-shop__intro p {
    margin: 0;
    color: var(--bs-muted);
    font-size: 13px;
    line-height: 1.9;
}

.bargchi-shop__count {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    flex: 0 0 auto;
    color: #657182;
    font-size: 12px;
}

.bargchi-shop__count strong {
    color: var(--bs-navy);
    font-size: 17px;
    font-weight: 800;
}

/* Layout ---------------------------------------------------------------- */
.bargchi-shop__layout {
    display: grid;
    grid-template-columns: 288px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding-top: 20px;
}

.bargchi-shop__sidebar {
    position: sticky;
    top: 118px;
    max-height: calc(100vh - 138px);
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd3dc transparent;
}

.bargchi-shop__sidebar::-webkit-scrollbar {
    width: 5px;
}

.bargchi-shop__sidebar::-webkit-scrollbar-thumb {
    background: #cbd3dc;
    border-radius: 99px;
}

.bargchi-shop__content {
    min-width: 0;
}

/* Filter form ----------------------------------------------------------- */
.bargchi-shop-filter-form {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid var(--bs-border);
    border-radius: 14px;
    overflow: hidden;
}

.bargchi-shop-filter-form__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 58px;
    padding: 0 18px;
    border-bottom: 1px solid var(--bs-border);
}

.bargchi-shop-filter-form__title strong {
    font-size: 16px;
    font-weight: 800;
}

.bargchi-shop-filter-form__clear {
    color: #7e8996;
    font-size: 11px;
    font-weight: 650;
}

.bargchi-shop-filter-form__clear:hover {
    color: var(--bs-red);
}

.bargchi-shop-filter {
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--bs-border);
}

.bargchi-shop-filter:last-of-type {
    border-bottom: 0;
}

.bargchi-shop-filter > summary {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 0 18px;
    color: #26374b;
    font-size: 13px;
    font-weight: 750;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.bargchi-shop-filter > summary::-webkit-details-marker {
    display: none;
}

.bargchi-shop-filter > summary::after {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-right: 1.5px solid #627083;
    border-bottom: 1.5px solid #627083;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .16s ease;
}

.bargchi-shop-filter[open] > summary::after {
    transform: rotate(225deg) translate(-1px, -1px);
}

.bargchi-shop-filter__active-dot {
    width: 6px;
    height: 6px;
    margin-inline-start: auto;
    background: var(--bs-orange);
    border-radius: 50%;
}

.bargchi-shop-filter__body {
    padding: 0 18px 18px;
}

.bargchi-shop-filter__options {
    display: grid;
    gap: 11px;
    max-height: 260px;
    overflow: auto;
    padding-inline-end: 2px;
    scrollbar-width: thin;
}

.bargchi-shop-filter__option {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    color: #526174;
    font-size: 12px;
    line-height: 1.65;
    cursor: pointer;
}

.bargchi-shop-filter__option input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--bs-navy);
}

.bargchi-shop-filter__option small {
    color: #9aa4af;
    font-size: 10px;
}

.bargchi-shop-filter__select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    color: #445369;
    background: #fff;
    border: 1px solid var(--bs-border-strong);
    border-radius: 9px;
    outline: 0;
}

.bargchi-shop-price__inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 15px;
}

.bargchi-shop-price__field {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 9px;
    background: #fff;
    border: 1px solid var(--bs-border);
    border-radius: 8px;
}

.bargchi-shop-price__field span {
    color: #939da8;
    font-size: 10px;
}

.bargchi-shop-price__field input {
    width: 100%;
    min-width: 0;
    padding: 0;
    color: #3a495c;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 11px;
    text-align: left;
    direction: ltr;
}

.bargchi-shop-price__ranges {
    --price-start: 0%;
    --price-end: 100%;
    position: relative;
    height: 26px;
    margin: 0 4px 6px;
}

.bargchi-shop-price__ranges::before,
.bargchi-shop-price__ranges::after {
    content: "";
    position: absolute;
    top: 12px;
    right: 0;
    left: 0;
    height: 2px;
    border-radius: 99px;
}

.bargchi-shop-price__ranges::before {
    background: #e6eaf0;
}

.bargchi-shop-price__ranges::after {
    right: calc(100% - var(--price-end));
    left: var(--price-start);
    background: var(--bs-navy);
}

.bargchi-shop-price__ranges input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 26px;
    margin: 0;
    padding: 0;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.bargchi-shop-price__ranges input[type="range"]::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    background: var(--bs-navy);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--bs-navy);
    pointer-events: auto;
    -webkit-appearance: none;
    appearance: none;
}

.bargchi-shop-price__ranges input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--bs-navy);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--bs-navy);
    pointer-events: auto;
}

.bargchi-shop-filter-form__actions {
    display: grid;
    gap: 8px;
    padding: 14px 16px 16px;
    border-top: 1px solid var(--bs-border);
}

.bargchi-shop-filter-form__submit {
    min-height: 42px;
    color: #fff;
    background: var(--bs-navy);
    border: 1px solid var(--bs-navy);
    border-radius: 9px;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

/* Toolbar / sort -------------------------------------------------------- */
.bargchi-shop__toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--bs-border);
}

.bargchi-shop__filter-trigger {
    display: none;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 13px;
    color: var(--bs-navy);
    background: #fff;
    border: 1px solid var(--bs-border-strong);
    border-radius: 9px;
    cursor: pointer;
}

.bargchi-shop__filter-trigger svg,
.bargchi-shop__sort-label svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bargchi-shop__filter-trigger i {
    width: 6px;
    height: 6px;
    background: var(--bs-orange);
    border-radius: 50%;
}

.bargchi-shop__sort {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
    flex: 1 1 auto;
}

.bargchi-shop__sort-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    color: #354559;
    font-size: 12px;
    font-weight: 800;
}

.bargchi-shop__sort-scroll {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.bargchi-shop__sort-scroll::-webkit-scrollbar {
    display: none;
}

.bargchi-shop__sort-chip {
    flex: 0 0 auto;
    padding: 8px 9px;
    color: #778392;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
    border-radius: 7px;
}

.bargchi-shop__sort-chip:hover {
    color: var(--bs-navy);
}

.bargchi-shop__sort-chip.is-active {
    color: var(--bs-navy);
    font-weight: 800;
    background: #f4f6f8;
}

.bargchi-shop__meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 2px 12px;
    color: #8a94a0;
    font-size: 10.5px;
}

.bargchi-shop__auto-note::before {
    content: "•";
    margin-inline-end: 7px;
}

/* Product grid ---------------------------------------------------------- */
.bargchi-shop__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--bs-border);
    border-right: 1px solid var(--bs-border);
}

.bargchi-shop-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 430px;
    padding: 15px 15px 17px;
    background: #fff;
    border-left: 1px solid var(--bs-border);
    border-bottom: 1px solid var(--bs-border);
    cursor: pointer;
}

.bargchi-shop-card:hover {
    background: #fdfefe;
}

.bargchi-shop-card__visual {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-bottom: 12px;
    overflow: hidden;
}

.bargchi-shop-card__image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
}

.bargchi-shop-card__sale-badge,
.bargchi-shop-card__new-badge {
    position: absolute;
    top: 1px;
    right: 1px;
    z-index: 2;
}

.bargchi-shop-card__sale-badge {
    display: block;
    width: 72px;
    height: auto;
}

.bargchi-shop-card__new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 24px;
    padding: 0 9px;
    color: #4d5c70;
    background: rgba(255,255,255,.96);
    border: 1px solid #dfe4e9;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 750;
}

.bargchi-shop-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.bargchi-shop-card__title {
    display: -webkit-box;
    min-height: 47px;
    margin: 0 0 8px;
    overflow: hidden;
    color: #223246;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.9;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.bargchi-shop-card__rating {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 21px;
    margin-bottom: 5px;
    color: #8d96a1;
    font-size: 10px;
}

.bargchi-shop-card__rating b {
    color: #566477;
    font-weight: 700;
}

.bargchi-shop-card__star {
    color: #e6a300;
    font-size: 13px;
    line-height: 1;
}

.bargchi-shop-card__price {
    min-height: 46px;
    margin-top: auto;
    color: #17293f;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.7;
    text-align: left;
    direction: rtl;
}

.bargchi-shop-card__price del {
    display: block;
    margin-bottom: 1px;
    color: #a3abb4;
    font-size: 10px;
    font-weight: 500;
    text-decoration-thickness: 1px;
}

.bargchi-shop-card__price ins {
    color: var(--bs-red);
    text-decoration: none;
}

.bargchi-shop-card__stock {
    min-height: 18px;
    margin-top: 4px;
    color: var(--bs-green);
    font-size: 10px;
    font-weight: 700;
}

.bargchi-shop-card__stock.is-low {
    color: var(--bs-orange);
}

.bargchi-shop-card__stock.is-out {
    color: #9aa4ae;
}

/* Infinite loading ------------------------------------------------------ */
.bargchi-shop__sentinel {
    width: 100%;
    height: 2px;
}

.bargchi-shop__load-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 70px;
    color: #7f8a97;
    font-size: 11px;
}

.bargchi-shop__spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #dfe5eb;
    border-top-color: var(--bs-navy);
    border-radius: 50%;
    animation: bargchiShopSpin .75s linear infinite;
}

@keyframes bargchiShopSpin {
    to { transform: rotate(360deg); }
}

.bargchi-shop__load-retry {
    display: block;
    min-height: 40px;
    margin: 18px auto;
    padding: 0 16px;
    color: var(--bs-navy);
    background: #fff;
    border: 1px solid var(--bs-border-strong);
    border-radius: 8px;
    font-size: 11px;
    cursor: pointer;
}

/* Pagination ------------------------------------------------------------ */
.bargchi-shop__pagination {
    display: flex;
    justify-content: center;
    padding-top: 28px;
}

.bargchi-shop__pagination.is-waiting {
    display: none;
}

.bargchi-shop-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    direction: ltr;
}

.bargchi-shop-pagination a,
.bargchi-shop-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 9px;
    color: #536174;
    background: #fff;
    border: 1px solid var(--bs-border);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 650;
}

.bargchi-shop-pagination .is-current {
    color: #fff;
    background: var(--bs-navy);
    border-color: var(--bs-navy);
}

.bargchi-shop-pagination .is-gap {
    border-color: transparent;
}

/* Empty state ----------------------------------------------------------- */
.bargchi-shop__empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    min-height: 430px;
    padding: 40px 20px;
    text-align: center;
    border-left: 1px solid var(--bs-border);
    border-bottom: 1px solid var(--bs-border);
}

.bargchi-shop__empty svg {
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
    fill: none;
    stroke: #8a97a5;
    stroke-width: 1.35;
}

.bargchi-shop__empty h2 {
    margin: 0 0 7px;
    font-size: 16px;
}

.bargchi-shop__empty p {
    margin: 0 0 16px;
    color: var(--bs-muted);
    font-size: 11px;
}

.bargchi-shop__empty a {
    padding: 9px 14px;
    color: #fff;
    background: var(--bs-navy);
    border-radius: 8px;
    font-size: 11px;
}

/* Drawer ---------------------------------------------------------------- */
.bargchi-shop-filter-overlay {
    position: fixed;
    inset: 0;
    z-index: 99980;
    background: rgba(12, 25, 40, .24);
    opacity: 0;
    transition: opacity .2s ease;
}

.bargchi-shop-filter-overlay.is-open {
    opacity: 1;
}

.bargchi-shop-filter-drawer {
    --bs-navy: #102a46;
    --bs-text: #172638;
    --bs-muted: #748090;
    --bs-border: #e5e9ee;
    --bs-border-strong: #d7dde4;
    --bs-soft: #f8fafb;
    --bs-white: #fff;
    --bs-green: #1f8b55;
    --bs-orange: #ef6c24;
    --bs-red: #e6123d;
    position: fixed;
    z-index: 99990;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(390px, 92vw);
    background: #fff;
    transform: translateX(102%);
    transition: transform .22s ease;
    overflow: hidden;
    direction: rtl;
}

.bargchi-shop-filter-drawer.is-open {
    transform: translateX(0);
}

.bargchi-shop-filter-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 0 17px;
    border-bottom: 1px solid var(--bs-border);
}

.bargchi-shop-filter-drawer__head strong {
    font-size: 16px;
    color: var(--bs-navy);
}

.bargchi-shop-filter-drawer__close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #526074;
    background: #fff;
    border: 1px solid var(--bs-border);
    border-radius: 50%;
}

.bargchi-shop-filter-drawer__close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.bargchi-shop-filter-drawer__body {
    height: calc(100dvh - 64px);
    overflow-y: auto;
    padding: 14px;
}

.bargchi-shop-filter-drawer .bargchi-shop-filter-form {
    border-radius: 12px;
}

.bargchi-shop-filter-open {
    overflow: hidden;
}

/* Tablet ---------------------------------------------------------------- */
@media (max-width: 1199px) {
    .bargchi-shop__shell {
        width: min(100% - 32px, 1120px);
    }

    .bargchi-shop__layout {
        display: block;
    }

    .bargchi-shop__sidebar {
        display: none;
    }

    .bargchi-shop__filter-trigger {
        display: inline-flex;
        flex: 0 0 auto;
    }

    .bargchi-shop__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Mobile ---------------------------------------------------------------- */
@media (max-width: 767px) {
    .bargchi-shop__shell {
        width: 100%;
        padding: 18px 10px 88px;
    }

    .bargchi-shop__intro {
        padding: 0 2px 16px;
    }

    .bargchi-shop__breadcrumb {
        margin-bottom: 9px;
        font-size: 10px;
    }

    .bargchi-shop__intro-row {
        align-items: flex-start;
    }

    .bargchi-shop__intro h1 {
        margin-bottom: 5px;
        font-size: 24px;
    }

    .bargchi-shop__intro p {
        max-width: 260px;
        font-size: 10.5px;
        line-height: 1.8;
    }

    .bargchi-shop__count {
        padding-top: 6px;
        font-size: 9.5px;
    }

    .bargchi-shop__count strong {
        font-size: 13px;
    }

    .bargchi-shop__layout {
        padding-top: 10px;
    }

    .bargchi-shop__toolbar {
        align-items: flex-start;
        padding-bottom: 9px;
        gap: 8px;
    }

    .bargchi-shop__filter-trigger {
        min-height: 36px;
        padding: 0 11px;
        font-size: 10.5px;
    }

    .bargchi-shop__filter-trigger svg {
        width: 16px;
        height: 16px;
    }

    .bargchi-shop__sort {
        display: block;
        min-width: 0;
    }

    .bargchi-shop__sort-label {
        display: none;
    }

    .bargchi-shop__sort-scroll {
        gap: 4px;
        padding-bottom: 2px;
    }

    .bargchi-shop__sort-chip {
        padding: 9px 11px;
        border: 1px solid var(--bs-border);
        border-radius: 18px;
        font-size: 10px;
    }

    .bargchi-shop__sort-chip.is-active {
        color: #fff;
        background: var(--bs-navy);
        border-color: var(--bs-navy);
    }

    .bargchi-shop__meta-row {
        padding: 8px 2px 10px;
        font-size: 9px;
    }

    .bargchi-shop__auto-note {
        display: none;
    }

    .bargchi-shop__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bargchi-shop-card {
        min-height: 326px;
        padding: 10px 9px 12px;
    }

    .bargchi-shop-card__visual {
        margin-bottom: 8px;
    }

    .bargchi-shop-card__sale-badge {
        width: 60px;
    }

    .bargchi-shop-card__new-badge {
        min-width: 38px;
        height: 22px;
        padding: 0 7px;
        font-size: 9px;
    }

    .bargchi-shop-card__title {
        min-height: 42px;
        margin-bottom: 6px;
        font-size: 10.5px;
        line-height: 1.95;
    }

    .bargchi-shop-card__rating {
        min-height: 18px;
        margin-bottom: 3px;
        font-size: 8.5px;
    }

    .bargchi-shop-card__star {
        font-size: 11px;
    }

    .bargchi-shop-card__price {
        min-height: 39px;
        font-size: 11.5px;
    }

    .bargchi-shop-card__price del {
        font-size: 8.5px;
    }

    .bargchi-shop-card__stock {
        font-size: 8.5px;
    }

    .bargchi-shop__pagination {
        padding-top: 20px;
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: none;
    }

    .bargchi-shop__pagination::-webkit-scrollbar {
        display: none;
    }

    .bargchi-shop-pagination {
        margin: 0 auto;
        white-space: nowrap;
    }

    .bargchi-shop-pagination a,
    .bargchi-shop-pagination span {
        min-width: 34px;
        height: 34px;
        border-radius: 8px;
        font-size: 10px;
    }
}

@media (max-width: 380px) {
    .bargchi-shop__shell {
        padding-right: 8px;
        padding-left: 8px;
    }

    .bargchi-shop-card {
        min-height: 308px;
        padding-right: 8px;
        padding-left: 8px;
    }
}


/* Safe preview page: scoped marker only. */
body.page-template-page-shop-preview .bargchi-shop { min-height: 60vh; }
