/* Catalog page — product grid */

/* Topbar (shared with order) */
.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 3rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.topbar-sub {
  font-size: 0.8rem;
  color: var(--fg-muted);
  font-family: 'DM Mono', monospace;
}
.topbar-right {
  margin-left: auto;
  display: flex;
  gap: 1.5rem;
}
.topbar-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.topbar-link:hover { color: var(--fg); }

.page-header {
  padding: 3rem 3rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.page-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}
.page-title {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.page-sub {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-top: 0.35rem;
}
.page-count {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  white-space: nowrap;
}
.page-sort-toggle {
  font: inherit;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--fg);
  cursor: pointer;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.page-sort-toggle:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Filter tabs */
.filter-bar {
  padding: 1.25rem 3rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  position: sticky;
  top: 52px;
  z-index: 40;
}
.filter-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.filter-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  margin-right: 0.5rem;
}
.filter-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.18s ease;
}
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--fg);
}
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.filter-select {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
}
.filter-select.active, .filter-select:focus {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  outline: none;
}

.filter-extra-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  width: 100%;
}

.filter-color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  margin-right: 0.4rem;
  vertical-align: middle;
}

.filter-status-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  width: 100%;
  font-size: 0.78rem;
  color: var(--accent);
}
.filter-active-count { font-weight: 600; letter-spacing: 0.04em; }
.filter-reset-btn {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 18px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.filter-reset-btn:hover { background: var(--accent); color: #fff; }

/* Product grid */
.catalog-grid {
  padding: 2.5rem 3rem;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* Product card */
.product-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 120, 42, 0.3);
  box-shadow: 0 8px 32px rgba(232, 120, 42, 0.08);
}
.card-visual {
  height: 140px;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.card-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 60%, rgba(232, 120, 42, 0.07) 0%, transparent 70%);
}
.card-visual-icon {
  font-size: 2.5rem;
  opacity: 0.5;
  position: relative;
}
.card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 0;
}
.card-body {
  padding: 1.1rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.card-badge-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.cat-badge {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
}
.fulfillment-badge {
  font-size: 0.62rem;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
}

/* ── Stock/inventory badge on product card */
.stock-badge {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.stock-badge--reorder_soon {
  background: var(--accent-dim);
  color: var(--accent);
}
.stock-badge--out_of_stock {
  background: rgba(232, 74, 58, 0.15);
  color: var(--red);
}
.stock-badge--in_stock {
  background: rgba(45, 182, 125, 0.15);
  color: var(--green);
}
.stock-badge--unknown {
  background: var(--bg-3);
  color: var(--fg-muted);
}
.card-name {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--fg);
}
.card-sku {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--fg-muted);
}
.card-divider {
  height: 1px;
  background: var(--border);
  margin: 0.1rem 0;
}
.card-pricing {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.price-main {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--fg);
}
.price-label {
  font-size: 0.65rem;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
}
.card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.5rem;
}
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}
.meta-label {
  color: var(--fg-muted);
}
.meta-value {
  color: var(--fg);
  font-weight: 500;
}
.meta-value.muted {
  color: var(--fg-muted);
  font-weight: 400;
}

/* ── Quick-view hover overlay */
.card-qv {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(16,16,20,0.97) 60%, rgba(16,16,20,0.85) 100%);
  border-top: 1px solid rgba(232,120,42,0.25);
  padding: 1rem 1.25rem 1.1rem;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.22s cubic-bezier(0.34,1.2,0.64,1), opacity 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}
.product-card:hover .card-qv {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.card-qv-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
}
.card-qv-price {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.card-qv-price span {
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  font-family: 'DM Sans', sans-serif;
}
.card-qv-specs {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.card-qv-spec {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px;
  padding: 0.18rem 0.5rem;
  white-space: nowrap;
}
.card-qv-ctas {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.1rem;
}
.card-qv-order {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  background: var(--accent);
  color: #fff;
  border-radius: 7px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.card-qv-order:hover {
  background: #d4621a;
  transform: translateY(-1px);
}
.card-qv-details {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  padding: 0.4rem 0.5rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px;
  transition: color 0.15s ease, border-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.card-qv-details:hover {
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.25);
}

/* Loading / empty states */
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 5rem 2rem;
  color: var(--fg-muted);
}
.empty-state p { font-size: 0.9rem; margin-top: 0.5rem; }
.loading-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  height: 260px;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  .page-header { padding: 2rem 1.5rem 1.5rem; }
  .filter-bar { padding: 1rem 1.5rem; }
  .catalog-grid { padding: 1.5rem; }
  .filter-toggle {
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: var(--accent-dim);
    color: var(--accent);
    font-family: 'Syne', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
  }
  .filter-accordion-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
  }
  .filter-accordion-summary::-webkit-details-marker { display: none; }
  .filter-accordion-summary::marker { display: none; }
  .filter-accordion-chevron {
    transition: transform 0.2s ease;
    color: var(--accent);
    font-size: 0.8rem;
  }
  .filter-accordion[open] .filter-accordion-chevron { transform: rotate(180deg); }
  .filter-accordion[open] .filter-bar-inner { padding-bottom: 0.75rem; }
}
@media (max-width: 600px) {
  .filter-bar-inner { flex-direction: column; align-items: stretch; }
  .filter-select {
    font: inherit;
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--fg);
  }
}
@media (min-width: 769px) {
  .filter-accordion-summary { display: none; }
  .filter-toggle { padding: 0.4rem 0.9rem; }
}
@media (max-width: 480px) {
  .page-header-inner { flex-direction: column; align-items: flex-start; }
  .catalog-grid { grid-template-columns: 1fr; }
}

