/**
 * OEM ASTRA J — Storefront UI v2
 * Wave 1: Catalog · Wave 2: Product detail · Cart · Checkout
 * Landing page styles are untouched.
 */

/* ── Storefront design system tokens ── */
body.catalog-page-open,
body.catalog-branch-mode,
body:has(#catalogDrawer.open),
body.product-page-open,
body:has(#cartDrawer.open),
body:has(#checkoutModal.open) {
  --sf-bg: #ffffff;
  --sf-surface: #ffffff;
  --sf-surface-secondary: #f8fafc;
  --sf-primary: var(--navy, #0a1946);
  --sf-primary-hover: var(--navy2, #0d2260);
  --sf-secondary: var(--navy2, #0d2260);
  --sf-text: #1f2937;
  --sf-text-secondary: #6b7280;
  --sf-border: #e5e7eb;
  --sf-success: #047857;
  --sf-success-bg: rgba(16, 185, 129, 0.12);
  --sf-success-border: rgba(16, 185, 129, 0.35);
  --sf-warning: #b45309;
  --sf-danger: #b91c1c;
  --sf-danger-bg: rgba(215, 25, 32, 0.1);
  --sf-danger-border: rgba(215, 25, 32, 0.35);
  --sf-radius: 12px;
  --sf-radius-sm: 8px;
  --sf-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  --sf-shadow-hover: 0 12px 32px rgba(15, 23, 42, 0.12);
  --sf-spacing-xs: 6px;
  --sf-spacing-sm: 10px;
  --sf-spacing-md: 16px;
  --sf-spacing-lg: 24px;
  --sf-transition: 0.22s ease;
  /* Wave 1 aliases */
  --store-bg: var(--sf-surface);
  --store-bg-secondary: var(--sf-surface-secondary);
  --store-text: var(--sf-text);
  --store-text-muted: var(--sf-text-secondary);
  --store-border: var(--sf-border);
  --store-primary: var(--sf-primary);
  --store-primary-hover: var(--sf-primary-hover);
  --store-radius: var(--sf-radius);
  --store-shadow: var(--sf-shadow);
  --store-shadow-hover: var(--sf-shadow-hover);
  /* Typography scale */
  --sf-font-label: 10px;
  --sf-font-meta: 12px;
  --sf-font-body: 14px;
  --sf-font-title: 15px;
  --sf-font-price: 24px;
  --sf-font-oem: 15px;
  --sf-lh-tight: 1.3;
  --sf-lh-body: 1.45;
  --sf-ls-label: 0.08em;
  --sf-ls-oem: 0.03em;
}

/* ── Store mode: dark premium corporate header + white content below ── */
body.catalog-page-open > nav:not(.mob-bottom-bar),
body.catalog-branch-mode > nav:not(.mob-bottom-bar),
body:has(#catalogDrawer.open) > nav:not(.mob-bottom-bar) {
  background: var(--nav-surface, #000);
  border-bottom: 1px solid var(--nav-line, rgba(255, 255, 255, 0.1));
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  padding-bottom: 0;
}

body.catalog-page-open .nav-main,
body.catalog-branch-mode .nav-main,
body:has(#catalogDrawer.open) .nav-main {
  background: var(--nav-surface, #000);
}

body.catalog-page-open .nav-logo,
body.catalog-branch-mode .nav-logo,
body:has(#catalogDrawer.open) .nav-logo {
  z-index: 1020;
  margin-left: -6px;
  margin-right: 0;
  justify-content: flex-start;
}

@media (max-width: 899px) {
  body.catalog-page-open .nav-logo,
  body.catalog-branch-mode .nav-logo,
  body:has(#catalogDrawer.open) .nav-logo {
    height: var(--nav-main-h);
    max-width: min(240px, 30vw);
  }

  body.catalog-page-open .nav-logo-img,
  body.catalog-branch-mode .nav-logo-img,
  body:has(#catalogDrawer.open) .nav-logo-img {
    height: var(--nav-logo-h) !important;
    max-height: var(--nav-logo-h) !important;
  }
}

body.catalog-page-open .nav-main,
body.catalog-branch-mode .nav-main,
body:has(#catalogDrawer.open) .nav-main {
  height: var(--nav-main-h) !important;
  min-height: var(--nav-main-h);
  max-height: var(--nav-main-h);
}

body.catalog-page-open .nav-shop-btn,
body.catalog-branch-mode .nav-shop-btn,
body:has(#catalogDrawer.open) .nav-shop-btn {
  display: none;
}

/* Search bar: compact on catalog / store modes (mobile) */
body.catalog-page-open,
body.catalog-branch-mode,
body:has(#catalogDrawer.open) {
  --nav-quick-cats-h: 0px;
  --nav-search-gap: 0px;
}

@media (max-width: 899px) {
  body.catalog-page-open,
  body.catalog-branch-mode,
  body:has(#catalogDrawer.open) {
    --nav-main-h: 88px;
    --nav-total-h: 88px;
    --nav-logo-h: 64px;
    --nav-search-h: 38px;
    --nav-search-stack-offset: 6px;
    --nav-mob-h: 72px;
    --nav-mob-logo-h: 64px;
  }
}

@media (min-width: 900px) {
  body.catalog-page-open,
  body.catalog-branch-mode,
  body.catalog-drawer-open,
  body:has(#catalogDrawer.open),
  body.catalog-drawer-push {
    --nav-main-h: calc((88px * 1.4 - 1.5cm) * 0.95);
    --nav-total-h: calc((88px * 1.4 - 1.5cm) * 0.95);
    --nav-logo-h: calc((76px * 1.4 - 1.5cm) * 0.95);
    --nav-search-h: 40px;
    --nav-search-stack-offset: 0;
  }
}

@media (max-width: 899px) {
  body.catalog-page-open .nav-actions-wrap,
  body.catalog-branch-mode .nav-actions-wrap,
  body:has(#catalogDrawer.open) .nav-actions-wrap {
    flex: 1;
    min-width: 0;
    width: 100%;
    align-self: stretch;
    padding-top: var(--nav-search-stack-offset);
    min-height: calc(var(--nav-search-h) + var(--nav-quick-cats-h) + var(--nav-search-gap, 6px));
  }

  body.catalog-page-open .nav-main-actions,
  body.catalog-branch-mode .nav-main-actions,
  body:has(#catalogDrawer.open) .nav-main-actions {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: auto;
    align-items: flex-start;
  }
}

@media (min-width: 900px) {
  body.catalog-page-open .nav-actions-wrap,
  body.catalog-branch-mode .nav-actions-wrap,
  body.catalog-drawer-open .nav-actions-wrap,
  body:has(#catalogDrawer.open) .nav-actions-wrap,
  body.catalog-drawer-push .nav-actions-wrap {
    flex: 1 1 auto !important;
    align-self: center !important;
    align-items: center !important;
    justify-content: stretch;
    height: 100%;
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  body.catalog-page-open .nav-main-actions,
  body.catalog-branch-mode .nav-main-actions,
  body.catalog-drawer-open .nav-main-actions,
  body:has(#catalogDrawer.open) .nav-main-actions,
  body.catalog-drawer-push .nav-main-actions {
    align-items: center !important;
    align-self: center !important;
    height: auto !important;
    min-height: 0;
    flex-wrap: nowrap;
  }

  body.catalog-page-open .nav-main-row,
  body.catalog-branch-mode .nav-main-row,
  body.catalog-drawer-open .nav-main-row,
  body:has(#catalogDrawer.open) .nav-main-row,
  body.catalog-drawer-push .nav-main-row {
    align-items: center !important;
    height: 100%;
  }

  body.catalog-page-open .nav-main,
  body.catalog-branch-mode .nav-main,
  body.catalog-drawer-open .nav-main,
  body:has(#catalogDrawer.open) .nav-main,
  body.catalog-drawer-push .nav-main {
    display: flex;
    align-items: center;
  }

  body.catalog-page-open .nav-logo,
  body.catalog-branch-mode .nav-logo,
  body.catalog-drawer-open .nav-logo,
  body:has(#catalogDrawer.open) .nav-logo,
  body.catalog-drawer-push .nav-logo {
    height: 100%;
    max-width: min(220px, 36vw);
    align-self: center;
  }

  body.catalog-page-open .nav-logo-img,
  body.catalog-branch-mode .nav-logo-img,
  body.catalog-drawer-open .nav-logo-img,
  body:has(#catalogDrawer.open) .nav-logo-img,
  body.catalog-drawer-push .nav-logo-img {
    height: auto !important;
    max-height: calc(var(--nav-logo-h) * 1.2) !important;
    width: auto;
    max-width: 100%;
    object-fit: contain;
  }
}

body.catalog-page-open .nav-search-wrap,
body.catalog-branch-mode .nav-search-wrap,
body:has(#catalogDrawer.open) .nav-search-wrap {
  flex: 1;
  min-width: 0;
  max-width: none;
  width: 100%;
  padding-top: 0;
}

@media (min-width: 900px) {
  body.catalog-page-open .nav-search-wrap,
  body.catalog-branch-mode .nav-search-wrap,
  body.catalog-drawer-open .nav-search-wrap,
  body:has(#catalogDrawer.open) .nav-search-wrap,
  body.catalog-drawer-push .nav-search-wrap {
    flex: 1 1 auto;
    width: auto !important;
    min-width: min(320px, 42vw);
    max-width: 23cm;
    align-self: center !important;
    padding-top: 0 !important;
  }
}

body.catalog-page-open .nav-search,
body.catalog-branch-mode .nav-search,
body:has(#catalogDrawer.open) .nav-search {
  width: 100%;
  min-height: var(--nav-search-h);
  height: var(--nav-search-h);
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

@media (min-width: 900px) {
  body.catalog-page-open .nav-search,
  body.catalog-branch-mode .nav-search,
  body.catalog-drawer-open .nav-search,
  body:has(#catalogDrawer.open) .nav-search,
  body.catalog-drawer-push .nav-search {
    height: 40px;
    min-height: 40px;
    box-shadow: none;
    background: #fff;
    border: 1px solid #d4d4d4;
  }

  body.catalog-page-open .nav-search input,
  body.catalog-branch-mode .nav-search input,
  body.catalog-drawer-open .nav-search input,
  body:has(#catalogDrawer.open) .nav-search input,
  body.catalog-drawer-push .nav-search input {
    height: 40px;
    font-size: 12px;
  }

  body.catalog-page-open .nav-search-filter select,
  body.catalog-branch-mode .nav-search-filter select,
  body.catalog-drawer-open .nav-search-filter select,
  body:has(#catalogDrawer.open) .nav-search-filter select,
  body.catalog-drawer-push .nav-search-filter select {
    height: 40px;
    font-size: 12px;
  }

  body.catalog-page-open .nav-search-filter,
  body.catalog-branch-mode .nav-search-filter,
  body.catalog-drawer-open .nav-search-filter,
  body:has(#catalogDrawer.open) .nav-search-filter,
  body.catalog-drawer-push .nav-search-filter {
    min-width: 118px;
    background: #e8e8e8;
  }

  body.catalog-page-open .nav-search-btn,
  body.catalog-branch-mode .nav-search-btn,
  body.catalog-drawer-open .nav-search-btn,
  body:has(#catalogDrawer.open) .nav-search-btn,
  body.catalog-drawer-push .nav-search-btn {
    height: 40px;
  }
}

body.catalog-page-open .nav-search input,
body.catalog-branch-mode .nav-search input,
body:has(#catalogDrawer.open) .nav-search input {
  font-size: 14px;
  font-weight: 500;
  padding-inline: 12px;
}

body.catalog-page-open .nav-search-filter select,
body.catalog-branch-mode .nav-search-filter select,
body:has(#catalogDrawer.open) .nav-search-filter select {
  font-size: 12px;
  font-weight: 700;
  height: var(--nav-search-h);
  padding-inline: 10px 28px;
}

body.catalog-page-open .nav-search-filter,
body.catalog-branch-mode .nav-search-filter,
body:has(#catalogDrawer.open) .nav-search-filter {
  min-width: 108px;
  background: #ececec;
}

body.catalog-page-open .nav-search-btn,
body.catalog-branch-mode .nav-search-btn,
body:has(#catalogDrawer.open) .nav-search-btn {
  padding-inline: 12px;
}

body.catalog-page-open .nav-search-btn svg,
body.catalog-branch-mode .nav-search-btn svg,
body:has(#catalogDrawer.open) .nav-search-btn svg {
  width: 18px;
  height: 18px;
}

body.catalog-page-open .nav-search:focus-within,
body.catalog-branch-mode .nav-search:focus-within,
body:has(#catalogDrawer.open) .nav-search:focus-within {
  box-shadow: 0 0 0 2px rgba(10, 25, 70, 0.35);
}

/* Catalog modes: hide header quick-cats — drawer tree is the nav */
body.catalog-page-open .nav-quick-cats,
body.catalog-branch-mode .nav-quick-cats,
body.catalog-drawer-open .nav-quick-cats,
body:has(#catalogDrawer.open) .nav-quick-cats {
  display: none !important;
}

body.catalog-page-open,
body.catalog-branch-mode,
body.catalog-drawer-open,
body:has(#catalogDrawer.open) {
  --nav-quick-cats-h: 0px;
  --nav-search-gap: 0px;
}

/* Nav quick cats — hidden; catalog navigation via drawer / SHOP NOW */
.nav-quick-cats {
  display: none !important;
}

/* Nav quick cats — text only, no icons or pill chrome (legacy) */
.nav-quick-cats .nav-quick-menu-btn,
.nav-quick-cats .nav-quick-cat,
.nav-quick-cats .nav-quick-cat--group,
.nav-quick-cats .nav-quick-cat--parts {
  display: inline-flex !important;
  align-items: center;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 6px !important;
  gap: 0 !important;
}

.nav-quick-cats img,
.nav-quick-cats svg,
.nav-quick-menu-btn svg,
.nav-quick-cat-icon {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.nav-quick-cats .nav-quick-menu-btn.active,
.nav-quick-cats .nav-quick-cat.active,
.nav-quick-cats .nav-quick-cat--group.active {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--gold-light, #e2c15a) !important;
  font-weight: 800 !important;
}

body.catalog-page-open .nav-quick-menu-btn,
body.catalog-branch-mode .nav-quick-menu-btn,
body:has(#catalogDrawer.open) .nav-quick-menu-btn,
body.catalog-page-open .nav-quick-cat,
body.catalog-branch-mode .nav-quick-cat,
body:has(#catalogDrawer.open) .nav-quick-cat,
body.catalog-page-open .nav-quick-cat--group,
body.catalog-branch-mode .nav-quick-cat--group,
body:has(#catalogDrawer.open) .nav-quick-cat--group {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  line-height: 1.15;
}

body.catalog-page-open .nav-quick-menu-btn,
body.catalog-branch-mode .nav-quick-menu-btn,
body:has(#catalogDrawer.open) .nav-quick-menu-btn {
  display: inline-flex !important;
  color: rgba(255, 255, 255, 0.78);
  padding: 0 6px 0 0;
}

body.catalog-page-open .nav-quick-cat.active,
body.catalog-branch-mode .nav-quick-cat.active,
body:has(#catalogDrawer.open) .nav-quick-cat.active,
body.catalog-page-open .nav-quick-menu-btn.active,
body.catalog-branch-mode .nav-quick-menu-btn.active,
body:has(#catalogDrawer.open) .nav-quick-menu-btn.active {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--gold-light, #e2c15a) !important;
  font-weight: 800;
}

body.catalog-page-open .nav-cart-btn,
body.catalog-branch-mode .nav-cart-btn,
body:has(#catalogDrawer.open) .nav-cart-btn,
body.catalog-page-open .nav-pill-btn,
body.catalog-branch-mode .nav-pill-btn,
body:has(#catalogDrawer.open) .nav-pill-btn {
  color: var(--nav-ink, #eef0f3);
}

body.catalog-page-open .nav-lang-btn,
body.catalog-branch-mode .nav-lang-btn,
body:has(#catalogDrawer.open) .nav-lang-btn {
  color: var(--nav-muted, #9aa3b0);
}

body.catalog-page-open .nav-lang-btn:hover,
body.catalog-branch-mode .nav-lang-btn:hover,
body:has(#catalogDrawer.open) .nav-lang-btn:hover {
  color: var(--red, #d71920);
}

/* Catalog / drawer push — flexible header so cart + icons stay visible */
@media (min-width: 901px) {
  body.catalog-page-open .nav-main-actions,
  body.catalog-branch-mode .nav-main-actions,
  body.catalog-drawer-open .nav-main-actions,
  body:has(#catalogDrawer.open) .nav-main-actions,
  body.catalog-drawer-push .nav-main-actions {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  body.catalog-page-open .nav-trade-cluster,
  body.catalog-branch-mode .nav-trade-cluster,
  body.catalog-drawer-open .nav-trade-cluster,
  body:has(#catalogDrawer.open) .nav-trade-cluster,
  body.catalog-drawer-push .nav-trade-cluster {
    display: flex !important;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
  }

  body.catalog-page-open .nav-util-cluster,
  body.catalog-branch-mode .nav-util-cluster,
  body.catalog-drawer-open .nav-util-cluster,
  body:has(#catalogDrawer.open) .nav-util-cluster,
  body.catalog-drawer-push .nav-util-cluster {
    display: flex !important;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  body.catalog-page-open .nav-search-wrap,
  body.catalog-branch-mode .nav-search-wrap,
  body.catalog-drawer-open .nav-search-wrap,
  body:has(#catalogDrawer.open) .nav-search-wrap,
  body.catalog-drawer-push .nav-search-wrap {
    flex: 1 1 auto;
    width: auto !important;
    min-width: min(320px, 42vw);
    max-width: 23cm;
    align-self: center !important;
    padding-top: 0 !important;
  }

  body.catalog-page-open .nav-actions-wrap,
  body.catalog-branch-mode .nav-actions-wrap,
  body.catalog-drawer-open .nav-actions-wrap,
  body:has(#catalogDrawer.open) .nav-actions-wrap,
  body.catalog-drawer-push .nav-actions-wrap {
    align-self: center !important;
    align-items: center !important;
    padding-top: 0 !important;
    min-height: 0 !important;
    height: 100%;
    min-width: 0;
    overflow: visible;
  }

  body.catalog-page-open .nav-main-actions,
  body.catalog-branch-mode .nav-main-actions,
  body.catalog-drawer-open .nav-main-actions,
  body:has(#catalogDrawer.open) .nav-main-actions,
  body.catalog-drawer-push .nav-main-actions {
    align-items: center !important;
    align-self: center !important;
    height: auto !important;
    flex-wrap: nowrap;
  }

  body.catalog-page-open .nav-shell.nav-main-row,
  body.catalog-branch-mode .nav-shell.nav-main-row,
  body.catalog-drawer-open .nav-shell.nav-main-row,
  body:has(#catalogDrawer.open) .nav-shell.nav-main-row,
  body.catalog-drawer-push .nav-shell.nav-main-row {
    padding-inline-end: 12px !important;
    gap: 10px;
    min-width: 0;
    overflow: visible;
    align-items: center !important;
    height: 100%;
  }

  body.catalog-page-open .nav-lang-wrap,
  body.catalog-branch-mode .nav-lang-wrap,
  body.catalog-drawer-open .nav-lang-wrap,
  body:has(#catalogDrawer.open) .nav-lang-wrap,
  body.catalog-drawer-push .nav-lang-wrap {
    margin-inline-start: 0 !important;
    flex-shrink: 0;
  }

  body.catalog-page-open .nav-account,
  body.catalog-branch-mode .nav-account,
  body.catalog-drawer-open .nav-account,
  body:has(#catalogDrawer.open) .nav-account,
  body.catalog-drawer-push .nav-account,
  body.catalog-page-open .nav-btn-auth,
  body.catalog-branch-mode .nav-btn-auth,
  body.catalog-drawer-open .nav-btn-auth,
  body:has(#catalogDrawer.open) .nav-btn-auth,
  body.catalog-drawer-push .nav-btn-auth {
    flex-shrink: 0;
  }

  body.catalog-page-open .nav-cart-btn,
  body.catalog-branch-mode .nav-cart-btn,
  body.catalog-drawer-open .nav-cart-btn,
  body:has(#catalogDrawer.open) .nav-cart-btn,
  body.catalog-drawer-push .nav-cart-btn {
    flex-shrink: 0;
    overflow: visible;
    margin-inline-end: 2px;
  }

  body.catalog-page-open .nav-cart-icon-wrap,
  body.catalog-branch-mode .nav-cart-icon-wrap,
  body.catalog-drawer-open .nav-cart-icon-wrap,
  body:has(#catalogDrawer.open) .nav-cart-icon-wrap,
  body.catalog-drawer-push .nav-cart-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
  }

  body.catalog-page-open .nav-cart-label,
  body.catalog-branch-mode .nav-cart-label,
  body.catalog-drawer-open .nav-cart-label,
  body:has(#catalogDrawer.open) .nav-cart-label,
  body.catalog-drawer-push .nav-cart-label {
    display: none !important;
  }

  body.catalog-page-open .nav-main,
  body.catalog-branch-mode .nav-main,
  body.catalog-drawer-open .nav-main,
  body:has(#catalogDrawer.open) .nav-main,
  body.catalog-drawer-push .nav-main {
    overflow: visible;
    display: flex;
    align-items: center;
    height: var(--nav-main-h) !important;
    min-height: var(--nav-main-h);
    max-height: var(--nav-main-h);
  }

  /* LTR: drop fixed 23cm grid when catalog is open — keeps bar height + search size stable */
  html[dir="ltr"] body.catalog-page-open .nav-main-actions,
  html[dir="ltr"] body.catalog-branch-mode .nav-main-actions,
  html[dir="ltr"] body.catalog-drawer-open .nav-main-actions,
  html[dir="ltr"] body:has(#catalogDrawer.open) .nav-main-actions,
  html[dir="ltr"] body.catalog-drawer-push .nav-main-actions {
    display: flex !important;
    grid-template-columns: unset !important;
    grid-template-areas: unset !important;
    align-items: center !important;
    align-self: center !important;
    height: auto !important;
    min-height: 0;
    gap: 10px;
    flex-wrap: nowrap;
  }

  html[dir="ltr"] body.catalog-page-open .nav-trade-cluster,
  html[dir="ltr"] body.catalog-branch-mode .nav-trade-cluster,
  html[dir="ltr"] body.catalog-drawer-open .nav-trade-cluster,
  html[dir="ltr"] body:has(#catalogDrawer.open) .nav-trade-cluster,
  html[dir="ltr"] body.catalog-drawer-push .nav-trade-cluster {
    display: flex !important;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    gap: 10px;
  }

  html[dir="ltr"] body.catalog-page-open .nav-util-cluster,
  html[dir="ltr"] body.catalog-branch-mode .nav-util-cluster,
  html[dir="ltr"] body.catalog-drawer-open .nav-util-cluster,
  html[dir="ltr"] body:has(#catalogDrawer.open) .nav-util-cluster,
  html[dir="ltr"] body.catalog-drawer-push .nav-util-cluster {
    display: flex !important;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
  }

  html[dir="ltr"] body.catalog-page-open .nav-search-wrap,
  html[dir="ltr"] body.catalog-branch-mode .nav-search-wrap,
  html[dir="ltr"] body.catalog-drawer-open .nav-search-wrap,
  html[dir="ltr"] body:has(#catalogDrawer.open) .nav-search-wrap,
  html[dir="ltr"] body.catalog-drawer-push .nav-search-wrap {
    grid-area: unset !important;
    display: flex !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding-top: 0 !important;
    align-self: center !important;
  }

  html[dir="ltr"] body.catalog-page-open .nav-actions-wrap,
  html[dir="ltr"] body.catalog-branch-mode .nav-actions-wrap,
  html[dir="ltr"] body.catalog-drawer-open .nav-actions-wrap,
  html[dir="ltr"] body:has(#catalogDrawer.open) .nav-actions-wrap,
  html[dir="ltr"] body.catalog-drawer-push .nav-actions-wrap {
    align-self: center !important;
    padding-top: 0 !important;
    min-height: 0 !important;
    height: 100%;
  }

  html[dir="ltr"] body.catalog-page-open .nav-logo,
  html[dir="ltr"] body.catalog-branch-mode .nav-logo,
  html[dir="ltr"] body.catalog-drawer-open .nav-logo,
  html[dir="ltr"] body:has(#catalogDrawer.open) .nav-logo,
  html[dir="ltr"] body.catalog-drawer-push .nav-logo {
    height: 100%;
    max-width: min(220px, 36vw);
    margin-left: 0 !important;
    margin-inline-start: 0 !important;
  }
}

/* Search dropdown stays light for readability */
body.catalog-page-open #navSearchDropdown.nav-search-dropdown,
body.catalog-branch-mode #navSearchDropdown.nav-search-dropdown,
body:has(#catalogDrawer.open) #navSearchDropdown.nav-search-dropdown {
  background: var(--sf-surface);
  border: 1px solid var(--sf-border);
  box-shadow: var(--sf-shadow-hover);
  border-radius: var(--sf-radius);
}

body.catalog-page-open #navSearchDropdown .search-drop-name,
body.catalog-branch-mode #navSearchDropdown .search-drop-name,
body:has(#catalogDrawer.open) #navSearchDropdown .search-drop-name {
  color: var(--sf-text);
}

body.catalog-page-open #navSearchDropdown .search-drop-count strong,
body.catalog-branch-mode #navSearchDropdown .search-drop-count strong,
body:has(#catalogDrawer.open) #navSearchDropdown .search-drop-count strong {
  color: var(--sf-primary);
}

/* ── Catalog shell: bright environment ── */
body.catalog-page-open,
body.catalog-branch-mode {
  /* Keep page canvas black so overscroll / gap below footer matches the dark footer */
  background: #090909;
  color: var(--store-text);
}

body.catalog-page-open .catalog-branch-shell,
body.catalog-branch-mode .catalog-branch-shell {
  background: var(--store-bg-secondary) !important;
  margin-top: calc(var(--nav-total-h) + 4px) !important;
  min-height: calc(100dvh - var(--nav-total-h) - 4px) !important;
  border-top: none !important;
}

body.catalog-page-open #products.section,
body.catalog-page-open #products.catalog-branch-main,
body.catalog-branch-mode #products.section,
body.catalog-branch-mode #products.catalog-branch-main {
  background: var(--store-bg-secondary) !important;
}

@media (min-width: 900px) {
  /* #products is not inside .catalog-branch-shell — clear fixed nav so breadcrumb stays visible */
  body.catalog-page-open #products.section,
  body.catalog-page-open #products.catalog-branch-main,
  body.catalog-branch-mode #products.section,
  body.catalog-branch-mode #products.catalog-branch-main {
    padding-top: calc(var(--nav-total-h) + 12px) !important;
    scroll-margin-top: calc(var(--nav-total-h) + 12px);
  }
}

body.catalog-page-open #products .section-inner,
body.catalog-branch-mode #products .section-inner {
  padding-inline: 16px;
}

@media (min-width: 900px) {
  body.catalog-page-open #products .section-inner,
  body.catalog-branch-mode #products .section-inner {
    padding-inline: 24px;
  }
}

/* Branch sidebar (category tree) */
body.catalog-page-open .catalog-branch-page,
body.catalog-branch-mode .catalog-branch-page {
  background: var(--store-bg) !important;
  border-bottom-color: var(--store-border) !important;
  border-inline-end-color: var(--store-border) !important;
}

body.catalog-page-open .catalog-branch-toolbar,
body.catalog-branch-mode .catalog-branch-toolbar {
  background: var(--store-bg) !important;
  border-color: var(--store-border) !important;
  padding: 10px 12px !important;
}

body.catalog-page-open .catalog-branch-toolbar h1,
body.catalog-branch-mode .catalog-branch-toolbar h1 {
  color: var(--store-text) !important;
  font-size: 16px;
}

body.catalog-page-open .catalog-branch-switch,
body.catalog-branch-mode .catalog-branch-switch {
  background: var(--store-bg-secondary) !important;
  border-color: var(--store-border) !important;
  color: var(--store-text) !important;
}

body.catalog-page-open .catalog-branch-switch:hover,
body.catalog-branch-mode .catalog-branch-switch:hover {
  background: #fff !important;
  border-color: var(--store-primary) !important;
  color: var(--store-primary) !important;
}

body.catalog-page-open .catalog-branch-search-wrap,
body.catalog-branch-mode .catalog-branch-search-wrap {
  background: var(--store-bg) !important;
  border-bottom-color: var(--store-border) !important;
  padding: 8px 12px !important;
}

body.catalog-page-open .catalog-branch-search,
body.catalog-branch-mode .catalog-branch-search {
  background: var(--store-bg) !important;
  border: 1px solid var(--store-border) !important;
  border-radius: 10px;
}

body.catalog-page-open .catalog-branch-search input,
body.catalog-branch-mode .catalog-branch-search input {
  color: var(--store-text) !important;
}

body.catalog-page-open .catalog-branch-search input::placeholder,
body.catalog-branch-mode .catalog-branch-search input::placeholder {
  color: #9ca3af !important;
}

body.catalog-page-open .catalog-branch-search:focus-within,
body.catalog-branch-mode .catalog-branch-search:focus-within {
  border-color: var(--store-primary) !important;
  box-shadow: 0 0 0 3px rgba(10, 25, 70, 0.1) !important;
}

body.catalog-page-open .catalog-branch-tree-wrap,
body.catalog-branch-mode .catalog-branch-tree-wrap {
  background: var(--store-bg) !important;
  scrollbar-color: #cbd5e1 transparent;
}

body.catalog-page-open .catalog-branch-path,
body.catalog-branch-mode .catalog-branch-path {
  color: var(--store-text-muted) !important;
}

body.catalog-page-open .catalog-branch-path button,
body.catalog-branch-mode .catalog-branch-path button {
  color: var(--store-primary) !important;
}

body.catalog-page-open .catalog-branch-path .current,
body.catalog-branch-mode .catalog-branch-path .current {
  color: var(--store-text) !important;
}

body.catalog-page-open .branch-node-head,
body.catalog-branch-mode .branch-node-head {
  background: var(--store-bg-secondary) !important;
  border-color: var(--store-border) !important;
}

body.catalog-page-open .branch-node-head:hover,
body.catalog-branch-mode .branch-node-head:hover {
  background: #fff !important;
  border-color: #cbd5e1 !important;
}

body.catalog-page-open .branch-node--group.is-focus > .branch-node-head,
body.catalog-branch-mode .branch-node--group.is-focus > .branch-node-head {
  border-color: var(--store-primary) !important;
  background: rgba(10, 25, 70, 0.06) !important;
}

body.catalog-page-open .branch-node--item .branch-node-head,
body.catalog-branch-mode .branch-node--item .branch-node-head {
  background: #fff !important;
  border-color: var(--store-border) !important;
}

body.catalog-page-open .branch-node--item.is-open,
body.catalog-branch-mode .branch-node--item.is-open {
  background: var(--store-bg-secondary) !important;
  border-color: var(--store-border) !important;
}

body.catalog-page-open .branch-label--cat,
body.catalog-branch-mode .branch-label--cat,
body.catalog-page-open .branch-label,
body.catalog-branch-mode .branch-label {
  color: var(--store-text) !important;
}

body.catalog-page-open .branch-brand,
body.catalog-branch-mode .branch-brand {
  color: var(--store-text) !important;
}

body.catalog-page-open .branch-part,
body.catalog-branch-mode .branch-part {
  color: var(--store-text-muted) !important;
}

body.catalog-page-open .branch-node--item.is-active > .branch-node-head,
body.catalog-branch-mode .branch-node--item.is-active > .branch-node-head {
  border-color: var(--store-primary) !important;
  background: rgba(10, 25, 70, 0.08) !important;
  box-shadow: inset 3px 0 0 var(--store-primary) !important;
}

body.catalog-page-open .branch-node--item.is-active .branch-label--cat,
body.catalog-branch-mode .branch-node--item.is-active .branch-label--cat,
body.catalog-page-open .branch-node--item.is-active .branch-count,
body.catalog-branch-mode .branch-node--item.is-active .branch-count {
  color: var(--store-primary) !important;
}

body.catalog-page-open .branch-node--variant.is-active > .branch-node-head,
body.catalog-branch-mode .branch-node--variant.is-active > .branch-node-head {
  border-color: var(--store-primary) !important;
  background: rgba(10, 25, 70, 0.06) !important;
}

body.catalog-page-open .branch-children,
body.catalog-branch-mode .branch-children {
  border-inline-start-color: var(--store-border) !important;
}

body.catalog-page-open .branch-toggle,
body.catalog-branch-mode .branch-toggle,
body.catalog-page-open .branch-count,
body.catalog-branch-mode .branch-count {
  color: var(--store-text-muted) !important;
}

/* Catalog breadcrumbs, tabs, search bar */
body.catalog-page-open #products .catalog-breadcrumb,
body.catalog-branch-mode #products .catalog-breadcrumb {
  color: var(--store-text-muted) !important;
  font-size: 13px;
  margin-bottom: 12px;
}

body.catalog-page-open #products .catalog-breadcrumb button,
body.catalog-branch-mode #products .catalog-breadcrumb button {
  color: var(--store-primary) !important;
}

body.catalog-page-open #products .catalog-breadcrumb button:hover,
body.catalog-branch-mode #products .catalog-breadcrumb button:hover {
  color: var(--store-primary-hover) !important;
}

body.catalog-page-open #products .item-tabs,
body.catalog-branch-mode #products .item-tabs {
  background: transparent;
  border: none;
  gap: 3px;
  margin-bottom: 14px;
}

body.catalog-page-open #products .item-tab,
body.catalog-branch-mode #products .item-tab {
  background: var(--store-bg);
  border: 1px solid var(--store-border);
  color: var(--store-text-muted);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
}

body.catalog-page-open #products .item-tab.active,
body.catalog-branch-mode #products .item-tab.active {
  background: var(--store-primary);
  border-color: var(--store-primary);
  color: #fff;
}

body.catalog-page-open #products .live-search-bar,
body.catalog-branch-mode #products .live-search-bar {
  background: var(--store-bg) !important;
  border: 1px solid var(--store-border) !important;
  color: var(--store-text-muted) !important;
  border-radius: var(--store-radius);
  padding: 10px 14px;
  margin-bottom: 14px;
}

body.catalog-page-open #products .section-label,
body.catalog-branch-mode #products .section-label {
  color: var(--store-text-muted);
  letter-spacing: 0.14em;
  font-size: 11px;
}

body.catalog-page-open #products .section-title,
body.catalog-branch-mode #products .section-title {
  color: var(--store-text);
  font-weight: 800;
}

body.catalog-page-open #products .section-title em,
body.catalog-branch-mode #products .section-title em {
  color: var(--store-primary);
  font-style: normal;
}

/* Filters — dedicated premium card */
body.catalog-page-open #catalogFilterBar,
body.catalog-branch-mode #catalogFilterBar {
  background: var(--store-bg);
  border: 1px solid rgba(10, 25, 70, 0.12);
  border-radius: var(--store-radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  padding: 18px 20px;
  margin-bottom: 20px;
  gap: 14px 18px;
  border-inline-start: 4px solid var(--store-primary);
}

body.catalog-page-open #catalogFilterBar label,
body.catalog-branch-mode #catalogFilterBar label {
  color: var(--store-text-muted);
  font-size: var(--sf-font-label, 10px);
  font-weight: 800;
  letter-spacing: var(--sf-ls-label, 0.08em);
  text-transform: uppercase;
  gap: 6px;
}

body.catalog-page-open #catalogFilterBar select,
body.catalog-branch-mode #catalogFilterBar select,
body.catalog-page-open #catalogFilterBar input[type="number"],
body.catalog-branch-mode #catalogFilterBar input[type="number"] {
  border: 1px solid var(--store-border);
  border-radius: 8px;
  color: var(--store-text);
  background: #fff;
  min-height: 42px;
  font-size: var(--sf-font-body, 14px);
  font-weight: 600;
  padding: 0 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

/* Availability — neutral white */
body.catalog-page-open #catalogFilterAvailability,
body.catalog-branch-mode #catalogFilterAvailability {
  background: #fff !important;
  border-color: var(--store-border) !important;
  color: var(--store-text) !important;
  font-weight: 600 !important;
}

/* Price from / to + sort — visible blue-gray tint */
body.catalog-page-open #catalogFilterPriceMin,
body.catalog-page-open #catalogFilterPriceMax,
body.catalog-page-open #catalogFilterSort,
body.catalog-branch-mode #catalogFilterPriceMin,
body.catalog-branch-mode #catalogFilterPriceMax,
body.catalog-branch-mode #catalogFilterSort {
  background-color: #dce4f5 !important;
  border: 1px solid #8fa3cc !important;
  color: var(--store-primary) !important;
  font-weight: 700 !important;
}

body.catalog-page-open #catalogFilterBar label:has(#catalogFilterPriceMin),
body.catalog-page-open #catalogFilterBar label:has(#catalogFilterPriceMax),
body.catalog-page-open #catalogFilterBar label:has(#catalogFilterSort),
body.catalog-branch-mode #catalogFilterBar label:has(#catalogFilterPriceMin),
body.catalog-branch-mode #catalogFilterBar label:has(#catalogFilterPriceMax),
body.catalog-branch-mode #catalogFilterBar label:has(#catalogFilterSort) {
  color: var(--store-primary);
}

body.catalog-page-open #catalogFilterPriceMin::placeholder,
body.catalog-page-open #catalogFilterPriceMax::placeholder,
body.catalog-branch-mode #catalogFilterPriceMin::placeholder,
body.catalog-branch-mode #catalogFilterPriceMax::placeholder {
  color: rgba(10, 25, 70, 0.45);
  font-weight: 600;
}

body.catalog-page-open #catalogFilterBar select:hover,
body.catalog-branch-mode #catalogFilterBar select:hover {
  border-color: rgba(10, 25, 70, 0.28);
}

body.catalog-page-open #catalogFilterAvailability:hover,
body.catalog-branch-mode #catalogFilterAvailability:hover {
  background: #fff !important;
}

body.catalog-page-open #catalogFilterBar input[type="number"]:hover,
body.catalog-branch-mode #catalogFilterBar input[type="number"]:hover {
  border-color: rgba(10, 25, 70, 0.28);
}

body.catalog-page-open #catalogFilterBar select:focus,
body.catalog-branch-mode #catalogFilterBar select:focus,
body.catalog-page-open #catalogFilterBar input:focus,
body.catalog-branch-mode #catalogFilterBar input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 25, 70, 0.12);
}

body.catalog-page-open #catalogFilterAvailability:focus,
body.catalog-branch-mode #catalogFilterAvailability:focus {
  border-color: var(--store-primary) !important;
  background: #fff !important;
}

body.catalog-page-open #catalogFilterPriceMin:hover,
body.catalog-page-open #catalogFilterPriceMax:hover,
body.catalog-page-open #catalogFilterSort:hover,
body.catalog-branch-mode #catalogFilterPriceMin:hover,
body.catalog-branch-mode #catalogFilterPriceMax:hover,
body.catalog-branch-mode #catalogFilterSort:hover {
  background-color: #cfd9ee !important;
  border-color: #6f86b5 !important;
}

body.catalog-page-open #catalogFilterPriceMin:focus,
body.catalog-page-open #catalogFilterPriceMax:focus,
body.catalog-page-open #catalogFilterSort:focus,
body.catalog-branch-mode #catalogFilterPriceMin:focus,
body.catalog-branch-mode #catalogFilterPriceMax:focus,
body.catalog-branch-mode #catalogFilterSort:focus {
  background-color: #d4dff0 !important;
  border-color: var(--store-primary) !important;
}

body.catalog-page-open #catalogFilterBar .catalog-filter-actions,
body.catalog-branch-mode #catalogFilterBar .catalog-filter-actions {
  gap: 10px;
}

body.catalog-page-open .catalog-filter-reset,
body.catalog-branch-mode .catalog-filter-reset {
  border: 1px solid var(--store-border);
  color: var(--store-text);
  background: var(--store-bg-secondary);
  font-weight: 700;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

body.catalog-page-open .catalog-filter-reset:hover,
body.catalog-branch-mode .catalog-filter-reset:hover {
  border-color: var(--store-primary);
  color: var(--store-primary);
  background: rgba(10, 25, 70, 0.04);
}

/* View toggle */
body.catalog-page-open .catalog-view-toggle,
body.catalog-branch-mode .catalog-view-toggle {
  background: var(--store-bg);
  border-color: var(--store-border);
}

body.catalog-page-open .catalog-view-btn,
body.catalog-branch-mode .catalog-view-btn {
  color: var(--store-text-muted);
}

body.catalog-page-open .catalog-view-btn:hover,
body.catalog-branch-mode .catalog-view-btn:hover {
  color: var(--store-primary);
  background: var(--store-bg-secondary);
}

body.catalog-page-open .catalog-view-btn.is-active,
body.catalog-branch-mode .catalog-view-btn.is-active {
  background: var(--store-primary);
  color: #fff;
}

body.catalog-page-open .btn-all-gold,
body.catalog-branch-mode .btn-all-gold {
  color: var(--store-primary);
  border-color: rgba(10, 25, 70, 0.2);
  background: rgba(10, 25, 70, 0.05);
}

/* Product grid spacing */
body.catalog-page-open #products .products-grid,
body.catalog-branch-mode #products .products-grid {
  gap: 18px;
}

body.catalog-page-open #products .products-grid.catalog-view-grid,
body.catalog-branch-mode #products .products-grid.catalog-view-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

/* ── Product cards (catalog only) ── */
body.catalog-page-open #productsGrid .product-card,
body.catalog-branch-mode #productsGrid .product-card {
  background: var(--store-bg) !important;
  border: 1px solid var(--store-border) !important;
  border-radius: var(--store-radius) !important;
  box-shadow: var(--store-shadow) !important;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

body.catalog-page-open #productsGrid .product-card:hover,
body.catalog-branch-mode #productsGrid .product-card:hover {
  border-color: rgba(10, 25, 70, 0.22) !important;
  transform: translateY(-3px) !important;
  box-shadow: var(--store-shadow-hover) !important;
}

body.catalog-page-open #productsGrid .product-card .product-img-wrap,
body.catalog-branch-mode #productsGrid .product-card .product-img-wrap {
  background: var(--store-bg-secondary) !important;
  height: 220px !important;
}

body.catalog-page-open #productsGrid .product-card .product-img-wrap img,
body.catalog-branch-mode #productsGrid .product-card .product-img-wrap img {
  transition: transform 0.35s ease;
}

body.catalog-page-open #productsGrid .product-card:hover .product-img-wrap img,
body.catalog-branch-mode #productsGrid .product-card:hover .product-img-wrap img {
  transform: scale(1.05);
}

body.catalog-page-open #productsGrid .product-card .product-body,
body.catalog-branch-mode #productsGrid .product-card .product-body {
  padding: 14px 16px !important;
  gap: 10px !important;
}

body.catalog-page-open #productsGrid .product-card .product-name,
body.catalog-page-open #productsGrid .product-card .product-name-ar,
body.catalog-branch-mode #productsGrid .product-card .product-name,
body.catalog-branch-mode #productsGrid .product-card .product-name-ar {
  color: var(--store-text) !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

body.catalog-page-open #productsGrid .product-card .product-card-brand-name,
body.catalog-branch-mode #productsGrid .product-card .product-card-brand-name {
  color: #6b4e0a !important;
  font-size: var(--sf-font-body, 14px);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-en);
  line-height: var(--sf-lh-tight, 1.3);
}

body.catalog-page-open #productsGrid .product-card .product-brand-row,
body.catalog-branch-mode #productsGrid .product-card .product-brand-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid rgba(184, 137, 26, 0.38);
  border-radius: 8px;
}

body.catalog-page-open #productsGrid .product-card .product-card-brand-logo,
body.catalog-branch-mode #productsGrid .product-card .product-card-brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

body.catalog-page-open #productsGrid .product-card .product-price-sale,
body.catalog-page-open #productsGrid .product-card .product-price--single,
body.catalog-branch-mode #productsGrid .product-card .product-price-sale,
body.catalog-branch-mode #productsGrid .product-card .product-price--single {
  color: var(--store-primary) !important;
  font-weight: 800 !important;
  font-size: var(--sf-font-price, 24px) !important;
  line-height: 1.1 !important;
  letter-spacing: -0.02em !important;
  transform: none !important;
  font-family: var(--font-en);
}

body.catalog-page-open #productsGrid .product-card .product-price-sale span,
body.catalog-page-open #productsGrid .product-card .product-price--single span,
body.catalog-branch-mode #productsGrid .product-card .product-price-sale span,
body.catalog-branch-mode #productsGrid .product-card .product-price--single span {
  color: var(--store-text-muted) !important;
}

body.catalog-page-open #productsGrid .product-card .product-price-compare,
body.catalog-branch-mode #productsGrid .product-card .product-price-compare {
  color: var(--store-text-muted) !important;
}

body.catalog-page-open #productsGrid .product-card .product-price-badge,
body.catalog-branch-mode #productsGrid .product-card .product-price-badge {
  color: var(--red) !important;
}

/* Product specs table — unified rows (OEM same style as Part No) */
body.catalog-page-open #productsGrid .product-card-specs-table,
body.catalog-branch-mode #productsGrid .product-card-specs-table {
  border: 1px solid var(--store-border) !important;
  border-radius: 8px;
  background: transparent;
  margin-top: 4px;
  width: 100%;
  overflow: hidden;
}

body.catalog-page-open #productsGrid .product-card-specs-table thead,
body.catalog-branch-mode #productsGrid .product-card-specs-table thead {
  display: none;
}

body.catalog-page-open #productsGrid .product-card-specs-table tbody,
body.catalog-branch-mode #productsGrid .product-card-specs-table tbody {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

body.catalog-page-open #productsGrid .product-card-specs-table tbody tr,
body.catalog-branch-mode #productsGrid .product-card-specs-table tbody tr {
  display: grid;
  grid-template-columns: minmax(88px, 38%) 1fr;
  gap: 8px 12px;
  align-items: start;
  padding: 8px 12px;
  border-bottom: 1px solid var(--store-border);
  width: 100%;
  box-sizing: border-box;
  background: transparent !important;
  opacity: 1 !important;
}

body.catalog-page-open #productsGrid .product-card-specs-table tbody tr.product-spec-oem,
body.catalog-branch-mode #productsGrid .product-card-specs-table tbody tr.product-spec-oem {
  order: -1;
}

body.catalog-page-open #productsGrid .product-card-specs-table tbody tr:last-child,
body.catalog-branch-mode #productsGrid .product-card-specs-table tbody tr:last-child {
  border-bottom: none;
}

body.catalog-page-open #productsGrid .product-card-specs-table tbody th,
body.catalog-branch-mode #productsGrid .product-card-specs-table tbody th {
  display: block !important;
  font-size: var(--sf-font-label, 10px) !important;
  font-weight: 800 !important;
  letter-spacing: var(--sf-ls-label, 0.08em) !important;
  text-transform: uppercase !important;
  color: var(--store-text-muted) !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  width: auto !important;
}

body.catalog-page-open #productsGrid .product-card-specs-table tbody td,
body.catalog-branch-mode #productsGrid .product-card-specs-table tbody td {
  display: block !important;
  font-family: var(--font-en) !important;
  font-size: var(--sf-font-meta, 12px) !important;
  font-weight: 600 !important;
  color: var(--store-text) !important;
  padding: 0 !important;
  border: none !important;
  line-height: var(--sf-lh-body, 1.45) !important;
  white-space: normal !important;
  word-break: break-word;
  overflow: visible !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
}

body.catalog-page-open #productsGrid .product-card-specs-table tbody tr.product-spec-oem td,
body.catalog-branch-mode #productsGrid .product-card-specs-table tbody tr.product-spec-oem td {
  direction: ltr;
  text-align: start;
  unicode-bidi: plaintext;
}

/* Stock badge */
body.catalog-page-open #productsGrid .product-stock-badge,
body.catalog-branch-mode #productsGrid .product-stock-badge {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #047857;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
}

body.catalog-page-open #productsGrid .product-stock-badge.is-out,
body.catalog-branch-mode #productsGrid .product-stock-badge.is-out {
  background: rgba(215, 25, 32, 0.1) !important;
  border-color: rgba(215, 25, 32, 0.35) !important;
  color: #b91c1c !important;
}

/* Add to cart */
body.catalog-page-open #productsGrid .product-card .btn-cart,
body.catalog-branch-mode #productsGrid .product-card .btn-cart {
  background: var(--store-primary) !important;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  min-height: 40px;
  padding: 10px 12px;
}

body.catalog-page-open #productsGrid .product-card .btn-cart:hover,
body.catalog-branch-mode #productsGrid .product-card .btn-cart:hover {
  background: var(--store-primary-hover) !important;
}

