/* MarketBashi category archive — stage 1/2, category-only styles. */
body.tax-product_cat .mbca-page{background:#fcfbfe;padding:22px 16px 60px;color:#30263e}
body.tax-product_cat .mbca-container{max-width:1440px;margin:0 auto;width:100%}
body.tax-product_cat .mbca-breadcrumb{margin-bottom:18px;color:#7b6a90;font-size:13px}
body.tax-product_cat .mbca-breadcrumb .woocommerce-breadcrumb{margin:0;color:inherit}
body.tax-product_cat .mbca-intro{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:24px 30px;border-radius:22px;background:#f6f0fc;border:1px solid #eadff5;margin-bottom:24px}
body.tax-product_cat .mbca-intro-copy{min-width:0;flex:1}
body.tax-product_cat .mbca-title{font-size:clamp(24px,2.6vw,34px);margin:0 0 12px;line-height:1.5;color:#361659}
body.tax-product_cat .mbca-intro .term-description{line-height:2;color:#58466e;margin:0;overflow-wrap:anywhere}
body.tax-product_cat .mbca-intro .term-description p:last-child{margin-bottom:0}
body.tax-product_cat .mbca-category-image{flex:none;width:118px;height:118px;display:grid;place-items:center;border-radius:18px;overflow:hidden;background:#fff}
body.tax-product_cat .mbca-category-image img{width:100%;height:100%;object-fit:contain}
body.tax-product_cat .mbca-subcategories{margin-bottom:24px}
body.tax-product_cat .mbca-section-title{font-size:18px;margin:0 0 14px;color:#36214e}
body.tax-product_cat .mbca-subcategory-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px}
body.tax-product_cat .mbca-subcategory{background:#fff;border:1px solid #eee7f4;border-radius:16px;display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center;text-align:center;padding:15px 10px;text-decoration:none;color:#493b5b;font-weight:700;font-size:13px;min-width:0;transition:border-color .2s,transform .2s}
body.tax-product_cat .mbca-subcategory:hover{border-color:#b993e1;transform:translateY(-2px)}
body.tax-product_cat .mbca-subcategory-image{display:grid;place-items:center;border-radius:50%;width:72px;height:72px;background:#f6f0fc;color:#7c37bb;font-size:32px;overflow:hidden}
body.tax-product_cat .mbca-subcategory-image img{width:100%;height:100%;object-fit:cover}
body.tax-product_cat .mbca-columns{display:grid;grid-template-columns:250px minmax(0,1fr) 230px;gap:18px;align-items:start}
body.tax-product_cat .mbca-no-left{grid-template-columns:250px minmax(0,1fr)}
body.tax-product_cat .mbca-no-filters{grid-template-columns:minmax(0,1fr) 230px}
body.tax-product_cat .mbca-no-left.mbca-no-filters{grid-template-columns:minmax(0,1fr)}
body.tax-product_cat .mbca-sidebar{min-width:0;border:1px solid #eee8f3;border-radius:18px;background:#fff;padding:18px;box-shadow:0 8px 24px rgba(61,26,88,.03)}
body.tax-product_cat .mbca-sidebar-heading{font-size:17px;margin:0 0 16px;color:#3c215a}
body.tax-product_cat .mbca-widget{margin:0 0 20px}
body.tax-product_cat .mbca-widget:last-child{margin-bottom:0}
body.tax-product_cat .mbca-widget-title{font-size:15px;margin:0 0 10px}
body.tax-product_cat .mbca-products{min-width:0}
body.tax-product_cat .mbca-toolbar{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap;padding:12px 16px;background:#fff;border:1px solid #eee7f4;border-radius:14px;margin:0 0 18px}
body.tax-product_cat .mbca-toolbar .woocommerce-result-count,body.tax-product_cat .mbca-toolbar .woocommerce-ordering{margin:0}
body.tax-product_cat .mbca-toolbar select{border:1px solid #e3d8ee;border-radius:10px;padding:8px;background:#fff;color:#30263e}
body.tax-product_cat .mbca-products ul.products{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:stretch;margin:0!important;padding:0!important;list-style:none}
body.tax-product_cat .mbca-products ul.products::before,body.tax-product_cat .mbca-products ul.products::after{display:none!important}
body.tax-product_cat .mbca-products ul.products li.product{width:auto!important;float:none!important;clear:none!important;margin:0!important;min-width:0}
body.tax-product_cat .mbca-pagination{padding:20px 0}
body.tax-product_cat .mbca-pagination .woocommerce-pagination{margin:0}
@media(max-width:1199px){body.tax-product_cat .mbca-columns,body.tax-product_cat .mbca-no-left,body.tax-product_cat .mbca-no-filters{grid-template-columns:220px minmax(0,1fr)}body.tax-product_cat .mbca-left{grid-column:1/-1}body.tax-product_cat .mbca-no-filters{grid-template-columns:minmax(0,1fr)}body.tax-product_cat .mbca-products ul.products{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:767px){body.tax-product_cat .mbca-page{padding:16px 12px 40px}body.tax-product_cat .mbca-intro{padding:18px;gap:12px}body.tax-product_cat .mbca-category-image{width:75px;height:75px}body.tax-product_cat .mbca-columns,body.tax-product_cat .mbca-no-left,body.tax-product_cat .mbca-no-filters{display:flex;flex-direction:column}body.tax-product_cat .mbca-products,body.tax-product_cat .mbca-filters,body.tax-product_cat .mbca-left{width:100%}body.tax-product_cat .mbca-filters{order:0}body.tax-product_cat .mbca-products{order:1}body.tax-product_cat .mbca-left{order:2}body.tax-product_cat .mbca-products ul.products{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}body.tax-product_cat .mbca-subcategory-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}body.tax-product_cat .mbca-subcategory{font-size:11px;padding:10px 6px}body.tax-product_cat .mbca-subcategory-image{width:55px;height:55px}}
@media(max-width:390px){body.tax-product_cat .mbca-subcategory-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Stage 3: actual MarketBashi product card grid. Scoped to category archive only. */
body.tax-product_cat .mbca-products .mbca-card-grid.mbpc-grid{display:grid!important;grid-template-columns:repeat(var(--mbca-desktop,4),minmax(0,1fr))!important;gap:var(--mbca-gap,14px)!important;align-items:stretch;margin:0!important;padding:0!important;max-width:100%;}
body.tax-product_cat .mbca-products .mbca-card-grid>.mbpc-card{width:100%!important;max-width:none!important;min-width:0;margin:0!important;}
body.tax-product_cat .mbca-products .mbca-card-grid .mbpc-media img{max-width:100%;}
@media(max-width:1199px){body.tax-product_cat .mbca-products .mbca-card-grid.mbpc-grid{grid-template-columns:repeat(var(--mbca-tablet,3),minmax(0,1fr))!important;}}
@media(max-width:767px){body.tax-product_cat .mbca-products .mbca-card-grid.mbpc-grid{grid-template-columns:repeat(var(--mbca-mobile,2),minmax(0,1fr))!important;gap:min(var(--mbca-gap,14px),12px)!important;}}


/* Premium: keep the plugin's card proportions; modest image-size control only in category archives.
   Images are not enlarged by default, avoiding logged-in/guest style differences. */
body.tax-product_cat .mbca-products .mbca-card-grid .mbpc-card--premium .mbpc-image {
    transform:scale(var(--mbca-image-scale,1));
    transform-origin:center;
    object-fit:contain;
}
body.tax-product_cat .mbca-products .mbca-card-grid .mbpc-card--premium:hover .mbpc-image {
    transform:scale(calc(var(--mbca-image-scale,1) * 1.025));
}
body.tax-product_cat .mbca-quick-filters{display:flex;flex-direction:column;gap:12px;font-size:13px}
body.tax-product_cat .mbca-quick-filters label{display:flex;gap:8px;align-items:center;cursor:pointer}
body.tax-product_cat .mbca-quick-filters input[type=checkbox]{accent-color:#8128d8}
body.tax-product_cat .mbca-quick-filters button{border:0;border-radius:10px;background:#8128d8;color:white;padding:10px;font-weight:700;cursor:pointer}
body.tax-product_cat .mbca-quick-filters a{font-size:12px;text-align:center;color:#8128d8}


/* Archive v3.6: keep native filters and Elementor as separate cards.
   This right stack is one grid child on desktop/tablet. */
body.tax-product_cat .mbca-right-stack{min-width:0;display:flex;flex-direction:column;gap:18px;align-self:start}
body.tax-product_cat .mbca-right-stack>.mbca-sidebar{width:100%;min-width:0}
/* Logged-in and logged-out archive Premium media dimensions: always the
   same layout; do not affect cards in cross-sells, widgets or carousels. */
body.tax-product_cat .mbca-products .mbca-card-grid .mbpc-card--premium .mbpc-media{min-width:0;max-width:none;width:auto;}
body.tax-product_cat .mbca-products .mbca-card-grid .mbpc-card--premium .mbpc-image-link{display:flex;width:100%;aspect-ratio:1 / 1;align-items:center;justify-content:center;overflow:hidden}
body.tax-product_cat .mbca-products .mbca-card-grid .mbpc-card--premium .mbpc-image-link img.mbpc-image{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center;}
/* Tablet: filter + optional right Elementor stay stacked; left sidebar follows products. */
@media(min-width:768px) and (max-width:1199px){
 body.tax-product_cat .mbca-columns{grid-template-columns:220px minmax(0,1fr)}
 body.tax-product_cat .mbca-right-stack{grid-column:1;grid-row:1}
 body.tax-product_cat .mbca-products{grid-column:2;grid-row:1;min-width:0}
 body.tax-product_cat .mbca-left{grid-column:1/-1;grid-row:2}
 body.tax-product_cat .mbca-no-left .mbca-products{grid-column:2}
}
/* Mobile: native filters remain above products; both Elementor sidebars follow products. */
@media(max-width:767px){
 body.tax-product_cat .mbca-columns{display:flex;flex-direction:column;gap:16px}
 body.tax-product_cat .mbca-products{order:1;width:100%}
 body.tax-product_cat .mbca-right-stack{display:contents}
 body.tax-product_cat .mbca-filters{order:0;width:100%}
 body.tax-product_cat .mbca-right-elementor{order:2;width:100%}
 body.tax-product_cat .mbca-left{order:3;width:100%}
}

/* Guest-safe geometry: optimized guest CSS may add padding to MBPC articles.
   Keep every product-card style identical for guests and logged-in users.
   Scope strictly to category archive product grids; cross-sells remain untouched. */
body.tax-product_cat .mbca-products .mbca-card-grid.mbpc-grid > article.mbpc-card {
    box-sizing:border-box;
    width:100%;
    min-width:0;
    max-width:100%;
    padding:0!important;
}

/* Category filter controls: visually consistent with approved brand filters. */
body.tax-product_cat .mbbr-filter-form{display:grid;gap:13px}
body.tax-product_cat .mbbr-filter-group{display:grid;gap:7px;border:0;border-bottom:1px solid #eee8f3;padding:0 0 13px;margin:0;min-width:0}
body.tax-product_cat .mbbr-filter-title{font-size:12px;font-weight:750;color:#493359}
body.tax-product_cat .mbbr-filter-check{display:flex;align-items:center;gap:8px;font-size:12px;cursor:pointer}
body.tax-product_cat .mbbr-filter-check input{accent-color:#8128d8}
body.tax-product_cat .mbbr-price-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
body.tax-product_cat .mbbr-price-fields label{display:grid;gap:5px;font-size:11px;color:#64566e;min-width:0}
body.tax-product_cat .mbbr-price-fields input,body.tax-product_cat .mbbr-filter-select{width:100%;min-width:0;max-width:100%;box-sizing:border-box;border:1px solid #e2d7ed;background:#fff;border-radius:9px;padding:9px 8px;font:inherit;font-size:12px;color:#332842}
body.tax-product_cat .mbbr-filter-actions{display:grid;gap:9px}
body.tax-product_cat .mbbr-filter-apply{background:#8128d8;color:white;border:0;border-radius:10px;min-height:40px;cursor:pointer;font:inherit;font-size:12px;font-weight:700}
body.tax-product_cat .mbbr-filter-reset{text-decoration:none!important;color:#8128d8!important;text-align:center;font-size:12px}
body.tax-product_cat .mbbr-filter-hint{font-size:11px;color:#80748a;line-height:1.8}
body.tax-product_cat .mbbr-range{position:relative;height:34px;margin:8px 9px 2px;direction:ltr;touch-action:pan-y}
body.tax-product_cat .mbbr-range-track{position:absolute;top:15px;left:0;right:0;height:6px;background:#e9e0f2;border-radius:9px;pointer-events:none}
body.tax-product_cat .mbbr-range-fill{position:absolute;height:100%;background:#8128d8;border-radius:9px;left:0;right:0}
body.tax-product_cat .mbbr-range-thumb{position:absolute;top:4px;left:0;width:100%;height:28px;margin:0;padding:0;background:transparent!important;border:0!important;box-shadow:none!important;outline:0;appearance:none;-webkit-appearance:none;pointer-events:none;direction:ltr}
body.tax-product_cat .mbbr-range-thumb::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:19px;height:19px;border-radius:50%;background:#fff;border:3px solid #8128d8;box-shadow:0 1px 6px #67358a33;cursor:grab;pointer-events:auto}
body.tax-product_cat .mbbr-range-thumb::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:#fff;border:3px solid #8128d8;box-shadow:0 1px 6px #67358a33;cursor:grab;pointer-events:auto}
body.tax-product_cat .mbbr-range-thumb:focus-visible::-webkit-slider-thumb{outline:3px solid #b99adb;outline-offset:3px}
body.tax-product_cat .mbbr-range-thumb:focus-visible::-moz-range-thumb{outline:3px solid #b99adb;outline-offset:3px}
body.tax-product_cat .mbbr-range-thumb:active::-webkit-slider-thumb{cursor:grabbing}
body.tax-product_cat .mbbr-range-values{display:flex;justify-content:space-between;align-items:center;gap:8px;direction:ltr;font-size:11px;color:#4b365e;font-weight:650;font-variant-numeric:tabular-nums}
body.tax-product_cat .mbbr-range-values span{direction:rtl;text-align:center;white-space:nowrap}
body.tax-product_cat .mbbr-rating-choice{display:flex;gap:7px;align-items:center;cursor:pointer;font-size:11px;line-height:1.8}
body.tax-product_cat .mbbr-rating-choice input{accent-color:#8128d8;margin:0 1px}
body.tax-product_cat .mbbr-rating-stars{color:#e4a01e;font-size:15px;letter-spacing:1px;direction:ltr;display:inline-flex;white-space:nowrap}
body.tax-product_cat .mbbr-rating-muted{color:#c9becf}
body.tax-product_cat .mbca-choice-scroll{display:grid;gap:8px;max-height:215px;overflow-y:auto;padding:3px 2px;scrollbar-width:thin}
body.tax-product_cat .mbca-extended-filter-form{font-size:12px}

/* v7: native selects, consistent spacing and layout of category filters. */
body.tax-product_cat .mbca-extended-filter-form{direction:rtl;width:100%;max-width:100%;box-sizing:border-box;text-align:right}
body.tax-product_cat .mbca-extended-filter-form .mbbr-filter-group{min-inline-size:0;width:100%;box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);gap:10px;border:0;border-bottom:1px solid #eee8f3;padding:0 0 15px;margin:0}
body.tax-product_cat .mbca-extended-filter-form .mbbr-filter-title{padding:0 0 4px;float:none;font-weight:750}
body.tax-product_cat .mbca-extended-filter-form .mbbr-filter-check,body.tax-product_cat .mbca-extended-filter-form .mbbr-rating-choice{display:flex;flex-wrap:nowrap;justify-content:flex-start;gap:8px;align-items:center;text-align:right;white-space:normal;line-height:1.9}
body.tax-product_cat .mbca-extended-filter-form input[type=checkbox],body.tax-product_cat .mbca-extended-filter-form input[type=radio]{flex:0 0 auto;accent-color:#8128d8}
body.tax-product_cat .mbca-extended-filter-form .mbbr-rating-stars{display:inline-flex;flex-shrink:0;direction:ltr;color:#e4a01e;letter-spacing:0;white-space:nowrap}
body.tax-product_cat .mbca-extended-filter-form .mbbr-filter-select{display:block;appearance:auto;direction:rtl;text-align:right;width:100%;min-height:41px;padding:8px 10px;border:1px solid #e2d7ed;border-radius:10px;background-color:#fff;color:#332842;box-sizing:border-box}
body.tax-product_cat .mbca-extended-filter-form .mbbr-range{min-width:0;width:auto}
