/* ============================================================
 * PickBazar — 2026 premium storefront design system
 * ------------------------------------------------------------
 * Built on top of Bootstrap 5: introduces design tokens, refined
 * typography, premium components (buttons, cards, forms, drawer,
 * toasts, skeletons), and a coherent motion language.
 * ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Brand */
  --pb-primary: #009f7f;
  --pb-primary-600: #008e72;
  --pb-primary-700: #007a5d;
  --pb-primary-50: #e6f6f2;
  --pb-primary-100: #ccede5;
  --pb-accent: #ff6b6b;
  --pb-accent-2: #ffb86b;

  /* Neutral scale (warm slate) */
  --pb-bg: #ffffff;
  --pb-surface: #ffffff;
  --pb-surface-alt: #f7f8fa;
  --pb-surface-muted: #f1f3f6;
  --pb-border: #e7eaee;
  --pb-border-strong: #d6dbe2;
  --pb-text: #0f172a;
  --pb-text-muted: #5b6473;
  --pb-text-subtle: #8a93a3;

  /* Semantic */
  --pb-success: #10b981;
  --pb-danger:  #ef4444;
  --pb-warning: #f59e0b;
  --pb-info:    #3b82f6;

  /* Radii */
  --pb-r-xs: 6px;
  --pb-r-sm: 10px;
  --pb-r-md: 14px;
  --pb-r-lg: 18px;
  --pb-r-xl: 24px;
  --pb-r-pill: 999px;

  /* Shadows — soft, layered */
  --pb-shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
  --pb-shadow-sm: 0 2px 6px rgba(15, 23, 42, .06), 0 1px 2px rgba(15,23,42,.04);
  --pb-shadow-md: 0 8px 24px -8px rgba(15,23,42,.12), 0 2px 6px rgba(15,23,42,.06);
  --pb-shadow-lg: 0 24px 48px -16px rgba(15,23,42,.18), 0 6px 12px rgba(15,23,42,.06);
  --pb-shadow-glow: 0 10px 30px -10px rgba(0, 159, 127, .45);
  --pb-ring: 0 0 0 4px rgba(0, 159, 127, .18);

  /* Gradients */
  --pb-grad-primary: linear-gradient(135deg, #00b58e 0%, #00876a 100%);
  --pb-grad-warm:    linear-gradient(135deg, #ffb86b 0%, #ff6b6b 100%);
  --pb-grad-cool:    linear-gradient(135deg, #5eead4 0%, #38bdf8 100%);
  --pb-grad-hero:    radial-gradient(1200px 600px at 10% 10%, rgba(0,159,127,.10), transparent 60%),
                     radial-gradient(900px 500px at 100% 0%,  rgba(56,189,248,.10), transparent 60%),
                     linear-gradient(180deg, #fbfdfc 0%, #f3f7f5 100%);

  /* Motion */
  --pb-ease: cubic-bezier(.2,.7,.2,1);
  --pb-ease-out: cubic-bezier(.16,1,.3,1);
  --pb-dur-1: 160ms;
  --pb-dur-2: 240ms;
  --pb-dur-3: 320ms;
  --pb-dur-4: 480ms;

  /* Typography */
  --pb-font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pb-font-display: "Inter", ui-sans-serif, system-ui, sans-serif;

  /* Layout */
  --pb-header-h: 72px;

  /* Bootstrap CSS variable overrides */
  --bs-primary: var(--pb-primary);
  --bs-primary-rgb: 0, 159, 127;
  --bs-border-radius: var(--pb-r-md);
  --bs-border-radius-sm: var(--pb-r-sm);
  --bs-border-radius-lg: var(--pb-r-lg);
  --bs-border-color: var(--pb-border);
  --bs-body-color: var(--pb-text);
  --bs-body-font-family: var(--pb-font-sans);
  --bs-body-bg: var(--pb-bg);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--pb-font-sans);
  color: var(--pb-text);
  background: var(--pb-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6 {
  font-family: var(--pb-font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--pb-text);
}
.display-1,.display-2,.display-3,.display-4,.display-5,.display-6 {
  letter-spacing: -0.03em;
  font-weight: 800;
}
.lead { color: var(--pb-text-muted); }
.text-muted { color: var(--pb-text-muted) !important; }
small, .small { color: var(--pb-text-muted); }

a { color: var(--pb-primary); transition: color var(--pb-dur-1) var(--pb-ease); }
a:hover { color: var(--pb-primary-700); }
a:not([class]) { text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* Reusable gradient text */
.pb-grad-text {
  background: var(--pb-grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Focus ring (accessibility) ---------- */
:focus-visible {
  outline: none;
  box-shadow: var(--pb-ring);
  border-radius: var(--pb-r-sm);
}
.btn:focus-visible, .form-control:focus-visible, .form-select:focus-visible {
  box-shadow: var(--pb-ring);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; top: -48px; left: 12px;
  background: var(--pb-text); color: #fff;
  padding: 10px 16px; z-index: 1080;
  border-radius: var(--pb-r-sm);
  transition: top var(--pb-dur-2) var(--pb-ease);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  --bs-btn-border-radius: var(--pb-r-md);
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: var(--pb-r-md);
  padding: 0.625rem 1.1rem;
  transition:
    transform var(--pb-dur-1) var(--pb-ease),
    box-shadow var(--pb-dur-2) var(--pb-ease),
    background-color var(--pb-dur-1) var(--pb-ease),
    border-color var(--pb-dur-1) var(--pb-ease),
    color var(--pb-dur-1) var(--pb-ease);
  will-change: transform;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sm  { padding: 0.4rem 0.75rem; border-radius: var(--pb-r-sm); }
.btn-lg  { padding: 0.875rem 1.5rem; border-radius: var(--pb-r-lg); font-size: 1.0625rem; }

.btn-primary, .bg-primary {
  background: var(--pb-grad-primary) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 6px 16px -8px rgba(0,159,127,.45);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--pb-grad-primary) !important;
  filter: brightness(1.05);
  box-shadow: var(--pb-shadow-glow);
  transform: translateY(-1px);
}
.btn-primary:disabled, .btn-primary.disabled { filter: grayscale(.3) brightness(.95); opacity: .7; }

.btn-outline-primary {
  color: var(--pb-primary);
  border-color: var(--pb-primary);
  background: transparent;
}
.btn-outline-primary:hover {
  background: var(--pb-primary);
  border-color: var(--pb-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--pb-shadow-glow);
}
.btn-outline-secondary {
  color: var(--pb-text);
  border-color: var(--pb-border-strong);
  background: var(--pb-surface);
}
.btn-outline-secondary:hover {
  background: var(--pb-surface-alt);
  color: var(--pb-text);
  border-color: var(--pb-border-strong);
  transform: translateY(-1px);
}
.btn-outline-danger:hover { transform: translateY(-1px); }

.btn-link { font-weight: 600; }
.text-primary { color: var(--pb-primary) !important; }
.link-primary { color: var(--pb-primary); }

/* Ripple */
.btn { position: relative; overflow: hidden; }
.btn .pb-ripple {
  position: absolute; border-radius: 50%;
  transform: scale(0); pointer-events: none;
  background: rgba(255,255,255,.45);
  animation: pb-ripple 600ms var(--pb-ease-out);
}
@keyframes pb-ripple { to { transform: scale(2.4); opacity: 0; } }

/* Add-to-cart button states (data-state controlled by JS or form) */
.pb-add-btn { position: relative; }
.pb-add-btn[data-state="loading"] .pb-add-label { opacity: 0; }
.pb-add-btn[data-state="loading"]::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6);
  border-top-color: #fff;
  animation: pb-spin .7s linear infinite;
}
.pb-add-btn[data-state="success"] {
  background: linear-gradient(135deg,#10b981,#059669) !important;
}
@keyframes pb-spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.form-control, .form-select {
  border-radius: var(--pb-r-md);
  border-color: var(--pb-border);
  background: var(--pb-surface);
  padding: 0.65rem 0.95rem;
  font-size: 0.95rem;
  transition:
    border-color var(--pb-dur-1) var(--pb-ease),
    box-shadow var(--pb-dur-2) var(--pb-ease),
    background-color var(--pb-dur-1) var(--pb-ease);
}
.form-control:hover, .form-select:hover { border-color: var(--pb-border-strong); }
.form-control:focus, .form-select:focus {
  border-color: var(--pb-primary);
  box-shadow: var(--pb-ring);
  background: var(--pb-surface);
}
.form-label { font-weight: 600; color: var(--pb-text); font-size: .875rem; }
.input-group .btn { border-radius: var(--pb-r-md); }
.input-group > .form-control:not(:last-child),
.input-group > .form-select:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > .btn:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > :not(:first-child) { margin-left: -1px; }

.form-check-input {
  border-color: var(--pb-border-strong);
  transition: all var(--pb-dur-1) var(--pb-ease);
}
.form-check-input:checked {
  background-color: var(--pb-primary);
  border-color: var(--pb-primary);
}
.form-check-input:focus { box-shadow: var(--pb-ring); }

/* ---------- Cards ---------- */
.card {
  --bs-card-border-color: transparent;
  --bs-card-border-radius: var(--pb-r-lg);
  background: var(--pb-surface);
  border-radius: var(--pb-r-lg);
  border: 1px solid var(--pb-border);
  box-shadow: var(--pb-shadow-xs);
  transition:
    transform var(--pb-dur-2) var(--pb-ease),
    box-shadow var(--pb-dur-2) var(--pb-ease),
    border-color var(--pb-dur-2) var(--pb-ease);
}
.card.shadow-sm { box-shadow: var(--pb-shadow-sm) !important; }
.card.border-0 { border-color: transparent; }

/* ---------- Badges ---------- */
.badge {
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--pb-r-pill);
  padding: 0.35em 0.7em;
}
.badge.bg-danger { background: var(--pb-danger) !important; }
.badge.text-bg-warning { background: #fff4d6 !important; color: #8a5a00 !important; }
.badge.text-bg-light { background: var(--pb-surface-muted) !important; color: var(--pb-text) !important; }

/* ---------- Header ---------- */
.pb-header {
  position: sticky; top: 0; z-index: 1030;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: rgba(255,255,255,0.72);
  border-bottom: 1px solid rgba(15,23,42,.06);
  transition:
    background-color var(--pb-dur-2) var(--pb-ease),
    box-shadow var(--pb-dur-2) var(--pb-ease),
    border-color var(--pb-dur-2) var(--pb-ease);
}
/* Reserve the tallest padding at the top so scrolling in/out of the "scrolled"
   state doesn't reflow content below (avoids CLS as the sticky header shrinks).
   We transition transform + shadow only — never padding — to keep the header
   height stable while giving a visual cue. */
.pb-header .navbar { padding-top: 0.85rem; padding-bottom: 0.85rem; }
.pb-header.pb-header-scrolled {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 10px 30px -20px rgba(15,23,42,.18);
}
.pb-header.pb-header-scrolled .navbar { padding-top: 0.85rem; padding-bottom: 0.85rem; }

.navbar-brand {
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--pb-text) !important;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.navbar-brand .pb-brand-mark {
  width: 32px; height: 32px;
  display: inline-grid; place-items: center;
  border-radius: 10px;
  background: var(--pb-grad-primary);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(0,159,127,.55);
}
.navbar .nav-link {
  font-weight: 500;
  color: var(--pb-text-muted);
  padding: 0.5rem 0.85rem;
  border-radius: var(--pb-r-sm);
  position: relative;
  transition: color var(--pb-dur-1) var(--pb-ease), background-color var(--pb-dur-1) var(--pb-ease);
}
.navbar .nav-link:hover { color: var(--pb-text); background: var(--pb-surface-muted); }
.navbar .nav-link.active { color: var(--pb-primary); }
.navbar .nav-link.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; border-radius: 2px;
  background: var(--pb-grad-primary);
  animation: pb-underline var(--pb-dur-3) var(--pb-ease-out);
}
@keyframes pb-underline { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); } }

.pb-icon-btn {
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  border-radius: var(--pb-r-pill);
  color: var(--pb-text);
  position: relative;
  transition:
    transform var(--pb-dur-1) var(--pb-ease),
    background-color var(--pb-dur-1) var(--pb-ease),
    color var(--pb-dur-1) var(--pb-ease);
}
.pb-icon-btn:hover { background: var(--pb-surface-muted); color: var(--pb-primary); transform: translateY(-1px); }
.pb-icon-btn .badge {
  position: absolute; top: 2px; right: 2px;
  font-size: 0.65rem; min-width: 18px; height: 18px;
  display: inline-grid; place-items: center; padding: 0 5px;
  border-radius: 999px;
  background: var(--pb-accent) !important;
  color: #fff;
  box-shadow: 0 4px 10px -2px rgba(255,107,107,.6);
  animation: pb-pop var(--pb-dur-3) var(--pb-ease-out);
}
@keyframes pb-pop { 0%{transform:scale(.4);opacity:0} 60%{transform:scale(1.18);opacity:1} 100%{transform:scale(1)} }

/* Header search */
.pb-search {
  display: flex; align-items: center;
  background: var(--pb-surface-muted);
  border: 1px solid transparent;
  border-radius: var(--pb-r-pill);
  padding: 4px 6px 4px 14px;
  width: 100%; max-width: 460px;
  transition: all var(--pb-dur-2) var(--pb-ease);
}
.pb-search:focus-within {
  background: var(--pb-surface);
  border-color: var(--pb-primary);
  box-shadow: var(--pb-ring);
}
.pb-search input.form-control {
  border: 0; background: transparent; padding: 0.45rem 0.5rem;
  font-size: 0.95rem; box-shadow: none !important;
}
.pb-search .btn {
  border-radius: var(--pb-r-pill);
  padding: 0.45rem 0.85rem;
  background: var(--pb-grad-primary);
  border: 0; color: #fff;
}

/* User avatar dropdown */
.dropdown-menu {
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-r-md);
  box-shadow: var(--pb-shadow-md);
  padding: 0.4rem;
  animation: pb-dropdown-in var(--pb-dur-2) var(--pb-ease-out);
  transform-origin: top right;
}
@keyframes pb-dropdown-in {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.dropdown-item {
  border-radius: var(--pb-r-sm);
  padding: 0.55rem 0.75rem;
  font-weight: 500;
  transition: background-color var(--pb-dur-1) var(--pb-ease);
}
.dropdown-item:hover, .dropdown-item:focus {
  background: var(--pb-surface-muted);
  color: var(--pb-text);
}

/* ---------- Hero ---------- */
.pb-hero {
  background: var(--pb-grad-hero);
  border-radius: 0 0 var(--pb-r-xl) var(--pb-r-xl);
  position: relative;
  overflow: hidden;
}
.pb-hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto;
  width: 460px; height: 460px;
  background: radial-gradient(closest-side, rgba(0,159,127,.18), transparent 70%);
  filter: blur(20px); pointer-events: none;
}
.pb-hero h1 { font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.05; }
.pb-hero .lead { max-width: 50ch; font-size: 1.125rem; }
.pb-hero .pb-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(0,159,127,.10);
  color: var(--pb-primary-700);
  font-size: 0.8125rem; font-weight: 600;
  margin-bottom: 1rem;
}
.pb-hero .pb-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pb-primary); box-shadow: 0 0 0 4px rgba(0,159,127,.15); }