body.catalog-page-open #productsGrid .product-card .btn-view-detail,
body.catalog-branch-mode #productsGrid .product-card .btn-view-detail {
  border: 1px solid var(--store-border) !important;
  color: var(--store-text-muted) !important;
  background: var(--store-bg) !important;
}

body.catalog-page-open #productsGrid .product-card .btn-view-detail:hover,
body.catalog-branch-mode #productsGrid .product-card .btn-view-detail:hover {
  border-color: var(--store-primary) !important;
  color: var(--store-primary) !important;
}

body.catalog-page-open #productsGrid .product-card .product-details .product-desc,
body.catalog-branch-mode #productsGrid .product-card .product-details .product-desc {
  color: var(--store-text-muted) !important;
}

body.catalog-page-open #productsGrid .product-card .product-company-link,
body.catalog-branch-mode #productsGrid .product-card .product-company-link {
  color: var(--store-primary) !important;
}

/* No results */
body.catalog-page-open #products .no-results,
body.catalog-branch-mode #products .no-results {
  color: var(--store-text-muted);
}

body.catalog-page-open #products .no-results-title,
body.catalog-branch-mode #products .no-results-title {
  color: var(--store-text);
}

/* ── Category drawer (SHOP NOW entry) ── */
body:has(#catalogDrawer.open) .catalog-drawer {
  background: transparent !important;
  color: var(--store-text);
}