/* ── Card expand hint */
.card-expand-hint {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--fg-muted);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.product-card:hover .card-expand-hint { opacity: 1; }

/* ── Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 10, 13, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}
.modal-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(232,120,42,0.08);
  transform: translateY(12px);
  transition: transform 0.22s ease;
}
.modal-overlay.visible .modal-panel {
  transform: translateY(0);
}
.modal-panel::-webkit-scrollbar { width: 4px; }
.modal-panel::-webkit-scrollbar-track { background: transparent; }
.modal-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fg-muted);
  transition: all 0.15s ease;
}
.modal-close:hover { color: var(--fg); background: var(--accent-dim); border-color: var(--accent); }

/* Icon area */
.modal-icon-area {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.modal-icon {
  font-size: 2.5rem;
  width: 64px;
  height: 64px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.modal-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(232,120,42,0.1) 0%, transparent 70%);
}
.modal-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-badges {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Header */
.modal-header {
  margin-bottom: 1.5rem;
}
.modal-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}
.modal-sku {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--fg-muted);
}

/* Price row */
.modal-price-row {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1.75rem;
}
.modal-price-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.modal-price-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}
.modal-price-val {
  font-family: 'Syne', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--fg);
}
.modal-price-val.muted { color: var(--fg-muted); font-size: 1.1rem; }
.modal-price-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* Body grid */
.modal-body-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}
.modal-section-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* Specs */
.modal-specs-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.modal-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}
.modal-spec-row:last-child { border-bottom: none; }
.modal-spec-label { color: var(--fg-muted); }
.modal-spec-value { font-weight: 500; color: var(--fg); }

/* ── Stock + supplier list inside product modal */
.modal-supplier-list {
  display: flex;
  flex-direction: column;
}
.modal-supplier-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.85rem;
  align-items: center;
  font-size: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.modal-supplier-row:last-child { border-bottom: none; }
.modal-supplier-name {
  font-weight: 500;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.modal-supplier-on-hand {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--fg-muted);
  white-space: nowrap;
}
.modal-supplier-lead {
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  white-space: nowrap;
}
.modal-supplier-row--best {
  background: var(--accent-dim);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin: -0.1rem 0;
  border-bottom: 1px solid transparent;
}
.modal-supplier-row--best .modal-supplier-name { color: var(--accent); }
.modal-supplier-best-tag {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
}
.modal-supplier-empty {
  font-size: 0.78rem;
  color: var(--fg-muted);
  padding: 0.5rem 0;
}

/* Reorder-pending callout */
.modal-reorder-hint {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: rgba(232, 120, 42, 0.08);
  border: 1px solid rgba(232, 120, 42, 0.35);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.modal-reorder-hint::before {
  content: '↻';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Colors & materials */
.modal-swatches {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.modal-materials-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.modal-field-label {
  font-size: 0.7rem;
  color: var(--fg-muted);
  white-space: nowrap;
  padding-top: 0.15rem;
}
.spec-chip {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  white-space: nowrap;
}
.spec-muted { font-size: 0.75rem; color: var(--fg-muted); }

.modal-min-order {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin-bottom: 0.5rem;
}
.modal-min-order strong { color: var(--fg); }
.modal-availability {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--fg-muted);
}
.avail-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* CTA row */
.modal-cta-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.modal-cta-primary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.18s ease;
  letter-spacing: -0.01em;
}
.modal-cta-primary:hover {
  background: #d4621a;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232,120,42,0.3);
}
.modal-cta-secondary {
  flex: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.18s ease;
}
.modal-cta-secondary:hover {
  border-color: var(--accent);
  color: var(--fg);
  background: var(--accent-dim);
}

/* Responsive modal */
@media (max-width: 600px) {
  .modal-panel { padding: 1.5rem; border-radius: 12px; }
  .modal-body-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .modal-price-row { gap: 1rem; }
  .modal-price-val { font-size: 1.1rem; }
  .modal-cta-row { flex-direction: column; }
  .modal-cta-primary, .modal-cta-secondary { width: 100%; }
}

/* Search input */
.search-input {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-2);
  color: var(--fg);
  outline: none;
  min-width: 220px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.search-input::placeholder { color: var(--fg-muted); }
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 120, 42, 0.12);
}

