/* =====================================================
   MeerStickers — Shop Page Styles
   Loaded alongside homepage.css (shared header/footer)
   Scoped under body.ms-shoppage
   ===================================================== */

/* Parent theme (Bootstrap 3) sets html{font-size:10px} which breaks rem values.
   Override to 16px so our rem-based font sizes render at intended sizes.
   Bootstrap 3 core components use px/em, not rem, so this is safe.
   margin-top:0 overrides WP's admin-bar bump on html — compensation is on body instead. */
html { font-size: 16px !important; margin-top: 0 !important; }

/* ── Re-declare CSS vars for shop page ──────────────── */
body.ms-shoppage {
  --ms-green:      #6ab023;
  --ms-green-dark: #558f1b;
  --ms-orange:     #e8420a;
  --ms-orange-dark:#c23508;
  --ms-bg:         #f8f8f6;
  --ms-surface:    #ffffff;
  --ms-border:     #e4e2dc;
  --ms-text:       #1a1a1a;
  --ms-muted:      #6b6b6b;
  --ms-radius:     4px;
  --ms-transition: 180ms ease;

  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  background: var(--ms-bg) !important;
  color: var(--ms-text) !important;
  font-size: 16px !important;
  line-height: 1.6 !important;
  -webkit-font-smoothing: antialiased;
  margin: 0 !important;
  padding: 0 !important;
}

body.ms-shoppage *,
body.ms-shoppage *::before,
body.ms-shoppage *::after { box-sizing: border-box !important; }

body.ms-shoppage img { display: block; max-width: 100%; }
body.ms-shoppage a { text-decoration: none !important; color: inherit; }
body.ms-shoppage ul { list-style: none !important; padding: 0 !important; margin: 0 !important; }
/* Mega menu must not inherit page-level ul reset */
body.ms-shoppage ul.mega-sub-menu { margin-top: 24px !important; list-style: none !important; }
body.ms-shoppage h1,
body.ms-shoppage h2,
body.ms-shoppage h3 { margin: 0 !important; }

/* Kill parent-theme layout wrappers */
body.ms-shoppage #page,
body.ms-shoppage .site,
body.ms-shoppage #content,
body.ms-shoppage .site-content,
body.ms-shoppage #primary,
body.ms-shoppage .content-area {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
}

/* html{margin-top:0} overrides WP's admin-bar bump — no compensation needed. */
body.admin-bar.ms-shoppage,
body.admin-bar.ms-shoppage #page {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ── Header vertical alignment ──────────────────────────
   Bootstrap 3 floats top-align the three columns (logo / nav / cart).
   Making the container a flex row centres them on the same horizontal line.
   We do NOT touch float or height on the child columns — that was what
   broke cart positioning in an earlier attempt. */