body.catalog-drawer-open .catalog-drawer-head,
body:has(#catalogDrawer.open) .catalog-drawer-head {
  background: transparent !important;
}

body:has(#catalogDrawer.open) .catalog-drawer-bg {
  display: block !important;
}

body:has(#catalogDrawer.open) .catalog-drawer-head-overlay {
  display: block !important;
}

body:has(#catalogDrawer.open) .catalog-drawer-head h2 {
  color: #fff !important;
  font-weight: 800;
  font-size: 17px;
}

body:has(#catalogDrawer.open) .catalog-drawer-close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
}

body:has(#catalogDrawer.open) .catalog-drawer-close svg {
  stroke: #fff !important;
}

body:has(#catalogDrawer.open) .catalog-drawer-search-wrap {
  background: transparent !important;
  border-bottom: none !important;
  padding: 6px 0 0 !important;
}

body:has(#catalogDrawer.open) .catalog-drawer .catalog-drawer-search:not(.catalog-branch-search) {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 10px;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}

body:has(#catalogDrawer.open) .catalog-drawer .catalog-drawer-search:not(.catalog-branch-search) input {
  color: #fff !important;
  background: transparent !important;
}

body:has(#catalogDrawer.open) .catalog-drawer .catalog-drawer-search:not(.catalog-branch-search):focus-within {
  border-color: rgba(212, 175, 55, 0.75) !important;
  background: transparent !important;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35) !important;
}

