/* [xcell_preowned] filtered storefront — filter bar + device cards.
 * Matches docs/designs/xcellparts-preowned-v2.html, bigger type. Tokens from
 * xcell-brand.css (:root). */

/* Own the box model for the grid + cards so padding never overflows the column,
   regardless of the active theme's global box-sizing (defensive). */
.xcell-po-bar,.xcell-po-bar *,.xcell-podev-grid,.xcell-podev,.xcell-podev *{box-sizing:border-box}

.xcell-po-shop{margin:0 0 8px;font-size:15px}

/* ====== Filter bar ====== */
.xcell-po-bar{
  display:flex;flex-wrap:wrap;align-items:center;gap:10px;
  background:var(--xcell-white,#fff);border:1px solid var(--xcell-n-200,#E2E5EA);
  border-radius:var(--xcell-r-card,16px);box-shadow:var(--xcell-shadow-e1,0 1px 2px rgba(14,17,22,.06));
  padding:14px 16px;margin-bottom:20px;
}

/* ---- Dropdown facets (Brand / Storage / Price / Sort) ----
 * The !important props are theme-bleed armor: WoodMart skins bare <button>/
 * input elements (red fill, white text, UPPERCASE) with high-specificity
 * .woocommerce rules that otherwise beat these classes. */
.xcell-po-dd{position:relative}
.xcell-po-dd__btn{
  display:inline-flex;align-items:center;gap:8px;
  border:1px solid var(--xcell-n-200,#E2E5EA)!important;border-radius:var(--xcell-r-pill,9999px)!important;
  background:#fff!important;color:var(--xcell-ink-700,#1F2330)!important;
  font:inherit;font-size:14px!important;font-weight:600!important;line-height:1.2!important;
  text-transform:none!important;letter-spacing:0!important;box-shadow:none!important;
  padding:9px 16px!important;min-height:40px;cursor:pointer;transition:.14s var(--xcell-ease,ease);white-space:nowrap;
}
.xcell-po-dd__btn:hover{border-color:var(--xcell-n-400,#9AA1AD)!important;background:#fff!important;color:var(--xcell-ink-800,#14171F)!important}
/* Active = a real filter picked; Sort always carries a value and must stay quiet. */
.xcell-po-dd:not(.xcell-po-dd--sort)[data-value]:not([data-value=""]) .xcell-po-dd__btn{border-color:var(--xcell-red-500,#D42027)!important;background:var(--xcell-red-50,#FDECEE)!important;color:var(--xcell-red-700,#8E1419)!important}
.xcell-po-dd__btn span[data-label]{font-weight:700}
/* Unset facets read quiet: "Model: Any" shows the value muted until a pick. */
.xcell-po-dd:not([data-value]) .xcell-po-dd__btn span[data-label],
.xcell-po-dd[data-value=""] .xcell-po-dd__btn span[data-label]{color:var(--xcell-n-400,#9AA1AD);font-weight:600}
.xcell-po-dd__btn i{width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-top:-3px;opacity:.6;flex:none}
.xcell-po-dd.is-open .xcell-po-dd__btn i{transform:rotate(-135deg);margin-top:2px}

.xcell-po-dd__menu{
  position:absolute;top:calc(100% + 8px);left:0;z-index:30;display:none;min-width:200px;max-width:calc(100vw - 40px);max-height:320px;overflow:auto;
  background:#fff;border:1px solid var(--xcell-n-200,#E2E5EA);border-radius:12px;
  box-shadow:var(--xcell-shadow-e2,0 8px 24px rgba(14,17,22,.12));padding:7px;
}
/* Price menu is wider so the custom min–max row breathes. */
.xcell-po-dd[data-tax="price"] .xcell-po-dd__menu{min-width:250px}
.xcell-po-dd.is-open .xcell-po-dd__menu{display:block}
.xcell-po-dd--sort .xcell-po-dd__menu{left:auto;right:0}
.xcell-po-dd__menu button:not(.xcell-po-papply){
  display:block;width:100%;text-align:left;border:0!important;background:none!important;cursor:pointer;
  padding:9px 12px!important;border-radius:8px!important;font:inherit;font-size:14px!important;font-weight:500!important;
  color:var(--xcell-ink-700,#1F2330)!important;white-space:nowrap;
  text-transform:none!important;letter-spacing:0!important;box-shadow:none!important;min-height:0;line-height:1.35!important;
}
.xcell-po-dd__menu button:not(.xcell-po-papply):hover,
.xcell-po-dd__menu button:not(.xcell-po-papply):focus-visible{background:var(--xcell-red-50,#FDECEE)!important;color:var(--xcell-red-700,#8E1419)!important}
.xcell-po-dd__menu button.is-on{color:var(--xcell-red-600,#B11A20)!important;font-weight:700!important}
.xcell-po-dd__menu button[hidden]{display:none}
/* WoodMart's global button reset (display:inline-flex) outranks the UA's
   [hidden] default — keep the Clear-all pill genuinely hidden until active. */
.xcell-po-clear[hidden]{display:none!important}

/* ---- Bar extras: live search, quick toggles, custom price range ---- */
/* One control height across the whole bar so search / dropdowns / toggles sit
   on a single optical line. */
.xcell-po-dd__btn,.xcell-po-toggle,.xcell-po-q{min-height:40px}
.xcell-po-qwrap{flex:0 1 250px;min-width:180px}
/* Selector strength matters here: WoodMart's own input rules are !important
   too, so equal-importance fights fall to specificity — (0,2,1) beats them. */
.xcell-po-shop input.xcell-po-q{
  width:100%;height:40px!important;min-height:40px!important;margin:0!important;box-sizing:border-box!important;
  border:1px solid var(--xcell-n-200,#E2E5EA)!important;border-radius:var(--xcell-r-pill,9999px)!important;
  font:inherit;font-size:1rem!important;line-height:1.2!important;padding:8px 15px 8px 38px!important;
  color:var(--xcell-ink-800,#14171F)!important;text-transform:none!important;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239AA1AD' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px 50%/16px!important;
  transition:border-color .15s var(--xcell-ease,ease),box-shadow .15s var(--xcell-ease,ease);
  -webkit-appearance:none;appearance:none;box-shadow:none!important;
}
/* Mobile toolbar: back up to tap height (same specificity, later + longer). */
.xcell-po-shop .xcell-po-mbar input.xcell-po-q{height:var(--xcell-tap,44px)!important;min-height:var(--xcell-tap,44px)!important}
.xcell-po-q::placeholder{color:var(--xcell-n-400,#9AA1AD)}
.xcell-po-shop input.xcell-po-q:focus{outline:none!important;border-color:var(--xcell-red-500,#D42027)!important;box-shadow:0 0 0 3px var(--xcell-red-50,#FDECEE)!important}
.xcell-po-q::-webkit-search-cancel-button{-webkit-appearance:none;height:14px;width:14px;cursor:pointer;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") no-repeat 50%/14px}
.xcell-po-toggle{
  display:inline-flex;align-items:center;gap:6px;cursor:pointer;transition:.15s var(--xcell-ease,ease);
  border:1px solid var(--xcell-n-200,#E2E5EA)!important;border-radius:var(--xcell-r-pill,9999px)!important;background:#fff!important;
  font:inherit;font-size:14px!important;font-weight:600!important;line-height:1.2!important;color:var(--xcell-ink-700,#1F2330)!important;
  padding:8px 16px!important;white-space:nowrap;text-transform:none!important;letter-spacing:0!important;box-shadow:none!important;
}
.xcell-po-toggle:hover{border-color:var(--xcell-n-400,#9AA1AD)!important;background:#fff!important;color:var(--xcell-ink-800,#14171F)!important}
.xcell-po-toggle:focus-visible,
.xcell-po-dd__btn:focus-visible{outline:none!important;border-color:var(--xcell-red-500,#D42027)!important;box-shadow:0 0 0 3px var(--xcell-red-50,#FDECEE)!important}
.xcell-po-toggle.is-on{background:var(--xcell-red-50,#FDECEE)!important;border-color:var(--xcell-red-500,#D42027)!important;color:var(--xcell-red-700,#8E1419)!important}
.xcell-po-toggle.is-on::before{content:"✓";font-weight:800}
/* Card hidden by the live search box (client-side filter). */
.xcell-podev--qhide{display:none!important}
/* Custom min–max: its own captioned block under the presets; grid keeps the
   fields equal-width at any menu width instead of collapsing. */
.xcell-po-pcustom{
  display:grid;grid-template-columns:1fr auto 1fr auto;align-items:center;gap:7px;
  margin-top:7px;padding:10px 6px 4px;border-top:1px solid var(--xcell-n-100,#EEF0F3);
  color:var(--xcell-n-400,#9AA1AD);
}
.xcell-po-pcustom__lbl{
  grid-column:1 / -1;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--xcell-n-400,#9AA1AD);padding:0 2px;
}
.xcell-po-pcustom input{
  width:100%;min-width:0;border:1px solid var(--xcell-n-200,#E2E5EA)!important;border-radius:8px!important;
  background:#fff!important;box-shadow:none!important;font:inherit;font-size:1rem!important;
  padding:7px 10px!important;min-height:36px;color:var(--xcell-ink-800,#14171F)!important;text-transform:none!important;
  -moz-appearance:textfield;
}
.xcell-po-pcustom input::-webkit-outer-spin-button,
.xcell-po-pcustom input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.xcell-po-pcustom input:focus{outline:none;border-color:var(--xcell-red-500,#D42027)!important;box-shadow:0 0 0 3px var(--xcell-red-50,#FDECEE)!important}
.xcell-po-papply{
  display:inline-flex;align-items:center;justify-content:center;
  border:0!important;border-radius:8px!important;background:var(--xcell-ink-800,#14171F)!important;color:#fff!important;cursor:pointer;
  font:inherit;font-size:13px!important;font-weight:700!important;text-transform:none!important;letter-spacing:0!important;
  padding:8px 14px!important;min-height:36px;box-shadow:none!important;transition:.15s var(--xcell-ease,ease);
}
.xcell-po-papply:hover{background:var(--xcell-red-600,#B11A20)!important;color:#fff!important}

/* Multi-select dropdowns (Brand, Storage): checkbox-style items, menu stays open.
   padding-left needs !important to beat the base rule's theme-bleed armor — the
   checkbox draws at left:11px, so without the indent it sits ON the label. */
.xcell-po-dd[data-multi] .xcell-po-dd__menu button{position:relative;padding-left:36px!important}
.xcell-po-dd[data-multi] .xcell-po-dd__menu button::before{
  content:"";position:absolute;left:11px;top:50%;transform:translateY(-50%);
  width:16px;height:16px;border:1.5px solid var(--xcell-n-300,#CBD0D8);border-radius:5px;background:#fff;
}
.xcell-po-dd[data-multi] .xcell-po-dd__menu button.is-on::before{background:var(--xcell-red-500,#D42027);border-color:var(--xcell-red-500,#D42027)}
.xcell-po-dd[data-multi] .xcell-po-dd__menu button.is-on::after{
  content:"";position:absolute;left:16.5px;top:48%;width:4px;height:8px;
  border:solid #fff;border-width:0 2px 2px 0;transform:translateY(-60%) rotate(45deg);
}
/* the "Any" row clears the group — no checkbox */
.xcell-po-dd[data-multi] .xcell-po-dd__menu button[data-term=""]{padding-left:12px!important}
.xcell-po-dd[data-multi] .xcell-po-dd__menu button[data-term=""]::before,
.xcell-po-dd[data-multi] .xcell-po-dd__menu button[data-term=""]::after{content:none}

/* ---- Grade chips ---- */
.xcell-po-grades{display:inline-flex;gap:7px}
.xcell-po-grade{
  min-width:38px;height:38px;padding:0 12px;border-radius:var(--xcell-r-pill,9999px);
  border:1px solid var(--xcell-n-200,#E2E5EA);background:#fff;color:var(--xcell-ink-700,#1F2330);
  font:inherit;font-size:14px;font-weight:700;cursor:pointer;transition:.14s var(--xcell-ease,ease);
}
.xcell-po-grade:hover:not(.is-off){border-color:var(--xcell-n-400,#9AA1AD)}
.xcell-po-grade.is-on{border-color:var(--xcell-red-500,#D42027);background:var(--xcell-red-50,#FDECEE);color:var(--xcell-red-700,#8E1419)}
.xcell-po-grade.is-off{opacity:.35;cursor:not-allowed}

.xcell-po-spacer{flex:1 1 auto}
/* Repeated-class specificity (0,4,1): WoodMart paints this button via a rule
   that outranks even .xcell-po-shop button.xcell-po-clear!important. */
.xcell-po-shop button.xcell-po-clear.xcell-po-clear.xcell-po-clear{
  border:0!important;background:none!important;background-color:transparent!important;background-image:none!important;
  color:var(--xcell-red-600,#B11A20)!important;
  font:inherit;font-weight:600!important;font-size:14px!important;text-transform:none!important;letter-spacing:0!important;
  cursor:pointer;padding:6px 4px!important;min-height:0!important;min-width:0!important;box-shadow:none!important;border-radius:0!important;
}
.xcell-po-shop button.xcell-po-clear.xcell-po-clear.xcell-po-clear:hover{background:none!important;background-color:transparent!important;color:var(--xcell-red-700,#8E1419)!important;text-decoration:underline}
.xcell-po-count{font-size:14px;color:var(--xcell-n-500,#6B7280);font-variant-numeric:tabular-nums;white-space:nowrap}

/* ====== Results grid ====== */
.xcell-po-results{min-height:160px;transition:opacity .15s var(--xcell-ease,ease)}
.xcell-po-results.is-loading{opacity:.45;pointer-events:none}
/* Column counts come from the Shop Page admin screen via CSS variables printed
   in <head> (XCell_Shop_Settings::print_css_vars); the var() fallbacks below
   are the defaults, so an untouched install needs no extra CSS. */
.xcell-podev-grid{display:grid;grid-template-columns:repeat(var(--xcell-shop-cols,4),1fr);gap:18px;align-items:stretch}
@media(max-width:1024px){.xcell-podev-grid{grid-template-columns:repeat(var(--xcell-shop-cols-t,3),1fr)}}
@media(max-width:768px){.xcell-podev-grid{grid-template-columns:repeat(var(--xcell-shop-cols-m,2),1fr);gap:12px}}
/* Hold two columns down to 375px (brand rule: never 1-col on a phone); only
   collapse to a single column on very small handsets. */
@media(max-width:380px){.xcell-podev-grid{grid-template-columns:1fr}}
/* Wide screens: add columns so the widened catalog container (shop/category up
   to 2240px) fills with more products per row instead of a few oversized cards.
   The 1fr tracks still stretch each card to fill the row automatically. */
@media(min-width:1500px){.xcell-podev-grid{grid-template-columns:repeat(var(--xcell-shop-cols-w,5),1fr)}}
@media(min-width:1900px){.xcell-podev-grid{grid-template-columns:repeat(var(--xcell-shop-cols-u,6),1fr)}}
.xcell-podev-empty{padding:46px 10px;text-align:center;color:var(--xcell-n-500,#6B7280);font-size:16px}

/* ---- Device card ---- */
.xcell-podev{
  position:relative;display:flex;flex-direction:column;height:100%;align-self:stretch;
  background:var(--xcell-white,#fff);border:1px solid var(--xcell-n-200,#E2E5EA);
  border-radius:var(--xcell-r-card,16px);box-shadow:var(--xcell-shadow-e1,0 1px 2px rgba(14,17,22,.06));
  padding:16px;transition:.18s var(--xcell-ease,ease);
}
.xcell-podev:hover{border-color:var(--xcell-red-500,#D42027);transform:translateY(-3px);box-shadow:var(--xcell-shadow-e2,0 8px 24px rgba(14,17,22,.12))}

.xcell-podev__grade{
  position:absolute;top:14px;left:14px;z-index:2;
  font-size:12.5px;font-weight:800;padding:5px 11px;border-radius:var(--xcell-r-pill,9999px);
}
.xcell-podev__grade--ap{background:var(--xcell-success-bg,#E7F6EE);color:var(--xcell-success-700,#15663C)}
.xcell-podev__grade--a{background:var(--xcell-info-bg,#E8F0FE);color:var(--xcell-info-700,#1B4FD0)}
.xcell-podev__grade--b{background:var(--xcell-warning-bg,#FCF3DE);color:var(--xcell-warning-700,#9A6A00)}
.xcell-podev__grade--c{background:var(--xcell-n-100,#EEF0F3);color:var(--xcell-n-600,#4B515C)}

.xcell-podev__img{
  display:flex;align-items:center;justify-content:center;aspect-ratio:1;margin-bottom:14px;
  border:1px solid var(--xcell-n-100,#EEF0F3);border-radius:var(--xcell-r-ctrl,10px);overflow:hidden;
  background:radial-gradient(120% 120% at 50% 0%,#fff,var(--xcell-n-50,#F7F8FA));
}
/* multiply melts white photo backgrounds into the radial stage (same fix the
   PDP gallery got in 1.63.0) — without it every white-bg product shot shows
   as a hard white rectangle on the grey gradient ("white edges" feedback).
   Transparent data-URI category icons are unaffected.
   Fill most of the stage (was 78%) so parts read larger with only a slim gutter. */
.xcell-podev__img img{width:94%;height:94%;object-fit:contain;mix-blend-mode:multiply}
.xcell-podev__nm,
a.xcell-podev__nm,
.woocommerce a.xcell-podev__nm{font-size:16px;font-weight:700;color:var(--xcell-ink-800,#14171F)!important;line-height:1.35;text-decoration:none} /* beat WoodMart's .woocommerce a (red after primary→red) */
.xcell-podev__nm:hover{color:var(--xcell-red-600,#B11A20)!important}
.xcell-podev__vr{font-size:13.5px;color:var(--xcell-n-500,#6B7280);margin-top:4px}
/* Battery SKUs (XCell_Battery_Shipping::card_flag_html): amber "Ground Shipping
   Only" line between the SKU and the card foot. */
.xcell-podev__ship{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;color:#9a6700;margin-top:4px}
.xcell-podev__ship svg{flex:none}
.xcell-podev__note{font-size:12.5px;color:var(--xcell-n-600,#4B515C);background:var(--xcell-n-50,#F7F8FA);border-radius:8px;padding:7px 11px;margin-top:11px}

/* ---- Subcategory cards: category grids lead with their children, sharing the
   product-card shell so the grid reads as one system. ---- */
.xcell-podev--cat .xcell-podev__img img{width:72%;height:72%}/* generated icons sit smaller than product shots */
.xcell-podev__cattag{font-size:11.5px;font-weight:700;color:var(--xcell-n-500,#6B7280);text-transform:uppercase;letter-spacing:.05em}

/* Footer = stock + price + buy, anchored to the card bottom as one block so the
   cards line up whether or not a condition note is present. */
.xcell-podev__foot{margin-top:auto;padding-top:14px}
.xcell-podev__stock{
  font-size:12.5px;font-weight:700;margin-bottom:9px;
  display:flex;align-items:center;gap:6px;font-variant-numeric:tabular-nums;
}
.xcell-podev__stock::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;flex:none}
.xcell-podev__stock--in{color:var(--xcell-success-700,#15663C)}
.xcell-podev__stock--out{color:var(--xcell-n-500,#6B7280)}

/* Price on its own line, buy controls stacked beneath — keeps every card's buy
   area identical regardless of price length or whether a stepper is shown. */
.xcell-podev__row{display:flex;flex-direction:column;align-items:stretch;gap:10px}
.xcell-podev__price{font-size:20px;font-weight:800;color:var(--xcell-red-500,#D42027);font-variant-numeric:tabular-nums}
.xcell-podev__price del{color:var(--xcell-n-400,#9AA1AD);font-weight:400;font-size:13px;margin-right:5px}
.xcell-podev__price ins{text-decoration:none}

.xcell-podev__buy{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.xcell-podev__buy .xcell-podev__add{flex:1 1 auto}
/* WooCommerce appends a "View cart" link after an AJAX add — drop it onto its own
   centred line so it never squashes/overlaps the stepper + Add button. */
.xcell-podev__buy .added_to_cart{flex:1 1 100%;order:3;width:100%;text-align:center;margin:2px 0 0;font-size:12.5px;font-weight:600;color:var(--xcell-red-600,#B11A20);text-decoration:underline}

/* Quantity stepper.
   The grid renders inside <div class="woocommerce xcell-po-results">, so the
   active theme (WoodMart) styles these controls as WooCommerce form fields —
   stretching the input's width/padding and restyling the buttons. Every
   box-model property below is therefore pinned with !important and the children
   are flex:none, so the input can't grow and shove the + button past the pill's
   overflow:hidden (the "minus + blank box, no plus" bug). */
.xcell-podev__qty{display:inline-flex;flex:none;align-items:center;border:1px solid var(--xcell-n-200,#E2E5EA)!important;border-radius:var(--xcell-r-pill,9999px)!important;background:#fff!important;overflow:hidden}
.xcell-podev__qbtn{
  /* beat WoodMart's .woocommerce button.button (red bg + radius + min-width/padding after primary→red) */
  flex:none;width:38px!important;min-width:38px!important;height:44px!important;padding:0!important;margin:0!important;border:0!important;background:none!important;cursor:pointer;font:inherit;font-size:17px!important;line-height:1; /* ≥44px touch target (brand rule) */
  color:var(--xcell-ink-700,#1F2330)!important;display:inline-flex;align-items:center;justify-content:center;transition:.14s var(--xcell-ease,ease);border-radius:0!important;box-shadow:none!important;
}
.xcell-podev__qbtn:hover:not(:disabled){background:var(--xcell-n-50,#F7F8FA)!important;color:var(--xcell-red-600,#B11A20)!important}
.xcell-podev__qbtn:disabled{color:var(--xcell-n-300,#CBD0D8)!important;cursor:not-allowed}
.xcell-podev__qinput{
  flex:none;width:34px!important;min-width:34px!important;max-width:34px!important;height:44px!important;padding:0!important;margin:0!important;
  border:0!important;border-left:1px solid var(--xcell-n-200,#E2E5EA)!important;border-right:1px solid var(--xcell-n-200,#E2E5EA)!important;border-radius:0!important;
  text-align:center!important;font:inherit;font-size:14px!important;font-weight:700;color:var(--xcell-ink-800,#14171F)!important;background:#fff!important;box-shadow:none!important;-moz-appearance:textfield;
}
.xcell-podev__qinput::-webkit-outer-spin-button,.xcell-podev__qinput::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}

.xcell-podev__add{
  /* WooCommerce/WoodMart's `.woocommerce a.button` (specificity 0,2,1) out-ranks this
   * single class, so the label was rendering at WoodMart's size as inline-block — small
   * and not vertically centred. Force the flex centring + label size with !important. */
  display:inline-flex!important;align-items:center!important;justify-content:center!important;border:0;cursor:pointer;min-height:44px; /* ≥44px touch target (brand rule) */
  background:var(--xcell-red-500,#D42027)!important;color:#fff!important;font:inherit;font-size:15px!important;line-height:1!important;font-weight:700!important;
  border-radius:var(--xcell-r-pill,9999px);padding:10px 18px;text-decoration:none;transition:.15s var(--xcell-ease,ease);white-space:nowrap;
}
.xcell-podev__add:hover,
.xcell-podev__add:focus{background:var(--xcell-red-600,#B11A20)!important;color:#fff!important}

@media(max-width:768px){
  .xcell-po-bar{gap:8px;padding:12px}
  .xcell-po-spacer{display:none}
  .xcell-po-count{width:100%;order:5}
}
/* Phone: tighten the device cards so two fit a 375px row without clipping the
   buy controls (the grid holds 2-col down to 360 per the brand rule). */
@media(max-width:480px){
  .xcell-podev{padding:12px}
  .xcell-podev__img{margin-bottom:10px}
  .xcell-podev__nm,
  a.xcell-podev__nm,
  .woocommerce a.xcell-podev__nm{font-size:14.5px}
  .xcell-podev__grade{font-size:11.5px;padding:4px 9px;top:12px;left:12px}
  /* Stack the buy controls so the stepper + Add each stay full-width with
     >=44px touch targets even in a 2-col phone grid (was 30px-wide steppers). */
  .xcell-podev__buy{flex-direction:column;align-items:stretch;gap:8px}
  .xcell-podev__add{padding:12px;width:100%}
  .xcell-podev__qty{width:100%;justify-content:space-between}
  .xcell-podev__qbtn{flex:1 1 0;width:auto!important;min-width:44px!important}
  .xcell-podev__qinput{flex:1 1 0;width:auto!important;min-width:44px!important;max-width:none!important}
}

/* Grid items default to min-width:auto, so a long product name / SKU can blow a
   column wider than 1fr and push the 2nd card off-screen (the "products cutting
   off" bug). Let columns shrink + wrap long tokens so the grid always fits. */
.xcell-po-shop,.xcell-po-results,.xcell-podev-grid{max-width:100%;min-width:0}
.xcell-podev{min-width:0}
.xcell-podev__nm,.xcell-podev__vr{overflow-wrap:anywhere;word-break:break-word}

/* =========================================================================
 * Mobile Filters / Sort bottom-sheets (≤1024px). The toolbar + sheets are built
 * by xcell-preowned-shop.js, which (on phones) moves the real dropdowns into the
 * sheets — so this only styles the chrome. Hidden by default; shown on phones.
 * ===================================================================== */
.xcell-po-mbar{display:none}
.xcell-po-backdrop,.xcell-po-sheet{display:none}

@media(max-width:1024px){
  /* swap the inline bar for the compact toolbar */
  .xcell-po-shop--sheet .xcell-po-bar{display:none !important}
  .xcell-po-mbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;row-gap:8px;margin:0 0 12px}
  /* Pre-JS / no-JS: never paint the desktop pill stack on phones — the filters
     live behind the server-rendered Filters button; search + count stay in the
     bar. Once the JS moves each control into a sheet it's no longer a direct
     .xcell-po-bar child, so this rule stops applying (the sheet shows it). */
  .xcell-po-bar > .xcell-po-dd,
  .xcell-po-bar > .xcell-po-toggle,
  .xcell-po-bar > .xcell-po-grades,
  .xcell-po-bar > .xcell-po-spacer,
  .xcell-po-bar > .xcell-po-clear{display:none !important}
  /* Pre-JS / no-JS: also slot the bar's search + count into their FINAL spots
     (search full-width above the Filters/Sort buttons, count on its own line
     beneath) — display:contents lifts them out of the bar box so CSS order can
     interleave them around the server-rendered .xcell-po-mbar. The JS handoff
     (enter() moves both INTO the toolbar and adds .xcell-po-shop--sheet, which
     gates all of this off) then changes nothing visually. */
  .xcell-po-shop:not(.xcell-po-shop--sheet){display:flex;flex-direction:column}
  .xcell-po-shop:not(.xcell-po-shop--sheet) > .xcell-shop-title{order:-2}
  .xcell-po-shop:not(.xcell-po-shop--sheet) > .xcell-po-bar{display:contents}
  .xcell-po-shop:not(.xcell-po-shop--sheet) > .xcell-po-bar > .xcell-po-qwrap{order:-1;flex:none;width:auto;min-width:0;margin:0 0 8px}
  /* order:0 pins the count right under the toolbar — the ≤768 desktop-bar rule
     (.xcell-po-count{order:5}) would otherwise sort it below the grid here. */
  .xcell-po-shop:not(.xcell-po-shop--sheet) > .xcell-po-bar > .xcell-po-count{order:0;margin:-2px 0 12px;font-size:13px;color:var(--xcell-n-500,#6B7280)}
  .xcell-po-shop:not(.xcell-po-shop--sheet) > .xcell-po-bar input.xcell-po-q{height:var(--xcell-tap,44px)!important;min-height:var(--xcell-tap,44px)!important}
  .xcell-po-mbtn{
    display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;
    border:1px solid var(--xcell-n-200,#E2E5EA);border-radius:var(--xcell-r-pill,9999px);
    background:#fff;color:var(--xcell-ink-700,#1F2330);font:inherit;font-size:13.5px;font-weight:600;
    padding:0 15px;min-height:var(--xcell-tap,44px);cursor:pointer;transition:.14s var(--xcell-ease,ease);
  }
  .xcell-po-mbtn:active{transform:scale(.98)}
  .xcell-po-mbtn svg{width:16px;height:16px;flex:none}
  .xcell-po-mbtn--filters.is-active{border-color:var(--xcell-red-500,#D42027);background:var(--xcell-red-50,#FDECEE);color:var(--xcell-red-700,#8E1419)}
  .xcell-po-mbtn__n{
    display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;
    border-radius:9999px;background:var(--xcell-red-500,#D42027);color:#fff;font-size:11px;font-weight:800;line-height:1;
  }
  /* the display:inline-flex above would otherwise beat the UA's [hidden] rule
     and show an empty badge (0 active filters / the pre-JS SSR shell) */
  .xcell-po-mbtn__n[hidden]{display:none!important}
  /* Sort fills the rest of the Filters/Sort row so the two sit on ONE line,
     justified across the full width (flex-basis:0 keeps them from wrapping apart
     on a narrow phone); the label ellipsizes if the row is tight. */
  .xcell-po-mbtn--sort{flex:1 1 0;min-width:0}
  .xcell-po-mbtn--sort .xcell-po-mbtn__lbl{max-width:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  /* Product count on its own full-width line beneath the Filters/Sort buttons, so
     it can never be pushed off-screen / clipped on a narrow phone. */
  .xcell-po-mbar .xcell-po-count{flex:1 0 100%;order:5;width:100%;margin:2px 0 0;font-size:13px;color:var(--xcell-n-500,#6B7280);white-space:nowrap}
  /* Live search rides the toolbar (the bar itself is hidden in sheet mode) —
     full row above the Filters/Sort buttons. */
  .xcell-po-mbar .xcell-po-qwrap{flex:1 0 100%;order:-1}
  .xcell-po-mbar .xcell-po-q{min-height:var(--xcell-tap,44px)}
  /* Quick toggles inside the Filters sheet keep their pill look with room to tap. */
  .xcell-po-sheet .xcell-po-toggle{margin:4px 8px 4px 0;min-height:var(--xcell-tap,44px)}
  /* Custom price row: finger-sized fields that stretch across the sheet. */
  .xcell-po-sheet .xcell-po-pcustom{padding:12px 4px 6px}
  .xcell-po-sheet .xcell-po-pcustom input{min-height:var(--xcell-tap,44px)}
  .xcell-po-sheet .xcell-po-papply{min-height:var(--xcell-tap,44px);padding:8px 20px!important}

  /* backdrop */
  .xcell-po-backdrop{
    position:fixed;inset:0;z-index:1200;background:rgba(14,17,22,.45);
    opacity:0;visibility:hidden;transition:opacity .2s var(--xcell-ease,ease);
  }
  .xcell-po-backdrop.is-open{display:block;opacity:1;visibility:visible}

  /* sheet shell */
  .xcell-po-sheet{
    display:flex;flex-direction:column;position:fixed;left:0;right:0;bottom:0;z-index:1210;
    max-height:85vh;background:#fff;border-radius:18px 18px 0 0;
    box-shadow:0 -10px 30px rgba(14,17,22,.22);
    transform:translateY(101%);transition:transform .26s var(--xcell-ease,ease);
  }
  .xcell-po-sheet.is-open{transform:translateY(0)}
  .xcell-po-sheet__head{
    display:flex;align-items:center;justify-content:space-between;flex:none;
    padding:16px 18px 10px;border-bottom:1px solid var(--xcell-n-100,#EEF0F3);
  }
  .xcell-po-sheet__title{font-size:16px;font-weight:800;color:var(--xcell-ink-800,#14171F)}
  .xcell-po-sheet__close{
    border:0;background:none;font-size:26px;line-height:1;color:var(--xcell-n-500,#6B7280);
    cursor:pointer;width:44px;height:44px;margin:-8px -10px -8px 0;
  }
  .xcell-po-sheet__body{flex:1 1 auto;overflow:auto;-webkit-overflow-scrolling:touch;padding:4px 18px 10px}
  .xcell-po-sheet__lbl{
    font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
    color:var(--xcell-n-500,#6B7280);margin:14px 0 8px;
  }

  /* facets shown expanded (no nested dropdowns) inside the sheet */
  .xcell-po-sheet .xcell-po-dd{position:static;border-top:1px solid var(--xcell-n-100,#EEF0F3);padding:8px 0}
  .xcell-po-sheet .xcell-po-dd:first-child{border-top:0}
  .xcell-po-sheet .xcell-po-dd__btn{
    width:100%;justify-content:flex-start;gap:6px;border:0;background:none;padding:6px 0;
    font-size:12px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--xcell-n-600,#4B515C);
  }
  .xcell-po-sheet .xcell-po-dd__btn:hover{border:0}
  .xcell-po-sheet .xcell-po-dd__btn i{display:none}
  .xcell-po-sheet .xcell-po-dd__btn span[data-label]{
    margin-left:auto;font-weight:600;letter-spacing:0;text-transform:none;color:var(--xcell-red-600,#B11A20);
  }
  .xcell-po-sheet .xcell-po-dd__menu{
    display:block;position:static;min-width:0;max-width:none;max-height:none;overflow:visible;
    border:0;box-shadow:none;padding:0;margin:2px 0 0;
  }
  /* !important: must outrank the base rules' theme-bleed armor. */
  .xcell-po-sheet .xcell-po-dd__menu button:not(.xcell-po-papply){font-size:15px!important;padding:11px 10px!important;border-radius:10px!important}
  /* Multi-select rows keep the checkbox indent — the padding above ties the
     base [data-multi] rule on specificity and wins on order, so re-assert it
     here with more weight (checkbox draws at left:11px). */
  .xcell-po-sheet .xcell-po-dd[data-multi] .xcell-po-dd__menu button:not(.xcell-po-papply){padding-left:36px!important}
  .xcell-po-sheet .xcell-po-dd[data-multi] .xcell-po-dd__menu button[data-term=""]{padding-left:10px!important}
  /* Selected option = readable light-red chip (defends against a theme override
     painting it a solid-red bar / washing out the label). */
  .xcell-po-sheet .xcell-po-dd__menu button.is-on{background:var(--xcell-red-50,#FDECEE)!important;color:var(--xcell-red-700,#8E1419)!important}
  .xcell-po-sheet .xcell-po-grades{display:flex;flex-wrap:wrap;gap:8px}
  .xcell-po-sheet .xcell-po-grade{min-height:44px}

  /* sheet footer: Clear all (when active) + the primary "See results" button */
  .xcell-po-sheet__foot{
    display:flex;align-items:center;gap:12px;flex:none;
    padding:12px 18px;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));
    border-top:1px solid var(--xcell-n-100,#EEF0F3);
  }
  .xcell-po-sheet__foot button.xcell-po-clear.xcell-po-clear.xcell-po-clear{flex:0 0 auto;margin:0;padding:12px 8px!important;font-size:14px!important}
  .xcell-po-sheet__apply{
    flex:1 1 auto;min-height:48px;border:0;border-radius:var(--xcell-r-pill,9999px);
    background:var(--xcell-red-500,#D42027);color:#fff;font:inherit;font-weight:700;font-size:15px;cursor:pointer;
    transition:.15s var(--xcell-ease,ease);
  }
  .xcell-po-sheet__apply:hover{background:var(--xcell-red-600,#B11A20)}

  /* lock the page scroll behind an open sheet */
  html.xcell-po-sheetopen,html.xcell-po-sheetopen body{overflow:hidden}
}

@media(prefers-reduced-motion:reduce){
  .xcell-po-sheet,.xcell-po-backdrop{transition:none}
}