body.ms-shoppage .header-wrap > .container {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

/* Cancel the 25px inline margin-top the parent theme JS injects on the nav column. */
body.ms-shoppage .header-right-wrap-top {
  margin-top: 0 !important;
}

/* Search icon (.fa-search): float:right + height:30px in a 50px column → sits at top.
   margin-top centres the 30px element: (50-30)/2 = 10px. */
body.ms-shoppage .header-right-cart-search .header-search .fa-search,
body.ms-shoppage .header-right-cart-search .header-search .nas-icon-click {
  margin-top: 10px !important;
}

/* form.search-form:after is position:absolute;top:0 — pull it to vertical centre. */
body.ms-shoppage .header-right-cart-search form.search-form:after {
  top: 50% !important;
  transform: translateY(-50%) !important;
}

/* ── Breadcrumb ─────────────────────────────────────── */
.ms-breadcrumb {
  background: #fff;
  border-bottom: 1px solid var(--ms-border);
  padding: 10px 20px;
}
.ms-breadcrumb__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--ms-muted);
  flex-wrap: wrap;
}
.ms-breadcrumb__inner a { color: var(--ms-muted); transition: color var(--ms-transition); }
.ms-breadcrumb__inner a:hover { color: var(--ms-green); }
.ms-breadcrumb__sep { color: #ccc; }
.ms-breadcrumb__cur { color: var(--ms-text); font-weight: 600; }

/* ── Shop Hero ──────────────────────────────────────── */
.ms-shop-hero {
  background: #1c1f18;
  padding: 36px 20px 0;
  position: relative;
  overflow: hidden;
}
.ms-shop-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.ms-shop-hero__inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.ms-shop-hero__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 28px;
}
.ms-shop-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--ms-green);
  color: var(--ms-green);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.ms-shop-hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem) !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  letter-spacing: -.02em !important;
  text-transform: uppercase !important;
  color: #fff !important;
  margin-bottom: 10px !important;
}
.ms-shop-hero__title em { font-style: normal; color: var(--ms-orange); }
.ms-shop-hero__sub { font-size: .92rem; color: #9a9a9a; max-width: 480px; line-height: 1.75; }
.ms-shop-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ms-orange);
  color: #fff !important;
  font-size: .82rem;
  font-weight: 800;
  padding: 13px 26px;
  border-radius: var(--ms-radius);
  border: 2px solid var(--ms-orange);
  text-transform: uppercase;
  letter-spacing: .07em;
  transition: background var(--ms-transition), border-color var(--ms-transition);
  white-space: nowrap;
  align-self: flex-end;
  margin-bottom: 64px;
}
.ms-shop-hero__cta:hover { background: var(--ms-orange-dark); border-color: var(--ms-orange-dark); color: #fff !important; }

/* Scroll arrow buttons (shared) */
.ms-scroll-arrow {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: opacity var(--ms-transition), background var(--ms-transition), border-color var(--ms-transition);
}
.ms-scroll-arrow[hidden] { display: none !important; }
/* Dark variant (on dark background — tab bar) */
.ms-scroll-arrow--dark { background: rgba(255,255,255,.12); color: #fff; }
.ms-scroll-arrow--dark:hover { background: rgba(255,255,255,.22); }
/* Light variant (on white background — bestsellers) */
.ms-scroll-arrow--light {
  background: var(--ms-surface);
  border: 1.5px solid var(--ms-border);
  color: var(--ms-muted);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.ms-scroll-arrow--light:hover { border-color: var(--ms-green); color: var(--ms-green); }

/* Category tabs scroller wrapper */
.ms-tabs-scroller {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.ms-tabs-scroller .ms-cat-tabs-bar { flex: 1; min-width: 0; border-top: none; }

/* Category tab bar */
.ms-cat-tabs-bar {
  overflow-x: auto;
  scrollbar-width: none;
}
.ms-cat-tabs-bar::-webkit-scrollbar { display: none; }
.ms-cat-tabs { display: flex; min-width: max-content; }
.ms-cat-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  font-size: .82rem;
  font-weight: 700;
  color: #b8b8b8;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--ms-transition), border-color var(--ms-transition);
  text-transform: uppercase;
  letter-spacing: .04em;
  text-decoration: none !important;
}
.ms-cat-tab:hover { color: #fff !important; }
.ms-cat-tab.active { color: var(--ms-orange) !important; border-bottom-color: var(--ms-orange); }
.ms-cat-tab__icon { font-size: 1rem; }
.ms-cat-tab__label { color: #b8b8b8 !important; transition: color var(--ms-transition); }
.ms-cat-tab:hover .ms-cat-tab__label { color: #fff !important; }
.ms-cat-tab.active .ms-cat-tab__label { color: var(--ms-orange) !important; }
.ms-cat-tab__count {
  font-size: .65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  color: #aaa;
}
.ms-cat-tab.active .ms-cat-tab__count { background: rgba(232,66,10,.18); color: var(--ms-orange); }

/* ── Bestsellers Row ────────────────────────────────── */
.ms-best-row { background: #fff; border-bottom: 2px solid var(--ms-border); padding: 28px 20px; }
.ms-best-row__inner { max-width: 1200px; margin: 0 auto; }
.ms-best-row__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.ms-best-row__label {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ms-orange);
  margin-bottom: 4px;
}
.ms-best-row__title { font-size: 1.2rem !important; font-weight: 800 !important; letter-spacing: -.02em !important; }
.ms-best-row__title span { color: var(--ms-orange); }
.ms-best-row__link { font-size: .82rem; font-weight: 600; color: var(--ms-green); white-space: nowrap; }
.ms-best-row__link:hover { text-decoration: underline !important; }

/* Bestsellers scroller wrapper */
.ms-best-scroller { display: flex; align-items: center; gap: 8px; }
.ms-best-scroller .ms-best-scroll { flex: 1; min-width: 0; }

.ms-best-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.ms-best-scroll::-webkit-scrollbar { display: none; }
.ms-bcard {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ms-bg);
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius);
  padding: 12px 16px;
  min-width: 230px;
  cursor: pointer;
  transition: border-color var(--ms-transition), box-shadow var(--ms-transition);
  flex-shrink: 0;
  text-decoration: none !important;
  color: inherit !important;
}
.ms-bcard:hover { border-color: var(--ms-orange); box-shadow: 0 3px 12px rgba(0,0,0,.07); color: inherit !important; }
.ms-bcard__thumb { width: 52px; height: 52px; border-radius: 6px; overflow: hidden; background: #eeecea; flex-shrink: 0; }
.ms-bcard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ms-bcard__name {
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 3px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  color: var(--ms-text);
}
.ms-bcard__price { font-size: .82rem; font-weight: 800; color: var(--ms-orange); }
.ms-bcard__from { font-size: .68rem; font-weight: 400; color: var(--ms-muted); }

/* ── Shop Layout ────────────────────────────────────── */
.ms-shop-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 72px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 900px) {
  .ms-shop-layout { grid-template-columns: 236px 1fr; gap: 32px; align-items: start; }
}

/* ── Sidebar ────────────────────────────────────────── */
.ms-sidebar { position: sticky; top: 80px; }
.ms-filter-card {
  background: var(--ms-surface);
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius);
  overflow: hidden;
}
.ms-filter-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--ms-border);
}
.ms-filter-card__title { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ms-filter-clear { font-size: .75rem; font-weight: 600; color: var(--ms-orange); background: none; border: none; cursor: pointer; padding: 0; font-family: inherit; }
.ms-filter-clear:hover { text-decoration: underline !important; }

.ms-fgroup { border-bottom: 1px solid var(--ms-border); }
.ms-fgroup:last-child { border-bottom: none; }
.ms-fgroup__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ms-text);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--ms-transition);
  font-family: inherit;
}
.ms-fgroup__btn:hover { background: #fafaf8; }
.ms-fgroup__btn svg { width: 12px; height: 12px; color: var(--ms-muted); transition: transform 180ms; flex-shrink: 0; }
.ms-fgroup__btn.ms-open svg { transform: rotate(180deg); }
.ms-fgroup__body { padding: 2px 16px 12px; display: none; }
.ms-fgroup__body.ms-open { display: block; }

.ms-fopt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
  cursor: pointer;
  font-size: .82rem;
  user-select: none;
}
.ms-fopt a { color: inherit; display: flex; align-items: center; gap: 9px; width: 100%; }
.ms-fopt input[type=checkbox] { display: none; }
.ms-fcheck {
  width: 16px;
  height: 16px;
  border: 1.5px solid #d0cfc9;
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ms-transition);
}
.ms-fopt.ms-checked .ms-fcheck { background: var(--ms-green); border-color: var(--ms-green); }
.ms-fopt.ms-checked .ms-fcheck::after {
  content: '';
  display: block;
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.ms-fopt__n { flex: 1; }
.ms-fopt__c { font-size: .72rem; color: var(--ms-muted); }

.ms-price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 10px; }
.ms-price-input {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1.5px solid var(--ms-border);
  border-radius: var(--ms-radius);
  padding: 6px 9px;
  font-size: .78rem;
  color: var(--ms-muted);
  transition: border-color var(--ms-transition);
}
.ms-price-input:focus-within { border-color: var(--ms-green); }
.ms-price-input input {
  width: 100%;
  border: none;
  background: none;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ms-text);
  outline: none;
}
.ms-btn-apply {
  width: 100%;
  background: var(--ms-green);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: 9px;
  border: none;
  border-radius: var(--ms-radius);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .04em;
  transition: background var(--ms-transition);
  font-family: inherit;
}
.ms-btn-apply:hover { background: var(--ms-green-dark); }
.ms-mob-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ms-surface);
  border: 1.5px solid var(--ms-border);
  border-radius: var(--ms-radius);
  padding: 9px 16px;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--ms-transition);
  font-family: inherit;
}
.ms-mob-filter-btn:hover { border-color: var(--ms-green); }
.ms-mob-filter-btn svg { width: 14px; height: 14px; }
@media (min-width: 900px) { .ms-mob-filter-btn { display: none; } }