body:has(#catalogDrawer.open) .catalog-groups-list {
  background: transparent !important;
}

body:has(#catalogDrawer.open) .catalog-group-row {
  border-bottom-color: var(--store-border) !important;
}

body:has(#catalogDrawer.open) .catalog-group-row:hover {
  background: var(--store-bg-secondary) !important;
}

body:has(#catalogDrawer.open) .catalog-group-row.active {
  background: rgba(10, 25, 70, 0.08) !important;
}

body:has(#catalogDrawer.open) .catalog-group-row.active .catalog-group-name {
  color: var(--store-primary) !important;
}

body:has(#catalogDrawer.open) .catalog-group-name {
  color: var(--store-text) !important;
}

body:has(#catalogDrawer.open) .catalog-group-thumb {
  background: var(--store-bg-secondary) !important;
  border-color: var(--store-border) !important;
}

body:has(#catalogDrawer.open) .catalog-group-chevron {
  stroke: var(--store-text-muted) !important;
}

body:has(#catalogDrawer.open) .catalog-drawer-footer {
  background: var(--store-bg) !important;
  border-top-color: var(--store-border) !important;
}

body:has(#catalogDrawer.open) .catalog-drawer-link {
  border-bottom-color: var(--store-border) !important;
}

body:has(#catalogDrawer.open) .catalog-drawer-link:hover {
  background: var(--store-bg-secondary) !important;
}

body:has(#catalogDrawer.open) .catalog-drawer-link-text {
  color: var(--store-text) !important;
}

body:has(#catalogDrawer.open) .catalog-drawer-link-meta {
  color: var(--store-text-muted) !important;
}

body:has(#catalogDrawer.open) .catalog-drawer-link-icon svg {
  stroke: var(--store-text-muted) !important;
}

body:has(#catalogDrawer.open) .catalog-search-dropdown {
  background: var(--store-bg) !important;
  border-color: var(--store-border) !important;
  box-shadow: var(--store-shadow-hover) !important;
}

body:has(#catalogDrawer.open) .catalog-search-dropdown .search-drop-item {
  color: var(--store-text) !important;
  border-bottom-color: var(--store-border) !important;
}

body:has(#catalogDrawer.open) .catalog-search-dropdown .search-drop-item:hover {
  background: var(--store-bg-secondary) !important;
}

/* Mobile bottom bar in store mode */
body.catalog-page-open .mob-bottom-bar,
body.catalog-branch-mode .mob-bottom-bar {
  background: var(--store-bg);
  border-top: 1px solid var(--store-border);
  box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.06);
}

body.catalog-page-open .mob-bottom-bar .mob-tab,
body.catalog-branch-mode .mob-bottom-bar .mob-tab {
  color: var(--store-text-muted);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  body.catalog-page-open #productsGrid .product-card,
  body.catalog-branch-mode #productsGrid .product-card,
  body.catalog-page-open #productsGrid .product-card .product-img-wrap img,
  body.catalog-branch-mode #productsGrid .product-card .product-img-wrap img {
    transition: none !important;
    transform: none !important;
  }
}

/* Drawer / branch search buttons */
body:has(#catalogDrawer.open) .catalog-drawer .catalog-drawer-search:not(.catalog-branch-search) .catalog-drawer-search-btn {
  background: transparent !important;
  color: #fff !important;
}

body.catalog-page-open .catalog-drawer-search-btn,
body.catalog-branch-mode .catalog-drawer-search-btn {
  background: var(--store-primary) !important;
  color: #fff !important;
}