/* ---------- Section utilities ---------- */
.pb-section-title {
  display: flex; align-items: end; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.25rem;
}
.pb-section-title h2, .pb-section-title h3 { margin: 0; }
.pb-section-title .pb-eyebrow {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--pb-primary-50); color: var(--pb-primary-700);
  font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: .5rem;
}

/* ---------- Category sidebar (list-group) ---------- */
.list-group { border-radius: var(--pb-r-md); overflow: hidden; }
.list-group-item {
  border-color: var(--pb-border);
  color: var(--pb-text-muted);
  padding: 0.7rem 0.95rem;
  font-weight: 500;
  transition:
    background-color var(--pb-dur-1) var(--pb-ease),
    color var(--pb-dur-1) var(--pb-ease),
    padding-left var(--pb-dur-2) var(--pb-ease);
}
.list-group-item-action:hover {
  background: var(--pb-surface-muted);
  color: var(--pb-text);
  padding-left: 1.15rem;
}
.list-group-item.active {
  background: var(--pb-grad-primary);
  border-color: transparent;
  color: #fff;
}
.list-group-item.active:hover { color: #fff; padding-left: 0.95rem; }

/* ---------- Product card ---------- */
.pb-product-card {
  border-radius: var(--pb-r-lg);
  border: 1px solid var(--pb-border);
  background: var(--pb-surface);
  overflow: hidden; position: relative;
  transition:
    transform var(--pb-dur-2) var(--pb-ease),
    box-shadow var(--pb-dur-2) var(--pb-ease),
    border-color var(--pb-dur-2) var(--pb-ease);
}
.pb-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pb-shadow-lg);
  border-color: transparent;
}
.pb-product-card .pb-card-media {
  position: relative; overflow: hidden;
  background: var(--pb-surface-muted);
}
.pb-product-card .pb-card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 600ms var(--pb-ease-out);
  will-change: transform;
}
.pb-product-card:hover .pb-card-media img { transform: scale(1.06); }