/* Price filter row */
.price-filter-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  width: 100%;
}

/* ── Compare checkbox on product card */
.compare-check {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 5;
  cursor: pointer;
  display: block;
}
.compare-check input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.compare-check-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: rgba(16, 16, 20, 0.75);
  backdrop-filter: blur(4px);
  transition: border-color 0.15s ease, background 0.15s ease;
  color: #fff;
  font-size: 0.65rem;
}
.compare-check:hover .compare-check-box {
  border-color: var(--accent);
}
.compare-check--active .compare-check-box,
.compare-check input:checked ~ .compare-check-box {
  background: var(--accent);
  border-color: var(--accent);
}
.compare-check--active .compare-check-box::after,
.compare-check input:checked ~ .compare-check-box::after {
  content: '✓';
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}

/* ── Compare bar (fixed bottom) */
.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 2rem;
  background: var(--bg-2);
  border-top: 1px solid var(--accent);
  box-shadow: 0 -8px 32px rgba(232, 120, 42, 0.12);
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.compare-bar--visible {
  transform: translateY(0);
}
.compare-bar-info {
  font-size: 0.85rem;
  color: var(--fg-muted);
  flex: 1;
}
.compare-bar-info span { color: var(--accent); font-weight: 600; }
.compare-bar-btn {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.compare-bar-btn:hover:not(:disabled) {
  background: #d4621a;
  transform: translateY(-1px);
}
.compare-bar-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.compare-bar-clear {
  font-size: 0.8rem;
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.compare-bar-clear:hover {
  color: var(--fg);
  border-color: var(--fg-muted);
}

/* ── Compare overlay + panel */
.compare-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 10, 13, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.compare-overlay.visible {
  opacity: 1;
  pointer-events: all;
}
.compare-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(232,120,42,0.1);
  transform: translateY(16px);
  transition: transform 0.22s ease;
}
.compare-overlay.visible .compare-panel {
  transform: translateY(0);
}
.compare-panel::-webkit-scrollbar { width: 4px; }
.compare-panel::-webkit-scrollbar-track { background: transparent; }
.compare-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.compare-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}
.compare-panel-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ── Compare grid layout */
.cmp-grid {
  --cmp-cols: 2;
  display: grid;
  grid-template-columns: minmax(110px, 140px) repeat(var(--cmp-cols), 1fr);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.cmp-header-row {
  display: contents;
}
.cmp-row-label {
  padding: 0.75rem 1rem;
  font-size: 0.72rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.cmp-col-header {
  padding: 1rem 1.25rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  position: relative;
}
.cmp-col-header:last-child { border-right: none; }
.cmp-col-icon { font-size: 1.5rem; display: block; margin-bottom: 0.35rem; }
.cmp-col-name {
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--fg);
  margin-bottom: 0.2rem;
}
.cmp-col-sku {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--fg-muted);
}
.cmp-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--fg-muted);
  font-size: 0.65rem;
  padding: 0.15rem 0.35rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.cmp-remove:hover { color: var(--red); border-color: var(--red); }
.cmp-row {
  display: contents;
}
.cmp-cell {
  padding: 0.7rem 1.25rem;
  font-size: 0.82rem;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--bg-2);
}
.cmp-cell:last-child { border-right: none; }
.cmp-row-label:last-of-type,
.cmp-row--cta .cmp-row-label { border-bottom: none; }
.cmp-row--cta .cmp-cell { border-bottom: none; }
.cmp-row:last-of-type .cmp-row-label,
.cmp-row:last-of-type .cmp-cell { border-bottom: none; }
.cmp-cta-col {
  padding: 0.85rem 1.25rem;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  border-bottom: none;
}
.cmp-cta-col:last-child { border-right: none; }
.cmp-cta-btn {
  display: block;
  text-align: center;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease;
}
.cmp-cta-btn:hover { background: #d4621a; }

/* ── Responsive compare */
@media (max-width: 600px) {
  .compare-panel { padding: 1.25rem; }
  .cmp-grid { grid-template-columns: 90px repeat(var(--cmp-cols), 1fr); font-size: 0.78rem; }
  .cmp-col-name { font-size: 0.8rem; }
  .compare-bar { padding: 0.75rem 1rem; }
}

/* ── Lightbox */
#lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(10, 10, 13, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
#lightbox-overlay.visible {
  opacity: 1;
  pointer-events: all;
}
#lightbox-overlay.multi-image .lightbox-arrow,
#lightbox-overlay.multi-image .lightbox-counter {
  display: flex;
}
#lightbox-overlay.multi-image .lightbox-counter {
  display: block;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  transform: scale(0.95);
  transition: transform 0.22s ease;
  cursor: zoom-out;
}
#lightbox-overlay.visible .lightbox-img {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fg-muted);
  transition: all 0.15s ease;
}
.lightbox-close:hover {
  color: var(--fg);
  background: var(--accent-dim);
  border-color: var(--accent);
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 1.2rem;
  transition: background 0.15s ease;
  user-select: none;
}
.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.18);
}
.lightbox-arrow:active {
  transform: translateY(-50%) scale(0.95);
}
.lightbox-arrow--prev {
  left: 1.5rem;
}
.lightbox-arrow--next {
  right: 1.5rem;
}
.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.1em;
  display: none;
}