/* ── Content ────────────────────────────────────────── */
.ms-shop-content { min-width: 0; position: relative; }

/* ── Loading indicators ─────────────────────────────── */
.ms-topbar-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--ms-green);
  z-index: 999999;
  opacity: 0;
  transition: opacity 150ms ease;
  pointer-events: none;
}
.ms-topbar-progress.ms-loading {
  opacity: 1;
  animation: ms-fake-progress 2.4s cubic-bezier(.1,.6,.4,1) forwards;
}
.ms-topbar-progress.ms-done {
  width: 100% !important;
  animation: none !important;
  opacity: 0;
  transition: width 150ms ease, opacity 400ms ease 100ms;
}
@keyframes ms-fake-progress {
  0%   { width: 0%; }
  25%  { width: 45%; }
  50%  { width: 68%; }
  75%  { width: 82%; }
  100% { width: 90%; }
}
.ms-grid-loading {
  position: absolute;
  inset: 0;
  background: rgba(248,248,246,.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  border-radius: var(--ms-radius);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.ms-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid var(--ms-border);
  border-top-color: var(--ms-green);
  border-radius: 50%;
  animation: ms-spin .65s linear infinite;
}
@keyframes ms-spin { to { transform: rotate(360deg); } }

/* Active chips */
.ms-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; min-height: 1px; }
.ms-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0f7e6;
  border: 1px solid #c5e39a;
  color: var(--ms-green-dark);
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-decoration: none !important;
}
.ms-chip:hover { background: #dff0b8; }

/* Toolbar */
.ms-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.ms-toolbar__l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ms-toolbar__count { font-size: .82rem; color: var(--ms-muted); }
.ms-toolbar__count strong { color: var(--ms-text); font-weight: 700; }
.ms-toolbar__r { display: flex; align-items: center; gap: 10px; }
.ms-sort-wrap { display: flex; align-items: center; gap: 7px; }
.ms-sort-label { font-size: .78rem; font-weight: 600; color: var(--ms-muted); white-space: nowrap; }
.ms-sort-sel {
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ms-text);
  background: var(--ms-surface);
  border: 1.5px solid var(--ms-border);
  border-radius: var(--ms-radius);
  padding: 7px 32px 7px 11px;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b6b6b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color var(--ms-transition);
}
.ms-sort-sel:focus { border-color: var(--ms-green); }
.ms-view-toggle { display: flex; border: 1.5px solid var(--ms-border); border-radius: var(--ms-radius); overflow: hidden; }
.ms-view-btn {
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ms-muted);
  transition: background var(--ms-transition), color var(--ms-transition);
}
.ms-view-btn:hover { background: #f5f5f3; }
.ms-view-btn.ms-active { background: var(--ms-green); color: #fff; }
.ms-view-btn svg { width: 14px; height: 14px; }

/* ── Product Grid ────────────────────────────────────── */
.ms-pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 600px) { .ms-pgrid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .ms-pgrid { grid-template-columns: repeat(4, 1fr); } }

/* Card wrapper (div, not a, to allow button inside) */
.ms-pcard {
  background: var(--ms-surface);
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius);
  overflow: hidden;
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  transition: border-color var(--ms-transition), box-shadow var(--ms-transition), transform var(--ms-transition);
  cursor: pointer;
}
.ms-pcard:hover {
  border-color: var(--ms-green);
  box-shadow: 0 6px 22px rgba(0,0,0,.09);
  transform: translateY(-2px);
}