.pb-card-badges {
  position: absolute; top: 12px; left: 12px;
  width: auto; height: auto;
  display: flex; flex-wrap: wrap; gap: 6px; z-index: 2;
}
.pb-card-badges .badge { backdrop-filter: blur(6px); }
.pb-card-badges .pb-badge-sale {
  background: var(--pb-grad-warm) !important; color: #fff !important;
  box-shadow: 0 6px 14px -6px rgba(255,107,107,.55);
}
.pb-card-badges .pb-badge-new {
  background: var(--pb-grad-primary) !important; color: #fff !important;
  box-shadow: 0 6px 14px -6px rgba(0,159,127,.55);
}
.pb-card-badges .pb-badge-low {
  background: #fff4d6 !important; color: #8a5a00 !important;
  border: 1px solid rgba(138, 90, 0, .18);
}
.pb-card-badges .pb-badge-oos {
  background: rgba(15,23,42,.85) !important; color: #fff !important;
}

.pb-wishlist {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 36px; height: 36px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(15,23,42,.06);
  color: var(--pb-text-muted);
  cursor: pointer;
  transition: transform var(--pb-dur-1) var(--pb-ease), background-color var(--pb-dur-1) var(--pb-ease), color var(--pb-dur-1) var(--pb-ease);
}
.pb-wishlist:hover { transform: scale(1.08); background: #fff; color: var(--pb-accent); }
.pb-wishlist.is-active, .pb-wishlist[aria-pressed="true"] { color: var(--pb-accent); }
.pb-wishlist.is-active i, .pb-wishlist[aria-pressed="true"] i { animation: pb-heart .5s var(--pb-ease-out); }
@keyframes pb-heart { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }

.pb-product-card .card-body { padding: 1rem 1.1rem 0.6rem; }
.pb-product-card .pb-title {
  font-size: 1rem; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.35; min-height: 2.7em;
  color: var(--pb-text);
}
.pb-product-card .pb-unit { color: var(--pb-text-subtle); font-size: 0.8125rem; }

.pb-price { display: inline-flex; align-items: baseline; gap: 8px; }
.pb-price .pb-now { font-weight: 800; color: var(--pb-text); letter-spacing: -0.01em; }
.pb-price .pb-was { color: var(--pb-text-subtle); text-decoration: line-through; font-size: 0.85em; }
.pb-price .pb-now-sale { color: var(--pb-accent); }

.pb-product-card .card-footer {
  background: transparent;
  border-top: 0;
  padding: 0.4rem 1.1rem 1.1rem;
}

.pb-rating {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .8125rem; color: var(--pb-text-muted);
}
.pb-rating .bi-star-fill { color: #f5a524; }
.pb-rating .pb-rating-count { color: var(--pb-text-subtle); font-size: .75rem; }

/* ---------- Product detail ---------- */
.pb-pdp-gallery .pb-main-img {
  border-radius: var(--pb-r-lg);
  overflow: hidden;
  background: var(--pb-surface-muted);
  position: relative;
  border: 1px solid var(--pb-border);
}
.pb-pdp-gallery .pb-main-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 500ms var(--pb-ease-out);
}
.pb-pdp-gallery .pb-main-img:hover img { transform: scale(1.05); }
.pb-pdp-gallery .pb-main-img-zoomable img { cursor: zoom-in; }

.pb-thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.pb-thumbs button {
  width: 72px; height: 72px; padding: 0;
  border-radius: var(--pb-r-md);
  border: 2px solid var(--pb-border);
  overflow: hidden; background: var(--pb-surface);
  transition: all var(--pb-dur-1) var(--pb-ease);
}
.pb-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.pb-thumbs button:hover { border-color: var(--pb-border-strong); transform: translateY(-1px); }
.pb-thumbs button.is-active { border-color: var(--pb-primary); box-shadow: var(--pb-shadow-glow); }

.pb-card-video-badge {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: rgba(0,0,0,.65); color: #fff;
  border-radius: 50%;
  font-size: 13px;
  z-index: 2;
  pointer-events: none;
}
.pb-thumbs .pb-thumb-video { position: relative; }
.pb-thumbs .pb-thumb-video::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0,0,0,.35);
}
.pb-thumb-play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #fff; font-size: 22px;
  z-index: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

.pb-qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-r-pill);
  background: var(--pb-surface);
  overflow: hidden;
}
.pb-qty button {
  width: 40px; height: 44px;
  background: transparent; border: 0;
  color: var(--pb-text); font-size: 1.1rem; font-weight: 600;
  transition: background-color var(--pb-dur-1) var(--pb-ease), color var(--pb-dur-1) var(--pb-ease);
}
.pb-qty button:hover { background: var(--pb-surface-muted); color: var(--pb-primary); }
.pb-qty input {
  width: 56px; height: 44px; text-align: center;
  border: 0; background: transparent;
  font-weight: 700; color: var(--pb-text);
  outline: none; -moz-appearance: textfield;
}
.pb-qty input::-webkit-outer-spin-button,
.pb-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pb-qty .pb-qty-value { display: inline-block; transition: transform var(--pb-dur-2) var(--pb-ease-out); }
.pb-qty.is-bumping .pb-qty-value { animation: pb-bump var(--pb-dur-2) var(--pb-ease-out); }
@keyframes pb-bump { 0%{transform:scale(1)} 50%{transform:scale(1.18)} 100%{transform:scale(1)} }

/* ---------- Sticky mobile add-to-cart bar (PDP) ---------- */
.pb-pdp-sticky {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1040;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--pb-surface);
  border-top: 1px solid var(--pb-border);
  box-shadow: 0 -6px 20px rgba(0,0,0,.08);
}
.pb-pdp-sticky-price { display: flex; flex-direction: column; line-height: 1.1; }
.pb-pdp-sticky-now { font-weight: 800; color: var(--pb-text); font-size: 1rem; }
.pb-pdp-sticky-was {
  font-size: .75rem; color: var(--pb-text-subtle);
  text-decoration: line-through;
}
@media (min-width: 992px) { .pb-pdp-sticky { display: none !important; } }
.pb-pdp-page { padding-bottom: 96px; }
@media (min-width: 992px) { .pb-pdp-page { padding-bottom: 1.5rem; } }

/* ---------- Image lightbox (PDP) ---------- */
.pb-lightbox {
  position: fixed; inset: 0;
  z-index: 1060;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.pb-lightbox-stage {
  margin: 0;
  max-width: 100%; max-height: 100%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.pb-lightbox-stage img {
  max-width: min(96vw, 1400px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  user-select: none;
  -webkit-user-drag: none;
}
.pb-lightbox-close,
.pb-lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,.12); color: #fff;
  border: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background var(--pb-dur-1) var(--pb-ease);
}
.pb-lightbox-close:hover,
.pb-lightbox-nav:hover { background: rgba(255,255,255,.22); }
.pb-lightbox-close { top: 16px; right: 16px; width: 44px; height: 44px; font-size: 18px; }
.pb-lightbox-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 22px; }
.pb-lightbox-prev { left: 16px; }
.pb-lightbox-next { right: 16px; }
.pb-lightbox-counter {
  position: absolute; bottom: -36px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.75); font-size: 13px; letter-spacing: .04em;
}
@media (max-width: 575.98px) {
  .pb-lightbox { padding: 12px; }
  .pb-lightbox-nav { width: 40px; height: 40px; font-size: 18px; }
  .pb-lightbox-prev { left: 8px; }
  .pb-lightbox-next { right: 8px; }
}

.pb-pdp-meta .pb-price .pb-now { font-size: 2rem; }
.pb-pdp-meta .pb-price .pb-was { font-size: 1rem; }

.pb-pdp-desc-body {
  color: var(--pb-text-muted);
  max-width: 60ch;
  white-space: pre-line;
  line-height: 1.6;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.pb-tag-chip {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  background: var(--pb-surface-muted); color: var(--pb-text-muted);
  font-size: .75rem; font-weight: 600;
  margin: 0 4px 4px 0;
  transition: background-color var(--pb-dur-1) var(--pb-ease), color var(--pb-dur-1) var(--pb-ease);
}
.pb-tag-chip:hover { background: var(--pb-primary-50); color: var(--pb-primary-700); }

/* Review cards */
.pb-review {
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-r-lg);
  padding: 1rem 1.1rem;
  background: var(--pb-surface);
  transition: box-shadow var(--pb-dur-2) var(--pb-ease), transform var(--pb-dur-2) var(--pb-ease);
}
.pb-review + .pb-review { margin-top: 0.75rem; }
.pb-review:hover { box-shadow: var(--pb-shadow-sm); transform: translateY(-1px); }
.pb-avatar {
  width: 38px; height: 38px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: var(--pb-primary-50); color: var(--pb-primary-700);
  font-weight: 700;
}