/* ── Related products strip inside modal */
.modal-related-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.modal-related-scroll::-webkit-scrollbar { height: 4px; }
.modal-related-scroll::-webkit-scrollbar-track { background: transparent; }
.modal-related-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.related-card {
  flex: 0 0 110px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.related-card:hover {
  border-color: rgba(232, 120, 42, 0.4);
  transform: translateY(-2px);
}
.related-card-visual {
  height: 68px;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.related-card-img {
  width: 100%;
  height: 68px;
  object-fit: cover;
}
.related-card-icon {
  font-size: 1.5rem;
  opacity: 0.5;
}
.related-card-body {
  padding: 0.5rem 0.6rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.related-card-name {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card-price {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent);
}

/* Card rating badge */
.card-rating {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  margin-top: 0.15rem;
  min-height: 1rem;
}

/* Modal reviews section */
.modal-reviews-section {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.modal-avg-rating {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 500;
}

#modal-review-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

#modal-review-list::-webkit-scrollbar { width: 4px; }
#modal-review-list::-webkit-scrollbar-track { background: transparent; }
#modal-review-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.review-item {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.review-header {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
}

.review-stars {
  color: var(--accent);
  letter-spacing: 0.05em;
}

.review-author {
  font-weight: 500;
  color: var(--fg);
}

.review-date {
  color: var(--fg-muted);
  margin-left: auto;
}

.review-comment {
  font-size: 0.8rem;
  color: var(--fg-muted);
  line-height: 1.5;
  margin: 0;
}

/* ── Wishlist (heart toggle on cards + header nav badge) */
.wishlist-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 4;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--fg-muted);
  cursor: pointer;
  padding: 0;
  transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease;
}
.wishlist-btn:hover {
  color: var(--red);
  border-color: var(--red);
  transform: scale(1.05);
}
.wishlist-btn--active {
  color: var(--red);
  border-color: var(--red);
  background: var(--bg);
}
.wishlist-btn--active svg path {
  fill: var(--red);
  stroke: var(--red);
}

.wishlist-btn--modal {
  position: static;
  width: 36px;
  height: 36px;
}

.wishlist-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  font: inherit;
}
.wishlist-nav-link:hover .wishlist-nav-label,
.wishlist-nav-link:focus-visible .wishlist-nav-label {
  color: var(--accent);
}
.wishlist-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}
.wishlist-badge[data-empty="true"] {
  display: none;
}

.wishlist-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.wishlist-action-btn {
  flex: 1;
  text-align: center;
  padding: 0.55rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--fg);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.wishlist-action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.wishlist-action-link {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.wishlist-action-link:hover {
  background: var(--accent);
  color: #fff;
  filter: brightness(1.08);
}
.wishlist-action-btn--cart {
  background: var(--bg-2);
}
.wishlist-action-btn--cart:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.wishlist-action-btn--disabled,
.wishlist-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.wishlist-bulkcart-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 1rem 0;
  background: var(--bg-2);
  border: 1px solid var(--accent);
  border-radius: 8px;
}
.wishlist-bulkcart-bar--sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: 1px solid var(--accent);
  border-bottom: none;
  margin: 0;
  box-shadow: 0 -8px 32px rgba(232, 120, 42, 0.12);
}
.bulkcart-info {
  flex: 1;
  font-size: 0.85rem;
  color: var(--fg-muted);
}
.bulkcart-btn {
  font-family: 'Syne', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.bulkcart-btn:hover:not(:disabled) {
  background: #d4621a;
  transform: translateY(-1px);
}
.bulkcart-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* In-page toast used by /wishlist. Dashboard.css defines the rich version, but
   the wishlist page only ships catalog.css, so a minimal toast lives here. */
.wishlist-toast,
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  color: var(--fg);
  max-width: 320px;
  transform: translateY(0.75rem);
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: var(--red); color: var(--red); }
.toast.success { border-color: var(--green); color: var(--green); }