body:has(#catalogDrawer.open) .catalog-branch-search .catalog-drawer-search-btn:hover,
body.catalog-page-open .catalog-branch-search .catalog-drawer-search-btn:hover,
body.catalog-branch-mode .catalog-branch-search .catalog-drawer-search-btn:hover {
  background: var(--store-primary-hover) !important;
}

/* Pagination */
body.catalog-page-open .catalog-pagination,
body.catalog-branch-mode .catalog-pagination {
  margin-top: 20px;
  gap: 12px;
}

body.catalog-page-open .catalog-pagination-btn,
body.catalog-branch-mode .catalog-pagination-btn {
  border: 1px solid var(--store-border);
  background: var(--store-bg);
  color: var(--store-text);
  border-radius: 8px;
}

body.catalog-page-open .catalog-pagination-btn:hover:not(:disabled),
body.catalog-branch-mode .catalog-pagination-btn:hover:not(:disabled) {
  border-color: var(--store-primary);
  color: var(--store-primary);
}

body.catalog-page-open .catalog-pagination-info,
body.catalog-branch-mode .catalog-pagination-info {
  color: var(--store-text-muted);
}

body.catalog-page-open .catalog-pagination-info em,
body.catalog-branch-mode .catalog-pagination-info em {
  color: var(--store-primary);
}

/* List view (desktop) */
@media (min-width: 900px) {
  body.catalog-page-open #productsGrid.catalog-view-list .product-card:hover,
  body.catalog-branch-mode #productsGrid.catalog-view-list .product-card:hover {
    transform: none !important;
    box-shadow: var(--store-shadow-hover) !important;
  }

  body.catalog-page-open #productsGrid.catalog-view-list .product-img-wrap,
  body.catalog-branch-mode #productsGrid.catalog-view-list .product-img-wrap {
    height: auto !important;
    min-height: 160px;
  }
}

/* =============================================================================
   WAVE 2 — Product detail · Cart · Checkout
   Scoped to store overlay components (#pdModal, #cartDrawer, #checkoutModal)
   ============================================================================= */

/* ── Product detail modal ── */
#pdOverlay {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

#pdModal {
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: var(--sf-radius, 12px);
  box-shadow: var(--sf-shadow-hover, 0 12px 32px rgba(15, 23, 42, 0.12));
}

#pdModal .pd-header {
  padding: var(--sf-spacing-md, 16px) var(--sf-spacing-lg, 24px);
  border-bottom: 1px solid var(--sf-border, #e5e7eb);
  background: var(--sf-surface, #fff);
}

#pdModal .pd-header h2 {
  color: var(--sf-text, #1f2937);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

#pdModal .pd-close {
  background: var(--sf-surface-secondary, #f8fafc);
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: var(--sf-radius-sm, 8px);
}

#pdModal .pd-close svg {
  stroke: var(--sf-text-secondary, #6b7280);
}

#pdModal .pd-close:hover {
  border-color: var(--sf-primary, #0a1946);
}

#pdModal .pd-close:hover svg {
  stroke: var(--sf-primary, #0a1946);
}

#pdModal .pd-body {
  padding: var(--sf-spacing-lg, 24px);
  background: var(--sf-surface-secondary, #f8fafc);
}

#pdModal .pd-grid {
  gap: var(--sf-spacing-lg, 24px);
}

/* Gallery */
#pdModal .pd-gallery {
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: var(--sf-radius, 12px);
  box-shadow: var(--sf-shadow, 0 4px 20px rgba(15, 23, 42, 0.08));
}

#pdModal .pd-main-wrap {
  background: var(--sf-surface-secondary, #f8fafc);
}

#pdModal .pd-main-img {
  height: min(340px, 42vh);
  min-height: 240px;
  border-radius: 14px;
  overflow: hidden;
}

#pdModal .pd-main-photo,
#pdModal .pd-main-img img {
  padding: var(--sf-spacing-lg, 24px);
  border-radius: inherit;
}

#pdModal .pd-nav {
  background: rgba(255, 255, 255, 0.92);
  color: var(--sf-primary, #0a1946);
  border: 1px solid var(--sf-border, #e5e7eb);
  box-shadow: var(--sf-shadow, 0 4px 20px rgba(15, 23, 42, 0.08));
}

#pdModal .pd-nav:hover {
  background: var(--sf-primary, #0a1946);
  color: #fff;
}

#pdModal .pd-img-counter,
#pdModal .pd-zoom-hint {
  color: var(--sf-text, #1f2937);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--sf-border, #e5e7eb);
}

#pdModal .pd-thumbs {
  border-top: 1px solid var(--sf-border, #e5e7eb);
  background: var(--sf-surface, #fff);
  padding: var(--sf-spacing-sm, 10px);
  gap: var(--sf-spacing-sm, 10px);
}

#pdModal .pd-thumb {
  background: var(--sf-surface-secondary, #f8fafc);
  border: 2px solid transparent;
  border-radius: var(--sf-radius-sm, 8px);
}

#pdModal .pd-thumb.active {
  border-color: var(--sf-primary, #0a1946);
  box-shadow: 0 0 0 1px rgba(10, 25, 70, 0.15);
}

/* Breadcrumb */
#pdModal .pd-breadcrumb {
  color: var(--sf-text-secondary, #6b7280);
  margin-bottom: var(--sf-spacing-md, 16px);
}

#pdModal .pd-breadcrumb-link {
  color: var(--sf-primary, #0a1946);
}

#pdModal .pd-breadcrumb-link:hover {
  color: var(--sf-primary-hover, #0d2260);
}

#pdModal .pd-breadcrumb-current {
  color: var(--sf-text, #1f2937);
}

/* OEM dedicated block */
#pdModal .pd-oem-block {
  display: grid;
  grid-template-columns: minmax(88px, 38%) 1fr;
  gap: 8px 12px;
  align-items: start;
  padding: 8px 12px;
  margin: 0 0 var(--sf-spacing-sm, 10px);
  background: transparent;
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: var(--sf-radius-sm, 8px);
}

#pdModal .pd-oem-label {
  font-size: var(--sf-font-label, 10px);
  font-weight: 800;
  letter-spacing: var(--sf-ls-label, 0.08em);
  text-transform: uppercase;
  color: var(--sf-text-secondary, #6b7280);
}

#pdModal .pd-oem-value {
  font-family: var(--font-en);
  font-size: var(--sf-font-meta, 12px);
  font-weight: 600;
  letter-spacing: normal;
  color: var(--sf-text, #1f2937);
  line-height: var(--sf-lh-body, 1.45);
  direction: ltr;
  text-align: start;
  unicode-bidi: plaintext;
  word-break: break-word;
}

/* Overview panel content */
#pdModal .pd-info {
  gap: var(--sf-spacing-md, 16px);
}

#pdModal .pd-rating .product-star:not(.is-filled) {
  color: #d1d5db;
}

#pdModal .pd-description {
  color: var(--sf-text, #1f2937);
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: var(--sf-radius-sm, 8px);
  padding: 12px 14px;
}

#pdModal .pd-read-more {
  color: var(--sf-primary, #0a1946);
}

#pdModal .pd-company-link {
  color: var(--sf-primary, #0a1946);
  background: rgba(10, 25, 70, 0.05);
  border-color: rgba(10, 25, 70, 0.18);
}