/* ---------- Cart ---------- */
.pb-cart-line {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-r-lg);
  background: var(--pb-surface);
  transition: box-shadow var(--pb-dur-2) var(--pb-ease), transform var(--pb-dur-2) var(--pb-ease);
}
.pb-cart-line + .pb-cart-line { margin-top: 0.75rem; }
.pb-cart-line:hover { box-shadow: var(--pb-shadow-sm); }
.pb-cart-line .pb-cart-img {
  width: 80px; height: 80px; border-radius: var(--pb-r-md);
  background: var(--pb-surface-muted); overflow: hidden;
}
.pb-cart-line .pb-cart-img img { width: 100%; height: 100%; object-fit: cover; }

.pb-summary {
  border-radius: var(--pb-r-lg);
  border: 1px solid var(--pb-border);
  background: linear-gradient(180deg, var(--pb-surface) 0%, var(--pb-surface-alt) 100%);
  box-shadow: var(--pb-shadow-sm);
}
.pb-summary .pb-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; }
.pb-summary .pb-row.total { font-size: 1.125rem; font-weight: 800; padding-top: 12px; border-top: 1px dashed var(--pb-border); margin-top: 6px; }

/* ---------- Checkout stepper ---------- */
.pb-stepper {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: 1.5rem;
}
.pb-step {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--pb-surface-muted);
  color: var(--pb-text-muted);
  font-size: .85rem; font-weight: 600;
}
.pb-step .pb-step-no {
  width: 22px; height: 22px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: #fff; color: var(--pb-text-muted);
  border: 1px solid var(--pb-border);
  font-size: .75rem;
}
.pb-step.is-active {
  background: var(--pb-primary-50);
  color: var(--pb-primary-700);
}
.pb-step.is-active .pb-step-no {
  background: var(--pb-primary); color: #fff; border-color: var(--pb-primary);
}
.pb-step.is-done { background: var(--pb-primary-50); color: var(--pb-primary-700); }
.pb-step.is-done .pb-step-no { background: var(--pb-primary); color: #fff; border-color: var(--pb-primary); }
.pb-step-divider { flex: 0 0 24px; height: 2px; background: var(--pb-border); border-radius: 2px; }
.pb-step-divider.is-done { background: var(--pb-primary); }

/* ---------- Footer ---------- */
.pb-footer {
  margin-top: 6rem;
  background: linear-gradient(180deg, #0b1220 0%, #060a14 100%);
  color: rgba(255,255,255,.72);
  padding: 4rem 0 2rem;
}
.pb-footer h5, .pb-footer h6 { color: #fff; letter-spacing: -0.01em; }
.pb-footer a { color: rgba(255,255,255,.72); text-decoration: none; transition: color var(--pb-dur-1) var(--pb-ease); }
.pb-footer a:hover { color: #fff; }
.pb-footer .pb-newsletter {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  padding: 6px;
  border-radius: var(--pb-r-pill);
  display: flex; align-items: center;
}
.pb-footer .pb-newsletter input {
  background: transparent; border: 0; color: #fff;
  padding: 0.5rem 0.75rem; flex: 1;
}
.pb-footer .pb-newsletter input::placeholder { color: rgba(255,255,255,.45); }
.pb-footer .pb-newsletter input:focus { outline: none; box-shadow: none; }
.pb-footer .pb-newsletter .btn {
  border-radius: var(--pb-r-pill);
  background: var(--pb-grad-primary); border: 0; color: #fff;
  padding: 0.45rem 1.1rem;
}
.pb-footer .pb-socials a {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  margin-right: 6px;
  transition: transform var(--pb-dur-1) var(--pb-ease), background-color var(--pb-dur-1) var(--pb-ease);
}
.pb-footer .pb-socials a:hover { transform: translateY(-2px); background: var(--pb-primary); color: #fff; }

/* ---------- Pagination ---------- */
.page-link {
  border-radius: var(--pb-r-sm) !important;
  margin: 0 4px;
  border: 1px solid var(--pb-border);
  color: var(--pb-text);
  font-weight: 600;
  min-width: 38px; text-align: center;
  transition: all var(--pb-dur-1) var(--pb-ease);
}
.page-link:hover { background: var(--pb-surface-muted); color: var(--pb-primary); }
.page-item.active .page-link {
  background: var(--pb-grad-primary);
  border-color: transparent;
  color: #fff;
}

/* ---------- Alerts ---------- */
.alert {
  border-radius: var(--pb-r-lg);
  border: 1px solid var(--pb-border);
  padding: 0.9rem 1.1rem;
  box-shadow: var(--pb-shadow-xs);
  animation: pb-alert-in var(--pb-dur-3) var(--pb-ease-out);
}
@keyframes pb-alert-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.alert-success { background: #e8faf3; color: #065f46; border-color: #b7f0d8; }
.alert-danger  { background: #fdecec; color: #7f1d1d; border-color: #f6c4c4; }
.alert-info    { background: #eaf3fe; color: #1e3a8a; border-color: #c3dafa; }

/* ---------- Breadcrumbs ---------- */
.breadcrumb {
  padding: 0; background: transparent; margin-bottom: 1rem;
  font-size: .85rem;
}
.breadcrumb a { color: var(--pb-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--pb-primary); }
.breadcrumb-item + .breadcrumb-item::before { content: "›"; color: var(--pb-text-subtle); }
.breadcrumb-item.active { color: var(--pb-text); font-weight: 600; }

/* ---------- Toasts ---------- */
.pb-toast-host {
  position: fixed; z-index: 1100;
  right: 1.25rem; bottom: 1.25rem;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.pb-toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid var(--pb-border);
  box-shadow: var(--pb-shadow-md);
  border-radius: var(--pb-r-md);
  min-width: 240px;
  animation: pb-toast-in var(--pb-dur-3) var(--pb-ease-out);
}
.pb-toast.is-leaving { animation: pb-toast-out var(--pb-dur-3) var(--pb-ease) forwards; }
.pb-toast.success { border-color: #bbeada; }
.pb-toast.error   { border-color: #f0c0c0; }
.pb-toast .pb-toast-icon { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 999px; flex-shrink: 0; }
.pb-toast.success .pb-toast-icon { background: var(--pb-primary-50); color: var(--pb-primary-700); }
.pb-toast.error   .pb-toast-icon { background: #fdecec; color: var(--pb-danger); }
@keyframes pb-toast-in  { from { opacity:0; transform: translateY(12px) scale(.98); } to { opacity:1; transform: none; } }
@keyframes pb-toast-out { to { opacity:0; transform: translateY(8px) scale(.98); } }

/* ---------- Modal animation ---------- */
.modal.fade .modal-dialog { transition: transform var(--pb-dur-3) var(--pb-ease-out), opacity var(--pb-dur-3) var(--pb-ease-out); }
.modal-content { border-radius: var(--pb-r-lg); border: 0; box-shadow: var(--pb-shadow-lg); overflow: hidden; }
.modal-header { border-bottom: 1px solid var(--pb-border); }
.modal-footer { border-top: 1px solid var(--pb-border); }

/* ---------- Skeletons / shimmer ---------- */
.pb-skel {
  background: linear-gradient(90deg, var(--pb-surface-muted) 0%, #eef1f5 50%, var(--pb-surface-muted) 100%);
  background-size: 200% 100%;
  animation: pb-shimmer 1.6s linear infinite;
  border-radius: var(--pb-r-sm);
}
@keyframes pb-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.pb-skel.title  { height: 14px; width: 60%; }
.pb-skel.text   { height: 10px; width: 80%; margin-top: 6px; }
.pb-skel.thumb  { aspect-ratio: 1/1; width: 100%; border-radius: var(--pb-r-md); }

/* ---------- Empty state ---------- */
.pb-empty {
  text-align: center; padding: 4rem 1rem;
  color: var(--pb-text-muted);
}
.pb-empty-icon {
  width: 72px; height: 72px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--pb-surface-muted);
  color: var(--pb-primary);
  font-size: 28px;
  margin-bottom: 1rem;
  animation: pb-float 4s ease-in-out infinite;
}
@keyframes pb-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* ---------- Reveal on scroll ---------- */
.pb-reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity var(--pb-dur-4) var(--pb-ease-out), transform var(--pb-dur-4) var(--pb-ease-out);
}
.pb-reveal.is-in { opacity: 1; transform: none; }

/* ---------- Accordion ---------- */
.accordion-button {
  border-radius: var(--pb-r-md) !important;
  padding: 1rem 1.1rem;
  font-weight: 600;
}
.accordion-button:not(.collapsed) {
  background: var(--pb-primary-50);
  color: var(--pb-primary-700);
  box-shadow: none;
}
.accordion-button:focus { box-shadow: var(--pb-ring); }

/* ---------- Misc helpers ---------- */
.object-fit-cover { object-fit: cover; }
.pb-main { min-height: 60vh; padding-bottom: 3rem; }
[x-cloak] { display: none !important; }

/* When an overlay locks the body, iOS still tries to bounce-scroll the
   underlying page. Belt-and-braces alongside the JS lock in alpine-stores.js. */
html.pb-scroll-locked, html.pb-scroll-locked body { overscroll-behavior: contain; }

/* ---------- Shared confirmation modal (pb-confirm) ---------- */
.pb-confirm-backdrop {
  position: fixed; inset: 0; z-index: 2100;
  background: rgba(15, 23, 42, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.pb-confirm-modal {
  background: #fff; border-radius: 14px;
  width: min(440px, 92vw);
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, .35);
  overflow: hidden;
}
.pb-confirm-body { padding: 1.25rem 1.25rem 0.75rem; }
.pb-confirm-actions {
  padding: 0.75rem 1.25rem 1.25rem;
  display: flex; gap: 0.5rem; justify-content: flex-end;
}
.pb-confirm-actions .btn { min-width: 96px; }

/* ---------- Mobile bottom navigation ---------- */
.pb-bottom-nav {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid rgba(15,23,42,.06);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 24px -12px rgba(15,23,42,.12);
}
.pb-bottom-nav-item {
  flex: 1 1 0;
  min-width: 44px;
  min-height: 44px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  border: 0; background: transparent;
  color: var(--pb-text-muted);
  font-size: 11px;
  text-decoration: none;
  position: relative;
  transition: color var(--pb-dur-1) var(--pb-ease);
}
.pb-bottom-nav-item i { font-size: 1.15rem; line-height: 1; }
.pb-bottom-nav-item.is-active { color: var(--pb-primary); font-weight: 600; }
.pb-bottom-nav-item .badge {
  position: absolute; top: 2px; right: calc(50% - 18px);
  min-width: 16px; height: 16px; padding: 0 4px;
  font-size: 10px; line-height: 16px; border-radius: 8px;
  background: var(--pb-accent, #e11d48); color: #fff;
}
/* Prominent cart CTA in the middle of the nav */
.pb-bottom-nav-cta { color: var(--pb-primary); font-weight: 600; }
.pb-bottom-nav-cta .pb-bottom-nav-cta-icon {
  width: 44px; height: 44px;
  margin-top: -18px;
  border-radius: 50%;
  background: var(--pb-grad-primary, var(--pb-primary, #009f7f));
  color: #fff;
  display: inline-grid; place-items: center;
  box-shadow: 0 8px 18px -6px rgba(0,159,127,.55);
}
.pb-bottom-nav-cta .pb-bottom-nav-cta-icon i { font-size: 1.25rem; }

/* Reserve space below page content so the fixed nav doesn't overlap the
   footer. Only below lg — desktop has no bottom nav. */
@media (max-width: 991.98px) {
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  /* Sticky elements anchored to the bottom (e.g. PDP sticky bar) should
     lift above the bottom nav. */
  .pb-pdp-sticky { bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 992px) {
  .pb-bottom-nav { display: none !important; }
}

/* ---------- Order status timeline (customer order-detail) ---------- */
.pb-status-timeline { padding-left: 0; }
.pb-status-step {
  display: flex; gap: 12px;
  padding: 6px 0 10px;
  position: relative;
}
/* Vertical connector between steps — hides on the last step. */
.pb-status-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 11px; top: 30px; bottom: -6px;
  width: 2px;
  background: var(--pb-border, #e7eaee);
}
.pb-status-step.is-reached:not(:last-child)::before { background: rgba(25, 135, 84, .35); }
.pb-status-step.is-terminal:not(:last-child)::before { background: rgba(220, 53, 69, .35); }

.pb-status-dot {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--pb-surface-muted, #f1f3f6);
  color: var(--pb-text-muted, #6b7280);
  font-size: .8125rem;
  border: 2px solid var(--pb-surface, #fff);
  box-shadow: 0 0 0 1px var(--pb-border, #e7eaee);
}
.pb-status-step.is-reached .pb-status-dot { background: #198754; color: #fff; box-shadow: 0 0 0 1px #198754; }
.pb-status-dot.pb-status-dot-danger { background: #dc3545; color: #fff; box-shadow: 0 0 0 1px #dc3545; }
.pb-status-num { font-size: .7rem; font-weight: 600; }

/* Current-state emphasis: a subtle pulsing ring so the "you are here" step
   pops without needing to read the badge. Mutes prior reached states so
   they read as history rather than competing "greens". */
.pb-status-step.is-current .pb-status-dot {
  background: var(--pb-primary, #0d6efd);
  color: #fff;
  box-shadow: 0 0 0 1px var(--pb-primary, #0d6efd), 0 0 0 6px rgba(13, 110, 253, .15);
  animation: pb-status-pulse 2.4s ease-in-out infinite;
}
.pb-status-step.is-current.is-terminal .pb-status-dot {
  background: #dc3545;
  box-shadow: 0 0 0 1px #dc3545, 0 0 0 6px rgba(220, 53, 69, .18);
}
.pb-status-step.is-reached:not(.is-current) .pb-status-name { color: var(--pb-text-muted, #6b7280); }
.pb-status-step.is-current .pb-status-name { color: var(--pb-text, #1f2937); font-weight: 600; }
.pb-status-name { text-transform: capitalize; }

@keyframes pb-status-pulse {
  0%,   100% { box-shadow: 0 0 0 1px var(--pb-primary, #0d6efd), 0 0 0 6px rgba(13, 110, 253, .15); }
  50%        { box-shadow: 0 0 0 1px var(--pb-primary, #0d6efd), 0 0 0 10px rgba(13, 110, 253, .05); }
}
@media (prefers-reduced-motion: reduce) {
  .pb-status-step.is-current .pb-status-dot { animation: none; }
}

/* ---------- Small link chips (used on 404 recently-viewed) ---------- */
.pb-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--pb-surface, #fff);
  border: 1px solid var(--pb-border, #e7eaee);
  color: var(--pb-text, #1f2937);
  font-size: .875rem;
  transition: background-color var(--pb-dur-1) var(--pb-ease), border-color var(--pb-dur-1) var(--pb-ease), transform var(--pb-dur-1) var(--pb-ease);
}
.pb-chip:hover {
  background: var(--pb-surface-muted, #f1f3f6);
  border-color: var(--pb-primary, #009f7f);
  color: var(--pb-primary, #009f7f);
  transform: translateY(-1px);
}
/* Staggered reveal used by 404 recently-viewed strip. Nodes start slightly
   translated + transparent, then transition to their rest position when the
   `is-in` class is added on the next frame. Falls back to instant reveal
   when the user prefers reduced motion. */
.pb-chip-reveal {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .32s var(--pb-ease-out), transform .32s var(--pb-ease-out);
}
.pb-chip-reveal.is-in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .pb-chip-reveal { opacity: 1; transform: none; transition: none; }
}

/* Flash-alert fade-out — used by public/js/app.js when auto-dismissing. */
.alert.pb-fade-out {
  transition: opacity .28s ease, transform .28s ease, margin .28s ease, max-height .28s ease;
  opacity: 0;
  transform: translateY(-6px);
  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
}

/* Full-page overlay used during long-running submissions (order placement,
   payment SDK handoff). Blocks pointer events on the underlying form so a
   twitchy user can't double-submit while their network is stalling. */
.pb-place-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(15, 23, 42, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.pb-place-overlay-inner {
  background: #fff; border-radius: 16px;
  padding: 1.75rem 2rem;
  min-width: 260px; max-width: 92vw;
  text-align: center;
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, .35);
}
@media (prefers-reduced-motion: reduce) {
  .pb-place-overlay { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

.pb-divider {
  height: 1px; background: linear-gradient(90deg, transparent, var(--pb-border), transparent);
  border: 0; margin: 2.5rem 0;
}

/* ---------- Mobile (≤576px) ---------- */
@media (max-width: 575.98px) {
  .container, .container-fluid { padding-left: 1rem; padding-right: 1rem; }

  .display-1,.display-2,.display-3 { font-size: 2.25rem; }
  .display-4 { font-size: 2rem; }
  .display-5 { font-size: 1.75rem; }
  .display-6 { font-size: 1.5rem; }
  .lead { font-size: 1rem; }

  h1,.h1 { font-size: 1.75rem; }
  h2,.h2 { font-size: 1.5rem; }
  h3,.h3 { font-size: 1.25rem; }

  .py-5 { padding-top: 2.25rem !important; padding-bottom: 2.25rem !important; }
  .my-5 { margin-top: 2.25rem !important; margin-bottom: 2.25rem !important; }

  .btn:not(.btn-sm):not(.btn-link):not(.btn-close) { min-height: 44px; }
  .nav-link { padding-top: 0.625rem; padding-bottom: 0.625rem; }
  .form-control, .form-select { min-height: 44px; }

  .table th, .table td { font-size: 0.875rem; padding: 0.5rem 0.4rem; }
  main .sticky-top, .pb-main .sticky-top,
  main .sticky-md-top, .pb-main .sticky-md-top,
  main .sticky-lg-top, .pb-main .sticky-lg-top {
    position: static !important; top: auto !important;
  }
  /* Exception: checkout / cart summary — keep the primary CTA + total in
     the viewport while the user fills in the form. Anchors above the
     mobile bottom-nav (~60px + safe-area) so the two don't overlap. */
  .pb-summary.sticky-lg-top {
    position: sticky !important;
    top: auto !important;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 3;
    margin-left: -1rem; margin-right: -1rem;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 30px -12px rgba(15, 23, 42, .2);
    padding-bottom: 1rem !important;
  }
  img { max-width: 100%; height: auto; }
  .card, td, .text-truncate-soft { word-break: break-word; overflow-wrap: anywhere; }
  code, .text-break-all { word-break: break-all; overflow-wrap: anywhere; }

  .pb-cart-line { grid-template-columns: 64px 1fr; gap: .75rem; padding: .75rem; }
  .pb-cart-line > .pb-cart-actions {
    grid-column: 1 / -1;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-top: .25rem;
    border-top: 1px dashed var(--pb-border);
  }
  /* Cart-line update form: allow qty stepper and Update button to wrap on narrow screens
     so they don't push horizontal overflow when the thumb already consumes 64px. */
  .pb-cart-line form { flex-wrap: wrap; }
  .pb-cart-line form .btn { flex: 0 0 auto; }
  /* Stepper compaction: keep all three steps + dividers visible without overflow on small phones.
     Padding/font shrink, dividers narrow. Step labels stay readable. */
  .pb-stepper { gap: .35rem; margin-bottom: 1rem; flex-wrap: nowrap; }
  .pb-step { padding: 6px 8px; font-size: .75rem; gap: 6px; }
  .pb-step .pb-step-no { width: 18px; height: 18px; font-size: .7rem; }
  .pb-step-divider { flex: 1 1 12px; min-width: 8px; max-width: 24px; }
  /* Drawer line: bump qty buttons to a touch-friendly size, allow the qty group
     to drop to its own row when the name truncates aggressively. */
  .pb-drawer-line { grid-template-columns: 56px 1fr auto; gap: 10px; padding: 12px 2px; }
  .pb-drawer-thumb { width: 56px; height: 56px; }
  /* WCAG 2.5.5: interactive controls need at least 44×44 CSS px. Drawer qty
     buttons were 32×32 which fails on touch devices. */
  .pb-drawer-qty > button { width: 44px; height: 44px; }
  .pb-drawer-qty .pb-drawer-remove { width: 44px; height: 44px; }
  /* Cart drawer takes full width on small phones — 96vw left a sliver of backdrop
     that swallowed taps without closing the drawer. */
  .pb-offcanvas-right { width: 100vw; }
  /* Drawer body padding nudge so qty controls don't bump the right edge. */
  .pb-cart-drawer .pb-drawer-body { padding-right: 2px; }
  /* Summary panel on cart/checkout takes natural width — sticky was already disabled above. */
  .pb-summary { padding: 1rem !important; }
  .pb-summary .pb-row.total { font-size: 1rem; }
  /* Payment option rows: tighter padding so the icon + label + selected state fits. */
  .pb-pay-option { padding: .65rem .75rem; gap: .65rem; }
  .pb-pay-option .fs-4 { font-size: 1.1rem !important; }

  /* Tap targets: bump icon-only and small action buttons to 44×44.
     Use inline-flex (not inline-grid) so buttons with icon+text content
     still lay their children out in a row. */
  .pb-icon-btn { width: 44px; height: 44px; }
  .pb-input-icon .pb-input-toggle { padding: 12px; }
  .table .btn-link {
    min-width: 44px; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    gap: .25rem;
  }

  /* Auth form: reclaim ~30px of horizontal space */
  .pb-auth-form { padding: 1.5rem 1rem; }
  .pb-empty-icon { width: 56px; height: 56px; font-size: 22px; }

  /* Sticky mobile PDP bar must not collide with iOS safe-area or clip the price */
  .pb-pdp-sticky { padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
  .pb-pdp-sticky .btn { flex: 1 1 auto; min-width: 0; }

  /* Product-card title stays legible at 320px without min-height reserving a huge block */
  .pb-product-card .pb-title { font-size: .95rem; min-height: 2.55em; }
  .pb-product-card .card-body { padding: .75rem .85rem .5rem; }
  .pb-product-card .card-footer { padding: .35rem .85rem .85rem; }
  /* WCAG 2.5.5: card-footer add-to-cart/choose-options must hit 44px even
     when the site-wide rule excludes btn-sm. Keeps quick-add tappable on
     touch without enlarging the button on desktop. */
  .pb-product-card .card-footer .btn { min-height: 44px; }

  /* Order-detail status timeline: long compound labels (e.g. "out for
     delivery cancelled") should wrap rather than force horizontal scroll. */
  .pb-status-name { word-break: break-word; overflow-wrap: anywhere; }

  /* Account nav sits above content on phones instead of stealing 25% width */
  .pb-account-nav { padding: .75rem; margin-bottom: .75rem; }

  /* Breadcrumb wraps rather than truncates on tiny screens */
  .breadcrumb { flex-wrap: wrap; row-gap: 2px; font-size: .8rem; }

  /* Pagination page-links stay tappable but tighter */
  .page-link { min-width: 34px; padding: .35rem .6rem; margin: 0 2px; }
}

/* Ultra-narrow (Galaxy Fold / older phones): squeeze the last few pixels */
@media (max-width: 379.98px) {
  .container, .container-fluid { padding-left: .75rem; padding-right: .75rem; }
  h1,.h1 { font-size: 1.5rem; }
  h2,.h2 { font-size: 1.25rem; }

  .pb-auth-form { padding: 1rem .75rem; }
  .pb-empty-icon { width: 48px; height: 48px; font-size: 18px; }

  /* Stepper: absolute-minimum footprint so all three steps stay visible */
  .pb-stepper { gap: .25rem; }
  .pb-step { padding: 5px 6px; font-size: .7rem; gap: 4px; }
  .pb-step .pb-step-no { width: 16px; height: 16px; font-size: .65rem; }
  .pb-step-divider { flex: 1 1 8px; min-width: 6px; max-width: 16px; }

  /* Payment option: fit label + icon + radio on 280–360px screens */
  .pb-pay-option { padding: .55rem .6rem; gap: .5rem; }
  .pb-pay-option .fs-4 { font-size: 1rem !important; }

  /* Cart line: thumb slightly smaller so name has room */
  .pb-cart-line { grid-template-columns: 56px 1fr; padding: .65rem; }
  .pb-cart-line .pb-cart-img { width: 56px; height: 56px; }

  /* Buttons in tight rows drop to full-width for confident taps */
  .pb-summary .btn-lg { padding: .75rem 1rem; font-size: 1rem; }
}

@media (min-width: 992px) {
  .pb-search { min-width: 320px; }
}

/* Tables stay scrollable horizontally if a parent forgot .table-responsive */
.table-mobile-scroll { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table { color: var(--pb-text); }
.table > :not(caption) > * > * { background-color: transparent; padding: 0.85rem 0.75rem; }
.table > thead th {
  font-size: .75rem; text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 700; color: var(--pb-text-subtle);
  border-bottom: 1px solid var(--pb-border);
}
.table > tbody > tr { border-bottom: 1px solid var(--pb-border); transition: background-color var(--pb-dur-1) var(--pb-ease); }
.table > tbody > tr:hover { background: var(--pb-surface-alt); }

/* ---------- Page transitions ---------- */
/* Default: page is visible (no FOUC if JS fails).
 * When JS loads, .pb-page-loaded triggers a subtle entry; .pb-page-leaving fades out on navigation. */
@keyframes pb-page-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
html.pb-page-loaded body { animation: pb-page-in var(--pb-dur-3) var(--pb-ease-out); }
html { transition: opacity var(--pb-dur-3) var(--pb-ease); }
html.pb-page-leaving { opacity: 0; }

/* ---------- Auth pages ---------- */
.pb-auth-wrap {
  min-height: calc(100vh - var(--pb-header-h));
  padding: 3rem 0;
  background: var(--pb-grad-hero);
  display: flex; align-items: center;
}
.pb-auth-card {
  background: var(--pb-surface);
  border-radius: var(--pb-r-xl);
  overflow: hidden;
  box-shadow: var(--pb-shadow-lg);
}
.pb-auth-panel {
  background: var(--pb-grad-primary);
  color: #fff;
  padding: 3rem;
  position: relative;
  align-items: center;
}
.pb-auth-panel::before {
  content: ""; position: absolute; inset: -40% -20% auto auto;
  width: 460px; height: 460px;
  background: radial-gradient(closest-side, rgba(255,255,255,.18), transparent 70%);
  pointer-events: none;
}
.pb-auth-panel .pb-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 0.8125rem; font-weight: 600;
}
.pb-auth-panel .pb-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.18); }
.pb-auth-panel h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; }
.pb-auth-panel p { color: rgba(255,255,255,.85); }
.pb-auth-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-direction: column; gap: 12px; }
.pb-auth-list li { display: inline-flex; align-items: center; gap: 12px; color: rgba(255,255,255,.92); }
.pb-auth-list li i {
  width: 32px; height: 32px;
  display: inline-grid; place-items: center;
  background: rgba(255,255,255,.18);
  border-radius: 999px; color: #fff;
}
.pb-auth-form { padding: 2.5rem 1.5rem; display: flex; align-items: center; }
.pb-auth-form-inner { width: 100%; max-width: 420px; margin: 0 auto; }
@media (min-width: 992px) { .pb-auth-form { padding: 3rem 3rem; } }

/* Input with leading icon and optional trailing toggle */
.pb-input-icon { position: relative; }
.pb-input-icon > i:first-of-type {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--pb-text-subtle); pointer-events: none;
  font-size: 1rem;
}
.pb-input-icon > .form-control { padding-left: 40px; }
.pb-input-icon .pb-input-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; padding: 8px;
  color: var(--pb-text-subtle); border-radius: 8px;
  transition: color var(--pb-dur-1) var(--pb-ease), background-color var(--pb-dur-1) var(--pb-ease);
}
.pb-input-icon .pb-input-toggle:hover { color: var(--pb-primary); background: var(--pb-surface-muted); }

.pb-divider-text {
  display: flex; align-items: center; gap: 12px;
  color: var(--pb-text-subtle); font-size: .8125rem;
  margin: 1.5rem 0;
}
.pb-divider-text::before, .pb-divider-text::after {
  content: ""; flex: 1; height: 1px; background: var(--pb-border);
}
.pb-divider-text span { white-space: nowrap; }

.pb-pass-strength { display: flex; align-items: center; gap: 10px; }
.pb-pass-bar {
  flex: 1; height: 4px; border-radius: 999px; background: var(--pb-border);
  position: relative; overflow: hidden;
}
.pb-pass-bar::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 0; border-radius: 999px;
  transition: width var(--pb-dur-2) var(--pb-ease), background-color var(--pb-dur-2) var(--pb-ease);
}
.pb-pass-bar.is-weak::after   { width: 33%; background: var(--pb-danger); }
.pb-pass-bar.is-ok::after     { width: 66%; background: var(--pb-warning); }
.pb-pass-bar.is-strong::after { width: 100%; background: var(--pb-success); }

.pb-pass-checklist {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 4px;
  font-size: .8125rem;
}
.pb-pass-checklist li {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--pb-text-subtle);
  transition: color var(--pb-dur-1) var(--pb-ease);
}
.pb-pass-checklist li i { font-size: .9em; width: 1em; text-align: center; }
.pb-pass-checklist li.is-met { color: var(--pb-success); }

/* ---------- Interactive star rating input ---------- */
.pb-star-input { display: inline-flex; align-items: center; gap: 2px; }
.pb-star-btn {
  border: 0; background: transparent;
  color: var(--pb-border-strong);
  padding: 4px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--pb-dur-1) var(--pb-ease), transform var(--pb-dur-1) var(--pb-ease);
  border-radius: 4px;
}
.pb-star-btn.is-on { color: #f5a524; }
.pb-star-btn:hover:not(:disabled) { transform: scale(1.12); }
.pb-star-btn:focus-visible { outline: 2px solid var(--pb-primary); outline-offset: 2px; }

/* ---------- Account nav (profile/orders/wishlist sidebar) ---------- */
.pb-account-nav {
  background: var(--pb-surface);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-r-lg);
  padding: 1rem;
  box-shadow: var(--pb-shadow-xs);
}
.pb-account-header {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 6px 12px;
  border-bottom: 1px solid var(--pb-border);
  margin-bottom: 8px;
}
.pb-account-header .pb-avatar { width: 44px; height: 44px; font-size: 1rem; flex-shrink: 0; }
.pb-account-links { display: flex; flex-direction: column; gap: 2px; }
.pb-account-links a, .pb-account-links button {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--pb-r-md);
  color: var(--pb-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition:
    background-color var(--pb-dur-1) var(--pb-ease),
    color var(--pb-dur-1) var(--pb-ease),
    transform var(--pb-dur-1) var(--pb-ease);
}
.pb-account-links a:hover, .pb-account-links button:hover {
  background: var(--pb-surface-muted);
  color: var(--pb-text);
  transform: translateX(2px);
}
.pb-account-links a.is-active {
  background: var(--pb-primary-50);
  color: var(--pb-primary-700);
  font-weight: 600;
}
.pb-account-links i { width: 18px; font-size: 1rem; }

/* ---------- Order cards ---------- */
.pb-order-card { border-radius: var(--pb-r-lg); }
.pb-order-card:hover { box-shadow: var(--pb-shadow-md); transform: translateY(-1px); }
.pb-order-thumbs { display: inline-flex; }
.pb-order-thumb {
  width: 44px; height: 44px;
  border-radius: var(--pb-r-md);
  background: var(--pb-surface-muted);
  border: 2px solid #fff;
  overflow: hidden;
  display: inline-grid; place-items: center;
  margin-left: -10px;
  position: relative;
}
.pb-order-thumb:first-child { margin-left: 0; }
.pb-order-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pb-order-thumb-more {
  font-size: .8125rem; font-weight: 700;
  color: var(--pb-text-muted);
  background: var(--pb-surface-muted);
}

/* Status badges */
.pb-status { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; }
.pb-status-success { background: #dff7ec !important; color: #065f46 !important; }
.pb-status-info    { background: #dbeafe !important; color: #1e40af !important; }
.pb-status-warning { background: #fef3c7 !important; color: #92400e !important; }
.pb-status-danger  { background: #fee2e2 !important; color: #991b1b !important; }
.pb-status-secondary { background: var(--pb-surface-muted) !important; color: var(--pb-text-muted) !important; }

/* ---------- Error pages ---------- */
.pb-error-page { min-height: 60vh; display: flex; align-items: center; }
.pb-error-code {
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
  background: var(--pb-grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}

/* ---------- Off-canvas overlays (cart drawer, mobile menu, search) ----------
 * These overlays MUST live at body root (not inside .pb-header), because
 * backdrop-filter on the header creates a containing block that would
 * downgrade position:fixed descendants to position:absolute. */
.pb-offcanvas {
  position: fixed; inset: 0;
  z-index: 1080;
  pointer-events: none;
}
.pb-offcanvas.is-open { pointer-events: auto; }
.pb-offcanvas-backdrop {
  position: absolute; inset: 0;
  background: rgba(15,23,42,0);
  backdrop-filter: blur(0px);
  transition: background-color var(--pb-dur-3) var(--pb-ease), backdrop-filter var(--pb-dur-3) var(--pb-ease);
}
.pb-offcanvas.is-open .pb-offcanvas-backdrop {
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(4px);
}
.pb-offcanvas-panel {
  position: absolute;
  top: 0; left: 0;
  width: min(92vw, 360px);
  height: 100%;
  background: var(--pb-surface);
  padding: 1.25rem;
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--pb-dur-3) var(--pb-ease-out), box-shadow var(--pb-dur-3) var(--pb-ease);
  box-shadow: 0 30px 60px -20px rgba(15,23,42,.4);
  overflow-y: auto;
}
.pb-offcanvas-panel.is-open { transform: translateX(0); }
.pb-offcanvas-right {
  left: auto; right: 0;
  transform: translateX(100%);
  width: min(96vw, 420px);
}
.pb-offcanvas-right.is-open { transform: translateX(0); }
.pb-offcanvas-top {
  left: 0; right: 0; top: 0;
  width: 100%; height: auto;
  transform: translateY(-100%);
}
.pb-offcanvas-top.is-open { transform: translateY(0); }

.pb-offcanvas-links {
  display: flex; flex-direction: column; gap: 2px; margin: 0.5rem 0;
}
.pb-offcanvas-links a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--pb-r-md);
  color: var(--pb-text);
  text-decoration: none;
  font-weight: 500;
  transition: background-color var(--pb-dur-1) var(--pb-ease), color var(--pb-dur-1) var(--pb-ease);
}
.pb-offcanvas-links a:hover { background: var(--pb-surface-muted); }
.pb-offcanvas-links a.is-active { background: var(--pb-primary-50); color: var(--pb-primary-700); }
.pb-offcanvas-links a i { font-size: 1.1rem; width: 20px; }

/* Cart drawer specifics */
.pb-cart-drawer { gap: 0; }
.pb-cart-drawer .pb-drawer-body {
  flex: 1; overflow-y: auto; padding: .25rem 0 1rem;
  margin: 0 -.25rem;
}
.pb-drawer-line {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--pb-border);
  align-items: center;
}
.pb-drawer-thumb {
  width: 64px; height: 64px;
  border-radius: var(--pb-r-md);
  background: var(--pb-surface-muted);
  overflow: hidden;
  display: inline-block;
}
.pb-drawer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pb-drawer-qty {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-r-pill);
  padding: 2px;
  background: var(--pb-surface);
  width: max-content;
}
.pb-drawer-qty > button {
  width: 26px; height: 26px;
  border: 0; background: transparent;
  border-radius: 999px;
  color: var(--pb-text);
  display: inline-grid; place-items: center;
  font-weight: 700;
  transition: background-color var(--pb-dur-1) var(--pb-ease), color var(--pb-dur-1) var(--pb-ease);
}
.pb-drawer-qty > button:hover:not(:disabled) { background: var(--pb-surface-muted); color: var(--pb-primary); }
.pb-drawer-qty > button:disabled { opacity: .4; cursor: not-allowed; }
.pb-drawer-qty > span { min-width: 22px; text-align: center; font-weight: 700; font-size: .875rem; }
.pb-drawer-qty .pb-drawer-remove { color: var(--pb-text-subtle); border-left: 1px solid var(--pb-border); margin-left: 4px; border-radius: 0 999px 999px 0; }
.pb-drawer-qty .pb-drawer-remove:hover:not(:disabled) { color: var(--pb-danger); background: #fdecec; }
.pb-drawer-footer {
  border-top: 1px solid var(--pb-border);
  padding-top: 1rem;
  margin-top: auto;
}

/* ---------- Search autocomplete suggestions ---------- */
.pb-suggestions {
  position: absolute;
  top: calc(100% + 6px); left: 0; right: 0;
  background: var(--pb-surface);
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-r-md);
  box-shadow: var(--pb-shadow-lg);
  padding: 6px;
  max-height: 60vh;
  overflow-y: auto;
  z-index: 1040;
  animation: pb-dropdown-in var(--pb-dur-2) var(--pb-ease-out);
  transform-origin: top center;
}
.pb-search { position: relative; }
.pb-suggestion-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px;
  border-radius: var(--pb-r-sm);
  text-decoration: none; color: var(--pb-text);
  transition: background-color var(--pb-dur-1) var(--pb-ease);
}
.pb-suggestion-item:hover,
.pb-suggestion-item.is-highlighted {
  background: var(--pb-surface-muted);
  color: var(--pb-text);
  outline: none;
}
.pb-suggestion-item.is-highlighted {
  box-shadow: inset 3px 0 0 var(--pb-primary);
}
.pb-suggestion-thumb {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--pb-surface-muted);
  overflow: hidden; flex-shrink: 0;
  display: inline-grid; place-items: center;
}
.pb-suggestion-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pb-suggestion-state { padding: 12px 10px; }
.pb-suggestion-all {
  display: block; padding: 10px 12px; margin-top: 4px;
  border-top: 1px solid var(--pb-border);
  border-radius: 0 0 var(--pb-r-md) var(--pb-r-md);
  text-decoration: none;
  color: var(--pb-primary-700);
  font-weight: 600; font-size: .9rem;
  background: var(--pb-primary-50);
  transition: background-color var(--pb-dur-1) var(--pb-ease);
}
.pb-suggestion-all:hover,
.pb-suggestion-all.is-highlighted { background: #d8efe6; }
.pb-suggestion-all.is-highlighted {
  box-shadow: inset 3px 0 0 var(--pb-primary);
  outline: none;
}

/* ---------- Checkout payment option cards ---------- */
.pb-pay-option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--pb-border);
  border-radius: var(--pb-r-md);
  cursor: pointer;
  margin: 0;
  background: var(--pb-surface);
  transition: border-color var(--pb-dur-1) var(--pb-ease), box-shadow var(--pb-dur-1) var(--pb-ease), background-color var(--pb-dur-1) var(--pb-ease);
}
.pb-pay-option:hover { border-color: var(--pb-border-strong); }
.pb-pay-option.is-selected {
  border-color: var(--pb-primary);
  box-shadow: var(--pb-ring);
  background: var(--pb-primary-50);
}
.pb-pay-option .form-check-input { margin: 0; flex-shrink: 0; }

/* ---------- Form validation ---------- */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--pb-danger) !important;
  padding-right: calc(1.5em + 0.95rem);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ef4444' viewBox='0 0 16 16'%3E%3Cpath d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0-9.5a.75.75 0 0 0-.75.75v3a.75.75 0 0 0 1.5 0v-3A.75.75 0 0 0 8 5.5zm0 6.25a.85.85 0 1 0 0-1.7.85.85 0 0 0 0 1.7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 1em 1em;
  animation: pb-shake var(--pb-dur-3) var(--pb-ease);
}
.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  border-color: var(--pb-danger);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16);
}
.form-control.is-valid {
  border-color: var(--pb-success) !important;
}
.pb-input-icon .form-control.is-invalid { background-position: right 2.25rem center; }

.invalid-feedback {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: var(--pb-danger);
  font-weight: 500;
}
.was-validated .form-control:invalid ~ .invalid-feedback,
.was-validated .form-select:invalid ~ .invalid-feedback,
.is-invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback,
.pb-input-icon .form-control.is-invalid ~ .invalid-feedback {
  display: block;
  animation: pb-fade-in var(--pb-dur-2) var(--pb-ease-out);
}
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
  border-color: var(--pb-danger) !important;
}
.was-validated .form-control:valid,
.was-validated .form-select:valid {
  border-color: var(--pb-border) !important;
  background-image: none;
}
@keyframes pb-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
@keyframes pb-fade-in {
  from { opacity: 0; transform: translateY(-2px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Cart line remove transition (cart page + drawer) ---------- */
.pb-cart-line { overflow: hidden; }
.pb-cart-line.is-removing,
.pb-drawer-line.is-removing {
  animation: pb-line-out var(--pb-dur-4) var(--pb-ease) forwards;
  pointer-events: none;
}
@keyframes pb-line-out {
  0%   { opacity: 1; transform: none; max-height: 220px; }
  60%  { opacity: 0; transform: translateX(32px); max-height: 220px; }
  100% { opacity: 0; transform: translateX(32px); max-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; border-width: 0; }
}

/* ---------- Cart drawer line — controls ---------- */
.pb-drawer-line { transition: background-color var(--pb-dur-1) var(--pb-ease), opacity var(--pb-dur-1) var(--pb-ease); }
.pb-drawer-line:hover { background: var(--pb-surface-alt); }
.pb-drawer-line.is-busy { opacity: .65; pointer-events: none; }
.pb-drawer-line.is-busy .pb-drawer-thumb img { filter: grayscale(.4); }
.pb-dl-qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--pb-border);
  border-radius: 999px;
  background: var(--pb-surface);
  overflow: hidden;
}
.pb-dl-qty button {
  width: 28px; height: 28px;
  background: transparent; border: 0;
  color: var(--pb-text); font-size: 0.95rem; font-weight: 600;
  transition: background-color var(--pb-dur-1) var(--pb-ease), color var(--pb-dur-1) var(--pb-ease);
}
.pb-dl-qty button:not(:disabled):hover { background: var(--pb-surface-muted); color: var(--pb-primary); }
.pb-dl-qty button:disabled { opacity: 0.4; cursor: not-allowed; }
.pb-dl-qty .pb-dl-count {
  min-width: 28px; text-align: center; font-weight: 700; font-size: 0.85rem;
}
.pb-dl-remove {
  background: transparent; border: 0; color: var(--pb-text-muted);
  font-size: 0.78rem; display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: var(--pb-r-sm);
  transition: color var(--pb-dur-1) var(--pb-ease), background-color var(--pb-dur-1) var(--pb-ease);
}
.pb-dl-remove:not(:disabled):hover { color: var(--pb-danger); background: #fdecec; }
.pb-dl-remove:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
 * End design system
 * ============================================================ */