/* Badge */
.ms-pcard__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 3px;
  line-height: 1;
  pointer-events: none;
}
.ms-badge-pop  { background: #1c1f18; color: #fff; }
.ms-badge-new  { background: var(--ms-green); color: #fff; }
.ms-badge-sale { background: var(--ms-orange); color: #fff; }
.ms-badge-des  { background: rgba(106,176,35,.15); color: #558f1b; border: 1px solid rgba(106,176,35,.3); }

/* Wishlist */
.ms-pcard__wish {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--ms-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--ms-transition);
  color: var(--ms-muted);
}
.ms-pcard:hover .ms-pcard__wish { opacity: 1; }
.ms-pcard__wish svg { width: 13px; height: 13px; }

/* Image */
.ms-pcard__img { width: 100%; aspect-ratio: 1; background: #eeecea; overflow: hidden; flex-shrink: 0; }
.ms-pcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 250ms ease; }
.ms-pcard:hover .ms-pcard__img img { transform: scale(1.04); }

/* Body */
.ms-pcard__body {
  padding: 11px 12px 14px;
  display: flex !important;
  flex-direction: column !important;
  flex: 1;
}
.ms-pcard__meta { font-size: .7rem; color: var(--ms-muted); margin-bottom: 4px; }
.ms-pcard__name {
  font-size: .82rem !important;
  font-weight: 600 !important;
  color: var(--ms-text) !important;
  line-height: 1.4 !important;
  margin-bottom: 8px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  height: calc(0.82rem * 1.4 * 2) !important;
  min-height: calc(0.82rem * 1.4 * 2) !important;
}
.ms-pcard__price {
  font-size: .96rem;
  font-weight: 800;
  color: var(--ms-orange);
  margin-top: auto !important;
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.ms-pcard__price .woocommerce-Price-amount { color: var(--ms-orange); }
.ms-pcard__price ins { text-decoration: none; }
.ms-pcard__price del { color: var(--ms-muted); font-size: .78rem; font-weight: 400; }
.ms-pcard__from { font-size: .7rem; color: var(--ms-muted); font-weight: 400; }

.ms-pcard__add,
.ms-pcard__add.ajax_add_to_cart {
  width: 100% !important;
  background: var(--ms-orange) !important;
  color: #fff !important;
  font-size: .75rem !important;
  font-weight: 700 !important;
  padding: 9px !important;
  border: 2px solid var(--ms-orange) !important;
  border-radius: var(--ms-radius) !important;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .04em;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background var(--ms-transition), border-color var(--ms-transition);
  font-family: inherit !important;
  text-decoration: none !important;
  line-height: 1 !important;
}
.ms-pcard__add:hover,
.ms-pcard__add.ajax_add_to_cart:hover {
  background: var(--ms-orange-dark) !important;
  border-color: var(--ms-orange-dark) !important;
  color: #fff !important;
}
.ms-pcard__add svg { width: 12px; height: 12px; flex-shrink: 0; }
.ms-pcard__add .ms-btn-text { font-size: .75rem !important; font-weight: 700 !important; color: inherit !important; text-transform: uppercase !important; letter-spacing: .04em !important; line-height: 1 !important; }
.ms-pcard__add--design {
  background: transparent !important;
  color: var(--ms-green) !important;
  border-color: var(--ms-green) !important;
}
.ms-pcard__add--design:hover { background: var(--ms-green) !important; color: #fff !important; }

/* WC loading state */
.ms-pcard__add.loading::after { display: none; }

/* List view */
.ms-pgrid.ms-list { grid-template-columns: 1fr; gap: 8px; }
.ms-pgrid.ms-list .ms-pcard { flex-direction: row !important; }
.ms-pgrid.ms-list .ms-pcard__img { width: 110px; aspect-ratio: auto; flex-shrink: 0; }
.ms-pgrid.ms-list .ms-pcard__body {
  flex-direction: row !important;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
}
.ms-pgrid.ms-list .ms-pcard__info { flex: 1; min-width: 140px; }
.ms-pgrid.ms-list .ms-pcard__name { -webkit-line-clamp: 1 !important; height: auto !important; min-height: 0 !important; }
.ms-pgrid.ms-list .ms-pcard__price { margin: 0 !important; min-width: 72px; justify-content: flex-end; }
.ms-pgrid.ms-list .ms-pcard__add { width: auto !important; min-width: 130px; flex-shrink: 0; }
.ms-pgrid.ms-list .ms-pcard__wish { display: none; }

/* No products */
.ms-no-products { grid-column: 1 / -1; text-align: center; padding: 48px 20px; color: var(--ms-muted); }

/* ── Pagination ──────────────────────────────────────── */
.ms-pagi-wrap { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.ms-btn-more {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  background: transparent !important;
  border: 2px solid var(--ms-green) !important;
  color: var(--ms-green) !important;
  font-size: .82rem !important;
  font-weight: 700 !important;
  padding: 10px 24px !important;
  border-radius: 30px !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  letter-spacing: .05em !important;
  transition: background var(--ms-transition), color var(--ms-transition) !important;
  cursor: pointer !important;
  font-family: inherit !important;
  line-height: 1 !important;
  width: auto !important;
  flex-direction: row !important;
}
.ms-btn-more:hover { background: var(--ms-green) !important; color: #fff !important; }
.ms-btn-more svg { width: 14px !important; height: 14px !important; flex-shrink: 0 !important; }
.ms-progress-wrap { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ms-progress-bar { width: 100%; height: 3px; background: var(--ms-border); border-radius: 2px; overflow: hidden; }
.ms-progress-bar__fill { height: 100%; background: var(--ms-green); border-radius: 2px; }
.ms-progress-label { font-size: .78rem; color: var(--ms-muted); }
.ms-progress-label strong { color: var(--ms-text); }
.ms-pagi { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.ms-ppage {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ms-muted);
  background: var(--ms-surface);
  border: 1.5px solid var(--ms-border);
  border-radius: var(--ms-radius);
  text-decoration: none !important;
  transition: all var(--ms-transition);
}
.ms-ppage:hover { border-color: var(--ms-green); color: var(--ms-green); }
.ms-ppage.ms-active,
.ms-ppage[aria-current="page"] { background: var(--ms-green); border-color: var(--ms-green); color: #fff !important; font-weight: 700; }
.ms-pdots { color: var(--ms-muted); font-size: .82rem; line-height: 36px; padding: 0 2px; }

/* ── B2B Banner ──────────────────────────────────────── */
.ms-b2b-banner { background: #bfc840; padding: 52px 20px; position: relative; overflow: hidden; }
.ms-b2b-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.ms-b2b-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 768px) { .ms-b2b-banner__inner { grid-template-columns: 1fr auto; } }
.ms-b2b-banner__eye { font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #3a4a00; margin-bottom: 10px; }
.ms-b2b-banner__title {
  font-size: clamp(1.4rem, 3vw, 2rem) !important;
  font-weight: 800 !important;
  color: #1a1a1a !important;
  letter-spacing: -.02em !important;
  line-height: 1.2 !important;
  margin-bottom: 10px !important;
}
.ms-b2b-banner__title span { color: var(--ms-orange); }
.ms-b2b-banner__body { font-size: .9rem; color: #3a3a00; max-width: 520px; line-height: 1.7; }
.ms-b2b-banner__actions { display: flex; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
.ms-btn-b2b-pri {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ms-orange);
  color: #fff !important;
  font-size: .85rem;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: var(--ms-radius);
  border: 2px solid var(--ms-orange);
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: background var(--ms-transition);
  white-space: nowrap;
}
.ms-btn-b2b-pri:hover { background: var(--ms-orange-dark); border-color: var(--ms-orange-dark); color: #fff !important; }
.ms-btn-b2b-sec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #1a1a1a !important;
  font-size: .85rem;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: var(--ms-radius);
  border: 2px solid rgba(0,0,0,.3);
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: border-color var(--ms-transition), background var(--ms-transition);
  white-space: nowrap;
}
.ms-btn-b2b-sec:hover { border-color: rgba(0,0,0,.6); background: rgba(0,0,0,.07); }

/* ── Mobile Filter Drawer ────────────────────────────── */

/* Backdrop overlay */
.ms-filter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9998;
  cursor: pointer;
}
body.ms-filter-open .ms-filter-overlay { display: block; }

/* Drawer close button (header row inside the drawer) */
.ms-mob-drawer-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--ms-border);
}
.ms-mob-drawer-close {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ms-bg); border: 1.5px solid var(--ms-border);
  border-radius: 50%; cursor: pointer; color: var(--ms-muted);
  transition: background var(--ms-transition), color var(--ms-transition);
}
.ms-mob-drawer-close svg { width: 14px; height: 14px; }
.ms-mob-drawer-close:hover { background: var(--ms-border); color: var(--ms-text); }

@media (max-width: 899px) {
  /* Fix 1: sidebar must not be sticky on mobile — causes overlap over product grid */
  .ms-sidebar { position: static !important; }

  /* Filter drawer: fixed left panel */
  #msSidebarInner {
    position: fixed !important;
    top: 0; left: 0;
    width: min(320px, 90vw);
    height: 100vh; height: 100dvh;
    overflow-y: auto;
    background: var(--ms-surface);
    z-index: 9999;
    padding: 20px 16px 40px;
    box-shadow: 4px 0 28px rgba(0,0,0,.2);
    display: none !important;
  }
  body.ms-filter-open #msSidebarInner { display: block !important; }

  /* Show the drawer close-button row */
  .ms-mob-drawer-head { display: flex; }

  /* Fix 2: toolbar — stack left/right halves on their own full-width rows */
  .ms-toolbar__l { flex: 1 1 100%; justify-content: space-between; }
  .ms-toolbar__r { flex: 1 1 100%; justify-content: space-between; }
  .ms-sort-wrap { flex: 1; min-width: 0; }
  .ms-sort-sel { width: 100% !important; }
}

@media (min-width: 900px) {
  /* Ensure overlay and drawer head never show on desktop */
  .ms-filter-overlay { display: none !important; }
  .ms-mob-drawer-head { display: none !important; }
}

/* ── Reduced motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body.ms-shoppage *,
  body.ms-shoppage *::before,
  body.ms-shoppage *::after { transition: none !important; animation: none !important; }
}

/* ── Blog page hero (no category tabs below, so add bottom padding) ── */
.ms-blog-hero .ms-shop-hero__top { padding-bottom: 36px; }