#pdModal .pd-company-link.is-disabled {
  color: var(--sf-text-secondary, #6b7280);
  background: var(--sf-surface-secondary, #f8fafc);
  border-color: var(--sf-border, #e5e7eb);
}

#pdModal .pd-stock-badge {
  background: var(--sf-success-bg, rgba(16, 185, 129, 0.12));
  border: 1px solid var(--sf-success-border, rgba(16, 185, 129, 0.35));
  color: var(--sf-success, #047857);
}

#pdModal .pd-stock-badge.is-out {
  background: var(--sf-danger-bg, rgba(215, 25, 32, 0.1));
  border-color: var(--sf-danger-border, rgba(215, 25, 32, 0.35));
  color: var(--sf-danger, #b91c1c);
}

#pdModal .pd-price-block .product-price-sale,
#pdModal .pd-price-block .product-price--single {
  color: var(--sf-primary, #0a1946);
  font-size: 32px;
  font-weight: 700;
}

#pdModal .pd-price-block .product-price-sale span,
#pdModal .pd-price-block .product-price--single span {
  color: var(--sf-text-secondary, #6b7280);
}

#pdModal .pd-price-block .product-price-compare {
  color: var(--sf-text-secondary, #6b7280);
}

#pdModal .pd-price-block .product-price-badge {
  color: var(--sf-danger, #b91c1c);
}

#pdModal .pd-share-label {
  color: var(--sf-text-secondary, #6b7280);
}

#pdModal .pd-share-btn {
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
  color: var(--sf-text, #1f2937);
}

#pdModal .pd-share-btn:hover {
  border-color: var(--sf-primary, #0a1946);
  color: var(--sf-primary, #0a1946);
}

#pdModal .pd-order-qty-label {
  color: var(--sf-text-secondary, #6b7280);
}

#pdModal .order-qty-row {
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
}

#pdModal .order-qty-btn {
  color: var(--sf-text, #1f2937);
}

#pdModal .order-qty-btn:hover {
  background: rgba(10, 25, 70, 0.06);
  color: var(--sf-primary, #0a1946);
}

#pdModal .order-qty-val {
  color: var(--sf-text, #1f2937);
}

#pdModal .pd-actions .btn-cart {
  background: var(--sf-primary, #0a1946);
  border-radius: var(--sf-radius-sm, 8px);
  font-weight: 700;
}

#pdModal .pd-actions .btn-cart:hover {
  background: var(--sf-primary-hover, #0d2260);
  box-shadow: 0 6px 18px rgba(10, 25, 70, 0.2);
}

#pdModal .pd-fav-btn {
  border: 1px solid var(--sf-border, #e5e7eb);
  background: var(--sf-surface, #fff);
  color: var(--sf-text-secondary, #6b7280);
  border-radius: var(--sf-radius-sm, 8px);
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

#pdModal .pd-fav-btn.is-active {
  border-color: var(--sf-primary, #0a1946);
  color: var(--sf-primary, #0a1946);
  background: rgba(10, 25, 70, 0.06);
}

/* Tabs */
#pdModal .pd-tabs-nav {
  gap: var(--sf-spacing-xs, 6px);
  margin-bottom: var(--sf-spacing-sm, 10px);
}

#pdModal .pd-tab {
  border: 1px solid var(--sf-border, #e5e7eb);
  background: var(--sf-surface, #fff);
  color: var(--sf-text-secondary, #6b7280);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
}

#pdModal .pd-tab.is-active,
#pdModal .pd-tab:hover {
  border-color: var(--sf-primary, #0a1946);
  color: var(--sf-primary, #0a1946);
  background: rgba(10, 25, 70, 0.06);
}

#pdModal .pd-tab-panel {
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: var(--sf-radius-sm, 8px);
  padding: var(--sf-spacing-md, 16px);
}

#pdModal .pd-tab-empty {
  color: var(--sf-text-secondary, #6b7280);
}

#pdModal .pd-section-title {
  color: var(--sf-primary, #0a1946);
  font-size: 12px;
  letter-spacing: 0.1em;
  margin-bottom: var(--sf-spacing-sm, 10px);
}

/* Specs table */
#pdModal .pd-specs-table {
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: var(--sf-radius-sm, 8px);
}

#pdModal .pd-specs-table thead th {
  background: var(--sf-surface-secondary, #f8fafc);
  color: var(--sf-text-secondary, #6b7280);
  border-bottom: 1px solid var(--sf-border, #e5e7eb);
}

#pdModal .pd-specs-table tbody th {
  color: var(--sf-text-secondary, #6b7280);
  border-bottom: 1px solid var(--sf-border, #e5e7eb);
}

#pdModal .pd-specs-table tbody td {
  color: var(--sf-text, #1f2937);
  border-bottom: 1px solid var(--sf-border, #e5e7eb);
}

#pdModal .pd-specs-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.02);
}

#pdModal .pd-specs-table tbody tr.pd-spec-row-oem {
  background: rgba(10, 25, 70, 0.06);
}

#pdModal .pd-specs-table tbody tr.pd-spec-row-oem th {
  color: var(--sf-primary, #0a1946);
  font-weight: 800;
}

#pdModal .pd-specs-table tbody tr.pd-spec-row-oem td {
  color: var(--sf-primary, #0a1946);
  font-size: 16px;
  font-weight: 800;
}

/* Compatibility */
#pdModal .pd-tab-compat li {
  color: var(--sf-text, #1f2937);
}

#pdModal .pd-compat-check {
  background: rgba(10, 25, 70, 0.08);
  border-color: rgba(10, 25, 70, 0.2);
  color: var(--sf-primary, #0a1946);
}

#pdModal .pd-compat-text {
  color: var(--sf-text, #1f2937);
}

/* Related products */
#pdModal .pd-related {
  border-top: 1px solid var(--sf-border, #e5e7eb);
  margin-top: var(--sf-spacing-md, 16px);
  padding-top: var(--sf-spacing-md, 16px);
}

#pdModal .pd-related-grid {
  gap: var(--sf-spacing-sm, 10px);
}

#pdModal .pd-related-card {
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: var(--sf-radius-sm, 8px);
  box-shadow: var(--sf-shadow, 0 4px 20px rgba(15, 23, 42, 0.08));
  padding: 14px;
  transition: transform var(--sf-transition, 0.22s ease), box-shadow var(--sf-transition, 0.22s ease), border-color var(--sf-transition, 0.22s ease);
}

#pdModal .pd-related-card:hover {
  border-color: rgba(10, 25, 70, 0.22);
  transform: translateY(-2px);
  box-shadow: var(--sf-shadow-hover, 0 12px 32px rgba(15, 23, 42, 0.12));
}

#pdModal .pd-related-name {
  color: var(--sf-text, #1f2937);
  font-size: 13px;
  font-weight: 700;
}

#pdModal .pd-related-brand {
  color: var(--sf-text-secondary, #6b7280);
  font-size: 11px;
}

#pdModal .pd-related-price {
  color: var(--sf-primary, #0a1946);
  font-size: 15px;
  font-weight: 800;
}

/* Recently viewed inside PD tabs */
#pdModal .pd-recently-viewed {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

#pdModal .pd-recently-viewed-grid .product-card {
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: var(--sf-radius-sm, 8px);
  box-shadow: var(--sf-shadow, 0 4px 20px rgba(15, 23, 42, 0.08));
}

#pdModal .pd-recently-viewed-grid .product-card .product-name,
#pdModal .pd-recently-viewed-grid .product-card .product-name-ar {
  color: var(--sf-text, #1f2937);
}

#pdModal .pd-recently-viewed-grid .product-card .product-price-sale,
#pdModal .pd-recently-viewed-grid .product-card .product-price--single {
  color: var(--sf-primary, #0a1946);
}

#pdModal .pd-recently-viewed-grid .product-card .product-img-wrap {
  background: var(--sf-surface-secondary, #f8fafc);
}

#pdModal .pd-recently-viewed-grid .product-card .btn-cart {
  background: var(--sf-primary, #0a1946);
}

/* ── Cart drawer ── */
#cartOverlay {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

#cartDrawer {
  background: var(--sf-surface, #fff);
  border-color: var(--sf-border, #e5e7eb);
  box-shadow: -4px 0 32px rgba(15, 23, 42, 0.12);
}

html[dir="ltr"] #cartDrawer {
  box-shadow: 4px 0 32px rgba(15, 23, 42, 0.12);
}

#cartDrawer .cart-header {
  padding: var(--sf-spacing-md, 16px) var(--sf-spacing-lg, 24px);
  border-bottom: 1px solid var(--sf-border, #e5e7eb);
  background: var(--sf-surface, #fff);
}

#cartDrawer .cart-header-title svg {
  stroke: var(--sf-primary, #0a1946);
}

#cartDrawer .cart-title-text {
  color: var(--sf-text, #1f2937);
  font-size: 17px;
}

#cartDrawer .cart-count-text {
  color: var(--sf-text-secondary, #6b7280);
}

#cartDrawer .cart-close-btn {
  background: var(--sf-surface-secondary, #f8fafc);
  border: 1px solid var(--sf-border, #e5e7eb);
}

#cartDrawer .cart-close-btn:hover {
  border-color: var(--sf-primary, #0a1946);
  background: rgba(10, 25, 70, 0.04);
}

#cartDrawer .cart-close-btn svg {
  stroke: var(--sf-text-secondary, #6b7280);
}

#cartDrawer .cart-body {
  padding: var(--sf-spacing-md, 16px) var(--sf-spacing-lg, 24px);
  background: var(--sf-surface-secondary, #f8fafc);
  gap: var(--sf-spacing-sm, 10px);
}

#cartDrawer .cart-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-color: var(--sf-surface-secondary, #f8fafc);
}

#cartDrawer .cart-body::-webkit-scrollbar-thumb:hover {
  background: var(--sf-primary, #0a1946);
}

/* Empty cart */
#cartDrawer .cart-empty {
  color: var(--sf-text-secondary, #6b7280);
  padding: 48px 24px;
}

#cartDrawer .cart-empty svg {
  stroke: #cbd5e1;
}

#cartDrawer .cart-empty p {
  color: var(--sf-text-secondary, #6b7280);
  font-size: 15px;
}

#cartDrawer .cart-empty-cta {
  background: var(--sf-primary, #0a1946);
  border: none;
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--sf-radius-sm, 8px);
  font-weight: 700;
}

#cartDrawer .cart-empty-cta:hover {
  background: var(--sf-primary-hover, #0d2260);
  color: #fff;
}

/* Cart items */
#cartDrawer .cart-item {
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: var(--sf-radius-sm, 8px);
  box-shadow: var(--sf-shadow, 0 4px 20px rgba(15, 23, 42, 0.06));
  padding: var(--sf-spacing-md, 16px);
}

#cartDrawer .cart-item:hover {
  border-color: #cbd5e1;
}

#cartDrawer .cart-item-img {
  background: var(--sf-surface-secondary, #f8fafc);
  border: 1px solid var(--sf-border, #e5e7eb);
  width: 64px;
  height: 64px;
}

#cartDrawer .cart-item-name {
  color: var(--sf-text, #1f2937);
  font-size: 14px;
  white-space: normal;
}

#cartDrawer .cart-item-name-en {
  color: var(--sf-text-secondary, #6b7280);
}

#cartDrawer .cart-item-brand {
  background: var(--sf-surface-secondary, #f8fafc);
  border-color: var(--sf-border, #e5e7eb);
  color: var(--sf-text-secondary, #6b7280);
}

#cartDrawer .cart-item-price {
  color: var(--sf-primary, #0a1946);
  font-size: 16px;
}

#cartDrawer .cart-item-price span {
  color: var(--sf-text-secondary, #6b7280);
}

#cartDrawer .cart-qty-row {
  background: var(--sf-surface-secondary, #f8fafc);
  border: 1px solid var(--sf-border, #e5e7eb);
}

#cartDrawer .cart-qty-btn {
  color: var(--sf-text, #1f2937);
}

#cartDrawer .cart-qty-btn:hover {
  background: rgba(10, 25, 70, 0.06);
  color: var(--sf-primary, #0a1946);
}

#cartDrawer .cart-qty-val {
  color: var(--sf-text, #1f2937);
}

#cartDrawer .cart-item-remove {
  color: var(--sf-text-secondary, #6b7280);
}

#cartDrawer .cart-item-remove:hover {
  color: var(--sf-danger, #b91c1c);
}

/* Cart footer */
#cartDrawer .cart-footer {
  border-top: 1px solid var(--sf-border, #e5e7eb);
  padding: var(--sf-spacing-md, 16px) var(--sf-spacing-lg, 24px);
  background: var(--sf-surface, #fff);
  gap: var(--sf-spacing-sm, 10px);
}

#cartDrawer .cart-summary-row {
  color: var(--sf-text-secondary, #6b7280);
  font-size: 14px;
}

#cartDrawer .cart-summary-row span:last-child {
  color: var(--sf-text, #1f2937);
}

#cartDrawer .cart-summary-row.total {
  color: var(--sf-text, #1f2937);
  border-top: 1px solid var(--sf-border, #e5e7eb);
  padding-top: 12px;
  font-size: 18px;
}

#cartDrawer .cart-summary-row.total .total-val {
  color: var(--sf-primary, #0a1946);
}

#cartDrawer .btn-checkout {
  background: var(--sf-primary, #0a1946);
  color: #fff;
  border-radius: var(--sf-radius-sm, 8px);
  font-weight: 800;
  padding: 15px;
  box-shadow: none;
}

#cartDrawer .btn-checkout:hover {
  background: var(--sf-primary-hover, #0d2260);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(10, 25, 70, 0.2);
}

#cartDrawer .btn-continue-shopping {
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
  color: var(--sf-text, #1f2937);
}

#cartDrawer .btn-continue-shopping:hover {
  border-color: var(--sf-primary, #0a1946);
  color: var(--sf-primary, #0a1946);
}

#cartDrawer .btn-clear-cart {
  border-color: var(--sf-border, #e5e7eb);
  color: var(--sf-text-secondary, #6b7280);
}

#cartDrawer .btn-clear-cart:hover {
  border-color: var(--sf-danger, #b91c1c);
  color: var(--sf-danger, #b91c1c);
}

/* ── Checkout modal ── */
#checkoutOverlay {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

#checkoutModal {
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: var(--sf-radius, 12px);
  box-shadow: var(--sf-shadow-hover, 0 12px 32px rgba(15, 23, 42, 0.12));
}

#checkoutModal .checkout-header {
  border-bottom: 1px solid var(--sf-border, #e5e7eb);
  background: var(--sf-surface, #fff);
  padding: var(--sf-spacing-md, 16px) var(--sf-spacing-lg, 24px);
}

#checkoutModal .checkout-header h2 {
  color: var(--sf-text, #1f2937);
  font-size: 18px;
}

#checkoutModal .checkout-close {
  background: var(--sf-surface-secondary, #f8fafc);
  border: 1px solid var(--sf-border, #e5e7eb);
}

#checkoutModal .checkout-close svg {
  stroke: var(--sf-text-secondary, #6b7280);
}

#checkoutModal .checkout-body {
  background: var(--sf-surface-secondary, #f8fafc);
  padding: var(--sf-spacing-md, 16px) var(--sf-spacing-lg, 24px);
  gap: 14px;
  scrollbar-color: #cbd5e1 transparent;
}

#checkoutModal .checkout-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

#checkoutModal .checkout-summary {
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: var(--sf-radius-sm, 8px);
  color: var(--sf-text-secondary, #6b7280);
  box-shadow: var(--sf-shadow, 0 4px 20px rgba(15, 23, 42, 0.06));
}

#checkoutModal .checkout-summary strong {
  color: var(--sf-text, #1f2937);
}

#checkoutModal .checkout-item {
  border-bottom: 1px solid var(--sf-border, #e5e7eb);
}

#checkoutModal .checkout-item-name {
  color: var(--sf-text, #1f2937);
}

#checkoutModal .checkout-item-price {
  color: var(--sf-text-secondary, #6b7280);
}

#checkoutModal .checkout-total-row {
  color: var(--sf-text, #1f2937);
}

#checkoutModal .checkout-total-row.sub {
  color: var(--sf-text-secondary, #6b7280);
}

#checkoutModal .checkout-total-row.sub span:last-child {
  color: var(--sf-text, #1f2937);
}

#checkoutModal .checkout-total-row span:last-child {
  color: var(--sf-primary, #0a1946);
}

#checkoutModal .checkout-totals {
  border-top: 1px solid var(--sf-border, #e5e7eb);
}

#checkoutModal .checkout-field label,
#checkoutModal .checkout-field-label {
  color: var(--sf-text-secondary, #6b7280);
  font-weight: 700;
  font-size: 12px;
}

#checkoutModal .checkout-field input,
#checkoutModal .checkout-field textarea,
#checkoutModal .checkout-field select,
#checkoutModal .checkout-prepaid-input {
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
  color: var(--sf-text, #1f2937);
  border-radius: var(--sf-radius-sm, 8px);
}

#checkoutModal .checkout-field input:focus,
#checkoutModal .checkout-field textarea:focus,
#checkoutModal .checkout-field select:focus,
#checkoutModal .checkout-prepaid-input:focus {
  border-color: var(--sf-primary, #0a1946);
  box-shadow: 0 0 0 3px rgba(10, 25, 70, 0.1);
}

#checkoutModal .checkout-field input.checkout-field-error,
#checkoutModal .checkout-field textarea.checkout-field-error,
#checkoutModal .checkout-field select.checkout-field-error,
#checkoutModal .checkout-prepaid-input.checkout-field-error,
#checkoutModal .checkout-proof-zone.checkout-field-error {
  border-color: var(--sf-danger, #b91c1c);
  box-shadow: 0 0 0 2px rgba(215, 25, 32, 0.15);
}

#checkoutModal .checkout-payment-block {
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: var(--sf-radius-sm, 8px);
}

#checkoutModal .checkout-payment-block:has(.checkout-payment-extra:not([hidden])) {
  border-color: rgba(10, 25, 70, 0.2);
  box-shadow: 0 0 0 1px rgba(10, 25, 70, 0.08);
}

#checkoutModal .checkout-pay-option {
  background: var(--sf-surface-secondary, #f8fafc);
  border: 1px solid var(--sf-border, #e5e7eb);
}

#checkoutModal .checkout-pay-option.is-selected,
#checkoutModal .checkout-pay-option:has(input:checked) {
  border-color: var(--sf-primary, #0a1946);
  background: rgba(10, 25, 70, 0.05);
  box-shadow: 0 0 0 1px rgba(10, 25, 70, 0.1);
}

#checkoutModal .checkout-pay-option input {
  accent-color: var(--sf-primary, #0a1946);
}

#checkoutModal .checkout-pay-option-icon {
  background: rgba(10, 25, 70, 0.06);
  border-color: rgba(10, 25, 70, 0.14);
  color: var(--sf-primary, #0a1946);
}

#checkoutModal .checkout-pay-option-text {
  color: var(--sf-text, #1f2937);
}

#checkoutModal .checkout-pay-option-hint {
  color: var(--sf-text-secondary, #6b7280);
}

#checkoutModal .checkout-pay-tel {
  color: var(--sf-primary, #0a1946);
}

#checkoutModal .checkout-proof-zone {
  border-color: rgba(10, 25, 70, 0.25);
  background: rgba(10, 25, 70, 0.03);
}

#checkoutModal .checkout-proof-zone.has-proof {
  border-color: var(--sf-success-border, rgba(16, 185, 129, 0.35));
  background: var(--sf-success-bg, rgba(16, 185, 129, 0.12));
}

#checkoutModal .checkout-proof-btn {
  border-color: rgba(10, 25, 70, 0.25);
  background: rgba(10, 25, 70, 0.06);
  color: var(--sf-primary, #0a1946);
}

#checkoutModal .checkout-proof-btn:hover {
  background: rgba(10, 25, 70, 0.1);
}

#checkoutModal .checkout-pay-confirm-line {
  color: var(--sf-text-secondary, #6b7280);
}

#checkoutModal .checkout-pay-confirm-line code {
  color: var(--sf-primary, #0a1946);
}

#checkoutModal .checkout-copy-btn {
  border-color: var(--sf-border, #e5e7eb);
  color: var(--sf-primary, #0a1946);
}

#checkoutModal .checkout-promo-btn {
  border-color: var(--sf-border, #e5e7eb);
  background: rgba(10, 25, 70, 0.06);
  color: var(--sf-primary, #0a1946);
}

#checkoutModal .checkout-promo-msg.success {
  color: var(--sf-success, #047857);
}

#checkoutModal .checkout-promo-msg.error {
  color: var(--sf-danger, #b91c1c);
}

#checkoutModal .checkout-footer {
  border-top: 1px solid var(--sf-border, #e5e7eb);
  background: var(--sf-surface, #fff);
}

#checkoutModal .btn-checkout {
  background: var(--sf-primary, #0a1946);
  color: #fff;
  border-radius: var(--sf-radius-sm, 8px);
  font-weight: 800;
}

#checkoutModal .btn-checkout:hover {
  background: var(--sf-primary-hover, #0d2260);
  box-shadow: 0 6px 18px rgba(10, 25, 70, 0.2);
}

#checkoutModal .btn-continue-shopping {
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
  color: var(--sf-text, #1f2937);
}

#checkoutModal .btn-continue-shopping:hover {
  border-color: var(--sf-primary, #0a1946);
  color: var(--sf-primary, #0a1946);
}

/* Checkout success */
#checkoutModal .checkout-confirm-body {
  background: var(--sf-surface-secondary, #f8fafc);
}

#checkoutModal .checkout-confirm-icon {
  background: var(--sf-success-bg, rgba(16, 185, 129, 0.12));
  border-color: var(--sf-success-border, rgba(16, 185, 129, 0.35));
  color: var(--sf-success, #047857);
}

#checkoutModal .checkout-confirm-title {
  color: var(--sf-text, #1f2937);
}

#checkoutModal .checkout-confirm-id {
  color: var(--sf-text-secondary, #6b7280);
}

#checkoutModal .checkout-confirm-id strong {
  color: var(--sf-primary, #0a1946);
}

#checkoutModal .checkout-confirm-payref {
  color: var(--sf-primary, #0a1946);
}

#checkoutModal .checkout-confirm-msg {
  color: var(--sf-text-secondary, #6b7280);
}

#checkoutToast {
  background: var(--sf-text, #1f2937);
  border: 1px solid var(--sf-border, #e5e7eb);
  color: #fff;
  box-shadow: var(--sf-shadow-hover, 0 12px 32px rgba(15, 23, 42, 0.12));
}

/* Mobile: product detail full-screen */
@media (max-width: 768px) {
  #pdModal {
    border-radius: 0;
    border: none;
  }

  #pdModal .pd-body {
    padding: var(--sf-spacing-md, 16px);
  }

  #pdModal .pd-grid {
    grid-template-columns: 1fr;
    gap: var(--sf-spacing-md, 16px);
  }

  #pdModal .pd-main-img {
    height: min(280px, 38vh);
    min-height: 200px;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  #pdModal .pd-main-wrap,
  #pdModal .pd-main-stage {
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  #pdModal .pd-main-photo,
  #pdModal .pd-main-img img {
    border-radius: 16px !important;
  }

  #pdModal .pd-gallery {
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  #pdModal .pd-oem-value {
    font-size: var(--sf-font-meta, 12px);
  }

  #checkoutModal {
    width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #pdModal .pd-related-card:hover,
  #cartDrawer .btn-checkout:hover,
  #checkoutModal .btn-checkout:hover {
    transform: none;
  }
}

/* =============================================================================
   UI POLISH SPRINT — Final visual refinement (production-safe, CSS-only)
   ============================================================================= */

/* ── Store typography baseline ── */
body.catalog-page-open #products,
body.catalog-branch-mode #products,
#pdModal,
#cartDrawer,
#checkoutModal {
  font-family: var(--font-ar);
  line-height: var(--sf-lh-body, 1.45);
}

body.catalog-page-open #products .product-name,
body.catalog-branch-mode #products .product-name,
body.catalog-page-open #products .product-name-ar,
body.catalog-branch-mode #products .product-name-ar {
  font-size: var(--sf-font-title, 15px);
  font-weight: 700;
  line-height: var(--sf-lh-tight, 1.3);
}

/* ── Global storefront price: OEM navy (override gold / orange / light-blue) ── */
body.catalog-page-open .product-card .product-price-sale,
body.catalog-page-open .product-card .product-price--single,
body.catalog-page-open .product-card .product-price--inline,
body.catalog-branch-mode .product-card .product-price-sale,
body.catalog-branch-mode .product-card .product-price--single,
body.catalog-branch-mode .product-card .product-price--inline,
#pdModal .product-price-sale,
#pdModal .product-price--single,
#pdModal .product-price--inline,
#cartDrawer .cart-item-price,
#checkoutModal .checkout-item-price,
#checkoutModal .checkout-total-val,
#cartDrawer .cart-summary-row.total .total-val {
  color: var(--sf-primary, #0a1946) !important;
}

body.catalog-page-open .product-card .product-price-sale span,
body.catalog-page-open .product-card .product-price--single span,
body.catalog-branch-mode .product-card .product-price-sale span,
body.catalog-branch-mode .product-card .product-price--single span,
#pdModal .product-price-sale span,
#pdModal .product-price--single span {
  color: var(--sf-text-secondary, #6b7280) !important;
  font-weight: 600 !important;
  font-size: 12px !important;
}

body.catalog-page-open .product-card .product-price-compare,
body.catalog-branch-mode .product-card .product-price-compare,
#pdModal .product-price-compare {
  color: var(--sf-text-secondary, #6b7280) !important;
}

body.catalog-page-open .product-card .product-price-badge,
body.catalog-branch-mode .product-card .product-price-badge,
#pdModal .product-price-badge {
  color: var(--sf-danger, #b91c1c) !important;
}

/* Dark header: cart count stays red digit inside open cart */
body.catalog-page-open .nav-cart-btn .cart-badge,
body.catalog-branch-mode .nav-cart-btn .cart-badge,
body:has(#catalogDrawer.open) .nav-cart-btn .cart-badge {
  background: transparent;
  color: #D71920;
}

body.catalog-page-open .nav-search-btn,
body.catalog-branch-mode .nav-search-btn,
body:has(#catalogDrawer.open) .nav-search-btn {
  color: var(--navy, #0a1946);
}

/* ── Product card grid hierarchy (presentation only) ──
   Image → Name → OEM → Brand → Price → Availability → Add to Cart */
body.catalog-page-open #productsGrid.catalog-view-grid .product-card .product-body,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-card .product-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 !important;
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-card .product-main,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-card .product-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 14px 16px 10px;
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-card .product-title-row,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-card .product-title-row {
  order: 1;
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-card-specs-wrap,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-card-specs-wrap {
  order: 2;
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-brand-row,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-brand-row {
  order: 3;
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-details,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-details {
  order: 5;
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-price-slot--head,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-price-slot--head {
  display: none !important;
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-title-end .product-compat-pills,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-title-end .product-compat-pills {
  margin-top: 4px;
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-aside,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-aside {
  order: 4;
  margin-top: 0;
  gap: 10px;
  padding: 0 16px 14px;
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-rating--aside,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-rating--aside {
  display: none;
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-price-slot--side,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-price-slot--side {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 10px 0 4px;
  border-top: 1px solid var(--store-border);
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-price-slot--side .product-rating--price,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-price-slot--side .product-rating--price {
  display: none;
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-aside .product-actions,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-aside .product-actions {
  order: 2;
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-aside .btn-view-detail,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-aside .btn-view-detail {
  order: 3;
  margin-top: 2px;
}

/* Availability badge: reinforced on image, visible before cart in scan path */
body.catalog-page-open #productsGrid.catalog-view-grid .product-stock-badge,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-stock-badge {
  top: auto;
  bottom: 10px;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-stock-badge.stock-low,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-stock-badge.stock-low {
  background: rgba(10, 25, 70, 0.1) !important;
  border-color: rgba(10, 25, 70, 0.28) !important;
  color: var(--store-primary) !important;
}

/* ── 1.4 / 1.6 compatibility pills (light storefront) ── */
body.catalog-page-open #productsGrid .product-compat-pills,
body.catalog-branch-mode #productsGrid .product-compat-pills,
#pdModal .pd-compat-pills .product-compat-pills,
#pdModal .pd-compat-pills {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

body.catalog-page-open #productsGrid .product-compat-pill,
body.catalog-branch-mode #productsGrid .product-compat-pill,
#pdModal .product-compat-pill {
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 6px;
  letter-spacing: 0.03em;
  line-height: 1.15;
  white-space: nowrap;
  text-shadow: none;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

body.catalog-page-open #productsGrid .product-compat-pill--16,
body.catalog-branch-mode #productsGrid .product-compat-pill--16,
#pdModal .product-compat-pill--16 {
  background: rgba(10, 25, 70, 0.09);
  border: 1.5px solid rgba(10, 25, 70, 0.32);
  color: var(--store-primary, #0a1946);
}

body.catalog-page-open #productsGrid .product-compat-pill--14,
body.catalog-branch-mode #productsGrid .product-compat-pill--14,
#pdModal .product-compat-pill--14 {
  background: linear-gradient(180deg, #e83939 0%, #c41e1e 100%);
  border: 1.5px solid rgba(215, 25, 32, 0.45);
  color: #fff;
  box-shadow: 0 2px 8px rgba(215, 25, 32, 0.22);
}

body.catalog-page-open #productsGrid .product-compat-pill-sep,
body.catalog-branch-mode #productsGrid .product-compat-pill-sep,
#pdModal .product-compat-pill-sep {
  color: var(--store-text-muted, #6b7280);
  font-size: 13px;
  font-weight: 900;
  padding: 0 2px;
  line-height: 1;
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-title-row,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-title-row {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-title-end,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-title-end {
  width: 100%;
  justify-content: flex-start;
  align-items: flex-start;
}

body.catalog-page-open #productsGrid.catalog-view-grid .product-title-end .product-compat-pills,
body.catalog-branch-mode #productsGrid.catalog-view-grid .product-title-end .product-compat-pills {
  margin-top: 0;
}

#pdModal .pd-oem-value {
  direction: ltr;
  text-align: start;
  unicode-bidi: plaintext;
  word-break: break-word;
}

/* ── Product detail: standardized specs table ── */
#pdModal .pd-specs-table {
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: var(--sf-radius-sm, 8px);
  overflow: hidden;
}

#pdModal .pd-specs-table thead th {
  background: var(--sf-surface-secondary, #f8fafc);
  color: var(--sf-text-secondary, #6b7280);
  font-size: var(--sf-font-label, 10px);
  font-weight: 800;
  letter-spacing: var(--sf-ls-label, 0.08em);
  text-transform: uppercase;
  padding: 8px 12px;
  border-bottom: 1px solid var(--sf-border, #e5e7eb);
}

#pdModal .pd-specs-table tbody th {
  font-size: var(--sf-font-label, 10px);
  font-weight: 800;
  letter-spacing: var(--sf-ls-label, 0.08em);
  text-transform: uppercase;
  color: var(--sf-text-secondary, #6b7280);
  padding: 10px 12px;
  border-bottom: 1px solid var(--sf-border, #e5e7eb);
  width: 38%;
}

#pdModal .pd-specs-table tbody td {
  font-size: var(--sf-font-body, 14px);
  font-weight: 600;
  color: var(--sf-text, #1f2937);
  padding: 10px 12px;
  border-bottom: 1px solid var(--sf-border, #e5e7eb);
}

#pdModal .pd-specs-table tbody tr.pd-spec-row-oem {
  background: transparent;
}

#pdModal .pd-specs-table tbody tr.pd-spec-row-oem th {
  color: var(--sf-text-secondary, #6b7280);
}

#pdModal .pd-specs-table tbody tr.pd-spec-row-oem td {
  font-family: var(--font-en);
  font-size: var(--sf-font-body, 14px);
  font-weight: 600;
  letter-spacing: normal;
  color: var(--sf-text, #1f2937);
  direction: ltr;
  text-align: start;
  unicode-bidi: plaintext;
  word-break: break-word;
}

#pdModal .pd-section-title {
  font-size: var(--sf-font-label, 10px);
  font-weight: 800;
  letter-spacing: var(--sf-ls-label, 0.08em);
  text-transform: uppercase;
  color: var(--sf-text-secondary, #6b7280);
}

#pdModal .pd-price-block .product-price-sale,
#pdModal .pd-price-block .product-price--single {
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}

/* ── List view: navy prices + preserve desktop layout ── */
@media (min-width: 900px) {
  body.catalog-page-open #productsGrid.catalog-view-list .product-price-slot--side .product-price-sale,
  body.catalog-page-open #productsGrid.catalog-view-list .product-price-slot--side .product-price--single,
  body.catalog-branch-mode #productsGrid.catalog-view-list .product-price-slot--side .product-price-sale,
  body.catalog-branch-mode #productsGrid.catalog-view-list .product-price-slot--side .product-price--single {
    color: var(--store-primary) !important;
    font-weight: 800 !important;
    font-size: 24px !important;
    transform: none !important;
  }

  body.catalog-page-open #productsGrid.catalog-view-list .product-card-specs-table,
  body.catalog-branch-mode #productsGrid.catalog-view-list .product-card-specs-table {
    border: 1px solid var(--store-border) !important;
    border-radius: 8px;
    overflow: hidden;
  }

  body.catalog-page-open #productsGrid.catalog-view-list .product-card-specs-table tbody,
  body.catalog-branch-mode #productsGrid.catalog-view-list .product-card-specs-table tbody {
    display: table-row-group !important;
  }

  body.catalog-page-open #productsGrid.catalog-view-list .product-card-specs-table tbody tr,
  body.catalog-branch-mode #productsGrid.catalog-view-list .product-card-specs-table tbody tr {
    display: table-row !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.catalog-page-open #productsGrid.catalog-view-list .product-card-specs-table tbody th,
  body.catalog-page-open #productsGrid.catalog-view-list .product-card-specs-table tbody td,
  body.catalog-branch-mode #productsGrid.catalog-view-list .product-card-specs-table tbody th,
  body.catalog-branch-mode #productsGrid.catalog-view-list .product-card-specs-table tbody td {
    display: table-cell !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    color: var(--store-text) !important;
    padding: 4px 8px !important;
    border-bottom: 1px solid var(--store-border) !important;
    background: transparent !important;
    width: auto !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
  }

  body.catalog-page-open #productsGrid.catalog-view-list .product-card-specs-table tbody th,
  body.catalog-branch-mode #productsGrid.catalog-view-list .product-card-specs-table tbody th {
    font-size: 9px !important;
    font-weight: 800 !important;
    color: var(--store-text-muted) !important;
    width: 38%;
  }

  body.catalog-page-open #productsGrid.catalog-view-list .product-card-specs-table tbody tr.product-spec-oem td,
  body.catalog-branch-mode #productsGrid.catalog-view-list .product-card-specs-table tbody tr.product-spec-oem td {
    direction: ltr;
    text-align: start;
  }

  body.catalog-page-open #productsGrid.catalog-view-list .product-brand-row,
  body.catalog-branch-mode #productsGrid.catalog-view-list .product-brand-row {
    padding: 6px 10px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(184, 137, 26, 0.3);
  }
}

/* ── Responsive polish ── */
@media (max-width: 899px) {
  body.catalog-page-open #catalogFilterBar,
  body.catalog-branch-mode #catalogFilterBar {
    padding: 14px 16px;
    gap: 12px;
  }

  body.catalog-page-open #catalogFilterBar label,
  body.catalog-branch-mode #catalogFilterBar label {
    flex: 1 1 calc(50% - 8px);
    min-width: 130px;
  }

  body.catalog-page-open #catalogFilterBar .catalog-filter-actions,
  body.catalog-branch-mode #catalogFilterBar .catalog-filter-actions {
    flex: 1 1 100%;
    margin-inline-start: 0;
    justify-content: stretch;
  }

  body.catalog-page-open #catalogFilterBar .catalog-filter-reset,
  body.catalog-branch-mode #catalogFilterBar .catalog-filter-reset {
    flex: 1;
  }

  body.catalog-page-open #productsGrid.catalog-view-grid .product-card .product-price-sale,
  body.catalog-page-open #productsGrid.catalog-view-grid .product-card .product-price--single,
  body.catalog-branch-mode #productsGrid.catalog-view-grid .product-card .product-price-sale,
  body.catalog-branch-mode #productsGrid.catalog-view-grid .product-card .product-price--single {
    font-size: 22px !important;
  }

  body.catalog-page-open #productsGrid .product-card-specs-table tbody tr:not(:nth-child(2)),
  body.catalog-branch-mode #productsGrid .product-card-specs-table tbody tr:not(:nth-child(2)) {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (max-width: 480px) {
  body.catalog-page-open #products .products-grid.catalog-view-grid,
  body.catalog-branch-mode #products .products-grid.catalog-view-grid {
    grid-template-columns: 1fr;
  }

  body.catalog-page-open #productsGrid.catalog-view-grid .product-card .product-main,
  body.catalog-branch-mode #productsGrid.catalog-view-grid .product-card .product-main,
  body.catalog-page-open #productsGrid.catalog-view-grid .product-card .product-aside,
  body.catalog-branch-mode #productsGrid.catalog-view-grid .product-card .product-aside {
    padding-inline: 12px;
  }
}

/* ============================================================
   PD POLISH SPRINT — Product detail final refinement
   Presentation only — scoped to #pdModal
   ============================================================ */

#pdModal .pd-breadcrumb {
  gap: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}

#pdModal .pd-breadcrumb-link {
  font-weight: 600;
  color: var(--sf-text-secondary, #6b7280);
}

#pdModal .pd-breadcrumb-link:hover {
  color: var(--sf-primary, #0a1946);
}

#pdModal .pd-breadcrumb-sep {
  color: #cbd5e1;
  font-weight: 500;
  font-size: 11px;
}

#pdModal .pd-breadcrumb-current {
  color: var(--sf-primary, #0a1946);
  font-weight: 800;
}

/* Overview two-column layout */
#pdModal .pd-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 20px 24px;
  align-items: start;
}

#pdModal .pd-overview-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

#pdModal .pd-purchase-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 0;
}

/* Rating rich */
#pdModal .pd-rating-rich {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

#pdModal .pd-rating-stars {
  display: inline-flex;
  gap: 2px;
  font-size: 15px;
  line-height: 1;
}

#pdModal .pd-rating-stars .product-star.is-filled {
  color: #f59e0b;
}

#pdModal .pd-rating-stars .product-star:not(.is-filled) {
  color: #e5e7eb;
}

#pdModal .pd-rating-score {
  font-size: 14px;
  font-weight: 800;
  color: var(--sf-primary, #0a1946);
  font-family: var(--font-en, system-ui, sans-serif);
}

#pdModal .pd-rating-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--sf-text-secondary, #6b7280);
}

/* ID cards — OEM / OE / Part No */
#pdModal .pd-id-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#pdModal .pd-id-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: var(--sf-surface-secondary, #f8fafc);
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: 10px;
  min-height: 72px;
}

#pdModal .pd-id-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sf-text-secondary, #6b7280);
}

#pdModal .pd-id-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--sf-primary, #0a1946);
  font-family: var(--font-en, system-ui, sans-serif);
  line-height: 1.25;
  word-break: break-word;
}

/* Manufacturer card */
#pdModal .pd-mfr-card {
  padding: 14px 16px;
  background: var(--sf-surface, #fff);
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: 10px;
}

#pdModal .pd-mfr-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sf-text-secondary, #6b7280);
  margin-bottom: 10px;
}

#pdModal .pd-mfr-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

#pdModal .pd-mfr-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--sf-border, #e5e7eb);
  padding: 4px;
  flex-shrink: 0;
}

#pdModal .pd-mfr-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

#pdModal .pd-mfr-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--sf-primary, #0a1946);
  letter-spacing: 0.02em;
}

#pdModal .pd-mfr-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--sf-primary, #0a1946);
  text-decoration: none;
  transition: color 0.15s ease, gap 0.15s ease;
}

#pdModal .pd-mfr-link:hover {
  color: #1e40af;
  text-decoration: underline;
}

#pdModal .pd-mfr-link.is-disabled {
  color: var(--sf-text-secondary, #6b7280);
  cursor: default;
}

#pdModal .pd-mfr-ext {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* Info cards grid */
#pdModal .pd-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#pdModal .pd-info-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--sf-surface-secondary, #f8fafc);
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: 8px;
}

#pdModal .pd-info-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sf-text-secondary, #6b7280);
}

#pdModal .pd-info-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--sf-text, #1f2937);
  line-height: 1.35;
  word-break: break-word;
}

/* Compatible vehicle */
#pdModal .pd-compat-vehicle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(10, 25, 70, 0.04) 0%, rgba(10, 25, 70, 0.02) 100%);
  border: 1px solid rgba(10, 25, 70, 0.12);
  border-radius: 10px;
}

#pdModal .pd-compat-vehicle-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sf-text-secondary, #6b7280);
  flex: 1 1 100%;
}

#pdModal .pd-compat-vehicle-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

#pdModal .pd-compat-vehicle-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--sf-primary, #0a1946);
}

#pdModal .pd-compat-vehicle-years {
  font-size: 12px;
  font-weight: 600;
  color: var(--sf-text-secondary, #6b7280);
  font-family: var(--font-en, system-ui, sans-serif);
}

#pdModal .pd-compat-vehicle-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--sf-primary, #0a1946);
  background: #fff;
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

#pdModal .pd-compat-vehicle-btn:hover {
  border-color: var(--sf-primary, #0a1946);
  background: rgba(10, 25, 70, 0.04);
  box-shadow: 0 2px 8px rgba(10, 25, 70, 0.08);
}

/* Downloads */
#pdModal .pd-downloads-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#pdModal .pd-download-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--sf-surface-secondary, #f8fafc);
  border: 1px solid var(--sf-border, #e5e7eb);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

#pdModal .pd-download-row:hover {
  border-color: var(--sf-primary, #0a1946);
  background: #fff;
}

#pdModal .pd-download-icon svg,
#pdModal .pd-download-arrow svg {
  width: 18px;
  height: 18px;
  stroke: var(--sf-primary, #0a1946);
}

#pdModal .pd-download-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

#pdModal .pd-download-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--sf-text, #1f2937);
}

#pdModal .pd-download-sub {
  font-size: 10px;
  font-weight: 600;
  color: var(--sf-text-secondary, #6b7280);
}

/* Share bar — circular outlined icons */
#pdModal .pd-share-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 0;
}

#pdModal .pd-share-heading {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sf-text-secondary, #6b7280);
}

#pdModal .pd-share-icons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#pdModal .pd-share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1.5px solid var(--sf-border, #e5e7eb);
  border-radius: 50%;
  background: #fff;
  color: var(--sf-text-secondary, #6b7280);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#pdModal .pd-share-icon svg {
  width: 17px;
  height: 17px;
}

#pdModal .pd-share-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

#pdModal .pd-share-icon--fb:hover {
  border-color: #1877f2;
  color: #1877f2;
}

#pdModal .pd-share-icon--wa:hover {
  border-color: #25d366;
  color: #25d366;
}

#pdModal .pd-share-icon--x:hover {
  border-color: #000;
  color: #000;
}

#pdModal .pd-share-icon--email:hover {
  border-color: var(--sf-primary, #0a1946);
  color: var(--sf-primary, #0a1946);
}

#pdModal .pd-share-icon--copy:hover {
  border-color: var(--sf-primary, #0a1946);
  color: var(--sf-primary, #0a1946);
}

/* Purchase price hierarchy */
#pdModal .pd-purchase-price .product-price-block,
#pdModal .pd-purchase-price .product-price--single {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: start;
  max-width: 100%;
}

#pdModal .pd-purchase-price .product-price-sale,
#pdModal .pd-purchase-price .product-price--single {
  font-size: 32px;
  font-weight: 900;
  color: var(--sf-primary, #0a1946);
  line-height: 1.1;
  font-family: var(--font-en, system-ui, sans-serif);
}

#pdModal .pd-purchase-price .product-price-sale span,
#pdModal .pd-purchase-price .product-price--single span {
  font-size: 14px;
  font-weight: 700;
  color: var(--sf-text-secondary, #6b7280);
  margin-inline-start: 4px;
}

#pdModal .pd-purchase-price .product-price-compare {
  font-size: 15px;
  font-weight: 600;
  color: #9ca3af;
  text-decoration: line-through;
  order: 2;
}

#pdModal .pd-purchase-price .product-price-compare span {
  font-size: 12px;
}

#pdModal .pd-purchase-price .product-price-badge {
  order: 3;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: #dc2626;
  border-radius: 6px;
}

#pdModal .pd-purchase-price .product-price-sale {
  order: 1;
}

/* Quantity selector */
#pdModal .pd-order-qty {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
}

#pdModal .pd-order-qty-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sf-text-secondary, #6b7280);
}

#pdModal .pd-purchase-panel .order-qty-row {
  width: 100%;
  display: flex;
  align-items: stretch;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #1e3a6e 0%, #0a1946 100%);
  border: 1px solid rgba(10, 25, 70, 0.2);
  box-shadow: 0 2px 8px rgba(10, 25, 70, 0.15);
}

#pdModal .pd-purchase-panel .order-qty-btn {
  flex: 0 0 44px;
  min-height: 44px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

#pdModal .pd-purchase-panel .order-qty-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

#pdModal .pd-purchase-panel .order-qty-val {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-en, system-ui, sans-serif);
  background: rgba(255, 255, 255, 0.06);
}

/* Add to cart + wishlist */
#pdModal .pd-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 0;
}

#pdModal .pd-actions .btn-cart--pd {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 800;
  background: var(--sf-primary, #0a1946);
  border: none;
  border-radius: 10px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#pdModal .pd-actions .btn-cart--pd svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

#pdModal .pd-actions .btn-cart--pd:hover {
  background: #152a5c;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(10, 25, 70, 0.28);
}

#pdModal .pd-fav-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sf-primary, #0a1946);
  background: #fff;
  border: 1.5px solid var(--sf-border, #e5e7eb);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

#pdModal .pd-fav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

#pdModal .pd-fav-btn:hover {
  border-color: var(--sf-primary, #0a1946);
  background: rgba(10, 25, 70, 0.04);
  box-shadow: 0 2px 10px rgba(10, 25, 70, 0.08);
}

#pdModal .pd-fav-btn.is-active {
  border-color: #dc2626;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.06);
}

#pdModal .pd-fav-btn.is-active .pd-fav-icon {
  fill: #dc2626;
  stroke: #dc2626;
}

/* Trust row */
#pdModal .pd-trust-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--sf-border, #e5e7eb);
}

#pdModal .pd-trust-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  text-align: center;
}

#pdModal .pd-trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(10, 25, 70, 0.06);
  color: var(--sf-primary, #0a1946);
}

#pdModal .pd-trust-icon svg {
  width: 16px;
  height: 16px;
}

#pdModal .pd-trust-label {
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--sf-text-secondary, #6b7280);
}

/* Stock badge in purchase panel */
#pdModal .pd-purchase-panel .pd-stock-badge {
  align-self: flex-start;
}

/* Tab panel overview padding */
#pdModal .pd-tab-panel[data-pd-panel="overview"] {
  padding-top: 4px;
}

/* Responsive — tablet */
@media (max-width: 900px) {
  #pdModal .pd-overview-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #pdModal .pd-purchase-panel {
    position: static;
    order: -1;
  }

  #pdModal .pd-id-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #pdModal .pd-trust-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

/* Responsive — mobile */
@media (max-width: 600px) {
  #pdModal .pd-id-grid {
    grid-template-columns: 1fr;
  }

  #pdModal .pd-info-grid {
    grid-template-columns: 1fr;
  }

  #pdModal .pd-purchase-price .product-price-sale,
  #pdModal .pd-purchase-price .product-price--single {
    font-size: 28px;
  }

  #pdModal .pd-compat-vehicle {
    flex-direction: column;
    align-items: stretch;
  }

  #pdModal .pd-compat-vehicle-btn {
    width: 100%;
    text-align: center;
  }

  #pdModal .pd-trust-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* RTL adjustments */
html[dir="rtl"] #pdModal .pd-purchase-price .product-price-block,
html[dir="rtl"] #pdModal .pd-purchase-price .product-price--single {
  align-items: flex-start;
}

html[dir="rtl"] #pdModal .pd-mfr-body {
  flex-direction: row;
}

@media (prefers-reduced-motion: reduce) {
  #pdModal .pd-share-icon:hover,
  #pdModal .pd-actions .btn-cart--pd:hover,
  #pdModal .pd-compat-vehicle-btn:hover {
    transform: none;
  }
}
