/* Modern Slate & Gold Product Catalog Styling */

body {
  background: radial-gradient(circle at top right, #111a2e, #090d16) !important;
  color: #f8fafc !important;
}

.catalog-hero {
  display: grid;
  justify-items: center;
  gap: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.72) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  color: #fff;
  padding: 30px 18px 24px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
}

.catalog-hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.catalog-hero-copy {
  max-width: 760px;
  text-align: center;
}

.catalog-hero-copy p {
  margin-top: 0.75rem;
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.98rem;
  line-height: 1.7;
}

.catalog-finder {
  display: grid;
  width: min(100%, 1120px);
  grid-template-columns: repeat(4, minmax(0, 1fr)) 168px;
  gap: 12px;
  align-items: stretch;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #e8eef8 0%, #dfe7f2 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 10px 28px rgba(15, 23, 42, 0.08);
}

.catalog-finder-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 76px;
  padding: 14px 14px 12px 52px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.catalog-finder-step {
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #d6deea;
  background: #fff;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 800;
}

.catalog-finder-label {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.catalog-finder-field input,
.catalog-finder-field select {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
  outline: none;
  box-shadow: none;
}

.catalog-finder-field input::placeholder {
  color: #94a3b8;
  font-weight: 600;
}

.catalog-finder-submit {
  min-height: 76px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f75b8 0%, #003087 100%);
  color: #fff;
  font-size: 0.98rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0, 48, 135, 0.22);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.catalog-finder-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 48, 135, 0.3);
  filter: brightness(1.02);
}

.catalog-hero-note {
  width: min(100%, 1120px);
  margin: -2px auto 0;
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.catalog-grid,
.home-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.section-shell {
  margin-top: 1.5rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  padding: 18px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-title {
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}

.section-subtitle {
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.92rem;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.category-chip {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  min-height: 196px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 12px 12px 14px;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.category-chip:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.category-chip strong {
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
}

.category-chip span {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.5;
}

.category-chip small {
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 700;
}

.category-chip-image {
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  min-height: 112px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%);
  overflow: hidden;
}

.category-chip-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 10px;
}

.parts-page-shell {
  max-width: 1600px;
}

.parts-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: min(100%, 1480px);
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.78rem;
  font-weight: 700;
}

.parts-breadcrumbs a,
.parts-breadcrumbs span {
  color: inherit;
}

.parts-breadcrumbs a:hover {
  color: #ffd100;
}

.parts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.parts-empty {
  grid-column: 1 / -1;
  padding: 2.5rem 1rem;
  text-align: center;
  color: #64748b;
  font-weight: 600;
}

.parts-card {
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.parts-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.parts-card-image-wrap {
  position: relative;
  aspect-ratio: 1.15 / 1;
  overflow: hidden;
  background: linear-gradient(180deg, #eff4fb 0%, #dfe8f4 100%);
}

.parts-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.parts-card-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #cbd5e1;
}

.parts-card-placeholder svg {
  width: 58px;
  height: 58px;
}

.parts-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(0, 48, 135, 0.92);
  color: #fff;
  padding: 0.2rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(0, 48, 135, 0.18);
}

.parts-card-body {
  padding: 14px;
}

.parts-card-title {
  display: block;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.parts-card-meta {
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
}

.parts-card-link {
  display: inline-flex;
  margin-top: 0.7rem;
  color: #003087;
  font-size: 0.74rem;
  font-weight: 800;
}

.parts-diagram-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  max-width: 1480px;
  margin: 0 auto;
}

.parts-diagram-panel,
.parts-diagram-list {
  min-width: 0;
}

.parts-diagram-main {
  display: block;
}

.parts-diagram-panel {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  width: 100%;
  max-width: none;
}

.diagram-stage-wrap {
  position: relative;
  height: clamp(520px, calc(100vh - 220px), 860px);
  min-height: 0;
  padding: 12px;
  background: #fff;
  overflow: auto;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  user-select: none;
}

.diagram-stage-wrap::-webkit-scrollbar {
  display: none;
}

.diagram-stage-wrap.cursor-grabbing {
  cursor: grabbing;
}

.diagram-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.diagram-panel-title {
  color: #001c5b;
  font-size: 0.9rem;
  font-weight: 800;
}

.diagram-panel-hint {
  padding: 8px 12px 10px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  text-align: center;
}

.diagram-canvas {
  position: relative;
  display: block;
  width: max-content;
  margin: 0 auto;
  transform-origin: top left;
  transition: transform 0.2s ease;
}

.diagram-image {
  width: auto;
  height: auto;
  max-width: calc(100vw - 72px);
  max-height: calc(100vh - 250px);
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

#diagramContainer {
  position: relative;
}

.diagram-hotspots {
  position: absolute;
  inset: 0;
}

.diagram-tools {
  display: flex;
  gap: 6px;
}

.diagram-tool-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: rgba(31, 41, 55, 0.88);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.parts-diagram-list {
  position: static;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.parts-diagram-list-title {
  margin: 0 0 10px;
  color: #001c5b;
  font-size: 1rem;
  font-weight: 800;
}

.parts-table-shell {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.parts-table-head {
  display: grid;
  grid-template-columns: 28px 36px minmax(0, 1fr) 96px 54px 74px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eceff4;
  color: #4b5563;
  font-size: 0.74rem;
  font-weight: 800;
}

.parts-list-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.parts-table-row {
  display: grid;
  grid-template-columns: 28px 36px minmax(0, 1fr) 96px 54px 74px;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-top: 1px solid #edf2f7;
  cursor: pointer;
  background: #fff;
}

.parts-table-row:hover {
  background: #f8fafc;
}

.parts-table-row.active {
  background: #fff7d6 !important;
}

.parts-row-check {
  display: grid;
  place-items: center;
}

.parts-row-check input {
  width: 16px;
  height: 16px;
  accent-color: #003087;
}

.parts-row-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #ffd100;
  color: #001c5b;
  font-size: 0.68rem;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(0, 48, 135, 0.12);
}

.parts-row-desc {
  min-width: 0;
}

.parts-row-desc strong {
  display: block;
  color: #003087;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
}

.parts-row-desc span {
  display: block;
  margin-top: 0.2rem;
  color: #111827;
  font-size: 0.75rem;
  font-weight: 700;
}

.parts-row-desc small {
  display: block;
  margin-top: 0.2rem;
  color: #16a34a;
  font-size: 0.7rem;
  font-weight: 700;
}

.parts-row-price {
  color: #6b7280;
  font-size: 0.82rem;
  text-align: right;
  font-weight: 500;
}

.parts-row-qty {
  display: grid;
  justify-items: center;
}

.parts-row-qty input {
  width: 32px;
  height: 32px;
  border: 1px solid #d1d5db;
  border-radius: 0;
  background: #fff;
  color: #111827;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
}

.parts-row-qty input:focus {
  outline: none;
  border-color: #003087;
  box-shadow: 0 0 0 2px rgba(0, 48, 135, 0.12);
}

.parts-row-action {
  display: flex;
  justify-content: flex-end;
}

.parts-add-button {
  min-width: 68px;
  min-height: 32px;
  border: 0;
  border-radius: 4px;
  background: #2f73c6;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: none;
}

.parts-add-button:hover:not(:disabled) {
  background: #2563eb;
}

.parts-add-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.badge-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.best-seller-carousel {
  overflow: hidden;
}

.best-seller-track {
  display: flex;
  gap: 0;
  width: 100%;
  transition: transform 520ms ease;
  will-change: transform;
}

.best-seller-page {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.promo-carousel {
  overflow: hidden;
}

.promo-track {
  display: flex;
  gap: 0;
  width: 100%;
  transition: transform 520ms ease;
  will-change: transform;
}

.promo-page {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 16px;
}

.best-seller-card {
  width: 100%;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scroll-snap-align: start;
}

.best-seller-image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.best-seller-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.best-seller-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-width: 36px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 6px;
  background: #0f75b8;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.best-seller-badge.is-blue {
  background: #0f75b8;
}

.best-seller-heart {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.best-seller-heart svg {
  width: 16px;
  height: 16px;
}

.best-seller-body {
  padding: 8px 2px 0;
}

.best-seller-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f59e0b;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
}

.best-seller-rating .count {
  color: #64748b;
}

.best-seller-name {
  margin-top: 4px;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
  min-height: 2.2em;
}

.best-seller-meta {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.68rem;
  line-height: 1.2;
}

.best-seller-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
}

.best-seller-price {
  color: #059669;
  font-size: 1.02rem;
  font-weight: 900;
}

.best-seller-old {
  color: #94a3b8;
  font-size: 0.72rem;
  text-decoration: line-through;
}

.best-seller-stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
}

.best-seller-progress {
  height: 6px;
  margin-top: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.best-seller-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f43f5e 0%, #ef4444 100%);
}

.best-seller-body .catalog-action {
  margin-top: 8px;
  min-height: 38px;
  border-radius: 8px;
}

.best-seller-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.best-seller-page-dot {
  width: 28px;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 800;
  transition: all 0.2s ease;
}

.best-seller-page-dot.is-active {
  background: #003087;
  border-color: #003087;
  color: #fff;
}

/* Catalog page: flat homepage-like theme */
body.catalog-page {
  background: #ffffff !important;
  color: #0f172a !important;
}

body.catalog-page main.mx-auto.max-w-7xl {
  max-width: 1120px;
}

body.catalog-page .catalog-hero {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 0 0 8px;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  color: #0f172a;
  box-shadow: none !important;
}

body.catalog-page .catalog-hero-copy {
  position: relative;
  width: min(100%, 1080px);
  padding: 0 12px;
  text-align: center;
}

body.catalog-page .catalog-hero-copy::before,
body.catalog-page .catalog-hero-copy::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 145px);
  height: 1px;
  background: #e5e7eb;
}

body.catalog-page .catalog-hero-copy::before {
  left: 0;
}

body.catalog-page .catalog-hero-copy::after {
  right: 0;
}

body.catalog-page .catalog-hero h1 {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin: 0;
  padding: 0 16px;
  background: #fff;
  color: #0f172a;
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

body.catalog-page .catalog-hero-copy p {
  margin-top: 10px;
  color: #6b7280;
  font-size: 0.88rem;
  line-height: 1.5;
}

body.catalog-page .catalog-finder {
  display: grid;
  width: min(100%, 1120px);
  grid-template-columns: repeat(4, minmax(0, 1fr)) 168px;
  gap: 10px;
  align-items: stretch;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #e7edf5 0%, #dfe7f0 100%);
  border: 1px solid #d7e0ea;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 26px rgba(15, 23, 42, 0.06);
}

body.catalog-page .catalog-finder-field {
  min-height: 68px;
  padding: 12px 12px 10px 48px;
  border: 1px solid #d6dee8;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.catalog-page .catalog-finder-step {
  top: 12px;
  left: 12px;
}

body.catalog-page .catalog-finder-submit {
  min-height: 68px;
  border-radius: 10px;
}

body.catalog-page .catalog-hero-note {
  width: min(100%, 1080px);
  margin: 0;
  color: #6b7280;
  font-size: 0.85rem;
  line-height: 1.45;
  text-align: center;
}

body.catalog-page .section-shell {
  margin-top: 1.25rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}

body.catalog-page .section-head {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}

body.catalog-page .section-title {
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 800;
}

body.catalog-page .section-subtitle {
  color: #64748b;
}

body.catalog-page .catalog-grid,
body.catalog-page .home-product-grid {
  gap: 20px;
}

body.catalog-page .best-seller-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: visible;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

body.catalog-page .best-seller-image-wrap {
  background: #fff;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 14px 14px 0 0;
  aspect-ratio: 1.02;
}

body.catalog-page .best-seller-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 10px 10px 12px;
}

body.catalog-page .best-seller-name {
  margin-top: 6px;
  min-height: 2.4em;
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

body.catalog-page .best-seller-meta {
  min-height: 1.2em;
  font-size: 0.72rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}

body.catalog-page .best-seller-price-row {
  min-height: 1.2em;
}

body.catalog-page .best-seller-stock-row {
  min-height: 1.1em;
  margin-top: 8px;
  font-size: 0.72rem;
}

body.catalog-page .best-seller-body .catalog-action {
  margin-top: 8px;
  margin-top: auto;
  min-height: 38px;
  border-radius: 8px;
}

body.catalog-page .best-seller-rating {
  font-size: 0.72rem;
}

body.catalog-page .best-seller-price-row {
  gap: 8px;
}

body.catalog-page .best-seller-price {
  font-size: 1.06rem;
}

body.catalog-page .best-seller-old {
  font-size: 0.82rem;
}

@media (max-width: 640px) {
  body.catalog-page .catalog-finder {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  body.catalog-page .catalog-finder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  body.catalog-page .catalog-finder {
    grid-template-columns: repeat(4, minmax(0, 1fr)) 168px;
  }
}

@media (max-width: 640px) {
  .catalog-finder {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .catalog-finder-submit {
    min-height: 56px;
  }

  .catalog-finder-field {
    min-height: 70px;
  }

  .best-seller-page {
    grid-template-columns: 1fr;
  }
  .promo-page {
    grid-template-columns: 1fr;
  }
  .best-seller-card {
    max-width: none;
  }

  .parts-grid {
    grid-template-columns: 1fr;
  }

  .parts-diagram-layout {
    grid-template-columns: 1fr;
  }

  .parts-diagram-list {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .parts-table-head,
  .parts-table-row {
    grid-template-columns: 28px 34px minmax(0, 1fr) 82px 54px 72px;
    gap: 8px;
  }

  .diagram-stage-wrap {
    min-height: 480px;
    padding: 12px;
  }

  .diagram-image {
    max-height: 560px;
  }
}

@media (min-width: 768px) {
  .catalog-finder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-finder-submit {
    grid-column: 1 / -1;
    min-height: 56px;
  }

  .best-seller-page {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .promo-page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-grid,
  .home-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .parts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .promo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .catalog-finder {
    grid-template-columns: repeat(4, minmax(0, 1fr)) 168px;
  }

  .catalog-finder-submit {
    grid-column: auto;
    min-height: 76px;
  }

  .best-seller-page {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .promo-page {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .catalog-grid,
  .home-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .category-strip {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .parts-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .promo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  .promo-page {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.promo-card {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: transform 140ms ease;
}

.promo-card:hover {
  transform: translateY(-1px);
}

.promo-card-image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.promo-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-width: 36px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 6px;
  background: #0f75b8;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.promo-card-heart {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.promo-card-heart svg {
  width: 16px;
  height: 16px;
}

.promo-card-body {
  display: flex;
  flex-direction: column;
  padding: 8px 2px 0;
}

.promo-card strong {
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 800;
}

.promo-card p {
  color: #64748b;
  font-size: 0.84rem;
  margin-top: 0.18rem;
}

.promo-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #f59e0b;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
}

.promo-card-rating .count {
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-card-name {
  margin-top: 4px;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
  min-height: 2.2em;
}

.promo-card-meta {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.68rem;
  line-height: 1.2;
}

.promo-card-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.promo-card-price-block {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
}

.promo-card-price {
  color: #059669;
  font-size: 1.02rem;
  font-weight: 900;
}

.promo-card-old {
  color: #94a3b8;
  font-size: 0.72rem;
  text-decoration: line-through;
}

.promo-card-stock-row {
  display: none;
}

.promo-countdown {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.promo-countdown-label {
  margin: 0;
  color: #6b7280;
  font-size: 0.64rem;
  font-weight: 500;
}

.promo-countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 6px;
}

.promo-countdown-box {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 34px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 0.64rem;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.promo-countdown-box strong {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.promo-countdown-box small {
  color: #9ca3af;
  font-size: 0.6rem;
  line-height: 1;
}

.promo-countdown-box.is-accent {
  border-color: rgba(244, 63, 94, 0.22);
  background: rgba(254, 242, 242, 0.9);
}

.promo-cart-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  background: #0f75b8;
  color: #fff;
  box-shadow: 0 8px 16px rgba(15, 117, 184, 0.18);
  transition: transform 140ms ease, filter 140ms ease, opacity 140ms ease;
}

.promo-cart-button svg {
  width: 16px;
  height: 16px;
}

.promo-cart-button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.promo-cart-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.product-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.35);
  border-color: rgba(59, 130, 246, 0.3);
}

.product-image-wrapper {
  overflow: hidden;
  position: relative;
  aspect-ratio: 1.5;
  background: #111827;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
  transform: scale(1.06);
}

.product-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-sku {
  color: var(--color-gold, #e0b800);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.product-name {
  margin-top: 6px;
  color: #f8fafc;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
}

.product-meta {
  margin-top: 6px;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
}

.product-footer {
  margin-top: auto;
  padding-top: 16px;
  display: grid;
  gap: 12px;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price {
  color: #fff;
  font-size: 1.45rem;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.stock-badge {
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
}

.stock-ready {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.stock-low {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #e0b800;
}

.stock-out {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #f43f5e;
}

.catalog-action {
  display: inline-flex;
  min-height: 44px;
  width: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.catalog-action:active {
  transform: translateY(1px);
}

.add-cart-button {
  background: linear-gradient(135deg, #e0b800 0%, #e0b800 100%);
  color: #0f172a;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.add-cart-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #fde047 0%, #e0b800 100%);
  box-shadow: 0 6px 18px rgba(251, 191, 36, 0.25);
}

.quote-button {
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #e0b800;
}

.quote-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.1);
}

.catalog-action:disabled {
  cursor: not-allowed;
  opacity: 0.35;
  box-shadow: none;
}

@media (max-width: 640px) {
  .catalog-hero {
    padding: 20px;
  }
  .section-shell {
    padding: 14px;
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 12px;
  }
  .section-title {
    font-size: 1.15rem;
  }
  .section-subtitle {
    font-size: 0.84rem;
  }
  .category-chip {
    min-height: 96px;
    padding: 12px;
  }
  .product-card {
    border-radius: 14px;
  }
  .product-body {
    padding: 12px;
  }
  .price {
    font-size: 1.05rem;
  }
}

/* --- Light Theme Catalog Overrides --- */
.theme-light body {
  background: #f8fafc !important;
  color: #0f172a !important;
}

.theme-light .catalog-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  color: #fff !important;
}

.theme-light .catalog-hero p, 
.theme-light .catalog-hero span {
  color: #94a3b8 !important;
}

.theme-light .catalog-hero strong {
  color: #e0b800 !important;
}

.theme-light .product-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
}

.theme-light .product-card:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08) !important;
}

.theme-light .product-name {
  color: #0f172a !important;
}

.theme-light .product-meta {
  color: #64748b !important;
}

.theme-light .price {
  color: #0f172a !important;
}

.theme-light .quote-button {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

.theme-light .quote-button:hover:not(:disabled) {
  background: #f1f5f9 !important;
}

/* Catalog page final overrides */
body.catalog-page {
  background: #ffffff !important;
  color: #0f172a !important;
}

body.catalog-page main.mx-auto.max-w-7xl {
  max-width: 1180px;
}

body.catalog-page .catalog-hero {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 0 0 8px;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  color: #0f172a;
  box-shadow: none !important;
}

body.catalog-page .catalog-hero-copy {
  max-width: 760px;
  text-align: left;
}

body.catalog-page .catalog-hero h1 {
  color: #0f172a;
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.4px;
}

body.catalog-page .catalog-hero-copy p,
body.catalog-page .catalog-hero-note {
  color: #64748b;
  font-size: 0.94rem;
  line-height: 1.55;
}

body.catalog-page .catalog-finder {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 168px;
  gap: 12px;
  align-items: stretch;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.catalog-page .catalog-finder-field {
  min-height: 64px;
  padding: 12px 12px 10px 48px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

body.catalog-page .catalog-finder-step {
  top: 12px;
  left: 12px;
}

body.catalog-page .catalog-finder-submit {
  min-height: 64px;
  border-radius: 12px;
}

body.catalog-page .catalog-hero-note {
  width: 100%;
  margin: 0;
  text-align: left;
}

body.catalog-page .section-shell {
  margin-top: 1.25rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}

body.catalog-page .section-title {
  color: #0f172a;
  font-size: 1.45rem;
}

body.catalog-page .section-subtitle {
  color: #64748b;
}

body.catalog-page .catalog-grid,
body.catalog-page .home-product-grid {
  gap: 14px;
}

body.catalog-page .best-seller-card {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.catalog-page .best-seller-image-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

body.catalog-page .best-seller-body {
  padding: 8px 2px 0;
}

body.catalog-page .best-seller-name {
  min-height: auto;
  margin-top: 4px;
}

body.catalog-page .best-seller-body .catalog-action {
  margin-top: 8px;
}

@media (max-width: 640px) {
  body.catalog-page .catalog-finder {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  body.catalog-page .catalog-finder {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  body.catalog-page .catalog-finder {
    grid-template-columns: repeat(4, minmax(0, 1fr)) 168px;
  }
}

/* --- Parts Catalog Modern Redesign & Theme Sync --- */

/* 1. Header Banner Styling */
.parts-page-shell .catalog-hero {
  background: linear-gradient(135deg, #001c5b 0%, #003087 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 28, 91, 0.08);
  padding: 18px 24px !important;
  gap: 6px !important;
}

.parts-page-shell .catalog-hero h1 {
  font-family: 'Prompt', sans-serif;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-size: 1.6rem !important;
}

.parts-breadcrumbs {
  font-family: 'Prompt', sans-serif;
  color: rgba(255, 255, 255, 0.8) !important;
}

.parts-breadcrumbs a {
  color: #ffd100 !important;
  transition: color 0.15s ease;
  text-decoration: none;
  font-weight: 600;
}

.parts-breadcrumbs a:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

/* 2. Container Panel Card */
.parts-page-shell .section-shell {
  border-radius: 20px;
  padding: 28px;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 3. Category & Diagram Cards */
.parts-grid {
  gap: 20px;
}

.parts-card {
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 48, 135, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.parts-card:hover {
  transform: translateY(-4px);
  border-color: #ffd100;
  box-shadow: 0 12px 28px rgba(0, 48, 135, 0.08);
}

.parts-card-image-wrap {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #f8fafc 0%, #eef4fb 100%);
  border-bottom: 1px solid #edf2f7;
}

.parts-card-placeholder {
  color: #003087;
  opacity: 0.85;
  background: radial-gradient(circle, rgba(255, 209, 0, 0.1) 0%, transparent 70%);
}

.parts-card-placeholder svg {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 4px 8px rgba(0, 48, 135, 0.15));
}

.parts-card-badge {
  background: #003087 !important;
  color: #ffffff !important;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: 8px;
  top: 12px;
  left: 12px;
}

.parts-card-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.parts-card-title {
  color: #001c5b;
  font-weight: 700;
  font-size: 1.1rem;
}

.parts-card-meta {
  color: #64748b;
  margin-top: 6px;
  font-weight: 500;
}

.parts-card-link {
  color: #0f75b8;
  font-weight: 700;
  margin-top: auto;
  padding-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.parts-card:hover .parts-card-link {
  color: #ffd100;
}

/* 4. Table and Diagram View Style */
.parts-table-shell {
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(0, 48, 135, 0.04);
}

.parts-table-head {
  background: #003087;
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 2px solid #ffd100;
}

.parts-table-row {
  padding: 14px 16px;
  border-top: 1px solid #edf2f7;
  transition: background-color 0.15s ease;
}

.parts-table-row:hover {
  background: #f8fafc;
}

.parts-table-row.active {
  background: rgba(255, 209, 0, 0.08) !important;
  border-left: 4px solid #ffd100;
}

.parts-row-num {
  background: #ffd100;
  color: #001c5b;
  font-weight: 800;
}

.parts-row-desc strong {
  color: #003087;
}

.parts-row-desc span {
  color: #334155;
  font-weight: 600;
}

.parts-add-button {
  background: #0f75b8;
  color: #ffffff;
  border-radius: 8px;
  font-weight: 700;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(15, 117, 184, 0.15);
}

.parts-add-button:hover:not(:disabled) {
  background: #003087;
  box-shadow: 0 6px 16px rgba(0, 48, 135, 0.25);
  transform: translateY(-1px);
}

/* 5. Dark Theme Overrides for Parts Catalog */
html.theme-dark .parts-page-shell .section-shell {
  background: rgba(15, 23, 42, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25) !important;
}

html.theme-dark .parts-card {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
}

html.theme-dark .parts-card:hover {
  border-color: #ffd100 !important;
  background: rgba(15, 23, 42, 0.8) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3) !important;
}

html.theme-dark .parts-card-image-wrap {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html.theme-dark .parts-card-placeholder {
  color: #ffd100 !important;
  background: radial-gradient(circle, rgba(255, 209, 0, 0.15) 0%, transparent 70%) !important;
}

html.theme-dark .parts-card-title {
  color: #ffffff !important;
}

html.theme-dark .parts-card-meta {
  color: #94a3b8 !important;
}

html.theme-dark .parts-card-link {
  color: #ffd100 !important;
}

html.theme-dark .parts-card:hover .parts-card-link {
  color: #ffffff !important;
}

/* Diagram panel & stage */
html.theme-dark .parts-diagram-panel {
  background: rgba(15, 23, 42, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.theme-dark .diagram-stage-wrap {
  background: #0f172a !important;
}

html.theme-dark .diagram-image {
  filter: brightness(0.9) contrast(1.1);
}

/* Parts Table inside Dark Mode */
html.theme-dark .parts-table-shell {
  background: rgba(15, 23, 42, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.theme-dark .parts-table-head {
  background: #0f172a !important;
  border-bottom-color: #ffd100 !important;
  color: #f8fafc !important;
}

html.theme-dark .parts-table-row {
  background: transparent !important;
  border-top-color: rgba(255, 255, 255, 0.05) !important;
}

html.theme-dark .parts-table-row:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}

html.theme-dark .parts-table-row.active {
  background: rgba(255, 209, 0, 0.12) !important;
  border-left-color: #ffd100 !important;
}

html.theme-dark .parts-row-desc strong {
  color: #ffd100 !important;
}

html.theme-dark .parts-row-desc span {
  color: #e2e8f0 !important;
}

html.theme-dark .parts-row-price {
  color: #cbd5e1 !important;
}

html.theme-dark .parts-row-qty input {
  background: #0f172a !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

html.theme-dark .parts-row-qty input:focus {
  border-color: #ffd100 !important;
}

/* ─── Product Page (redesigned to match homepage) ─── */

.product-search-section {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

body.catalog-page .product-search-section .home-search-copy h1 {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

body.catalog-page .product-search-section .home-search-panel {
  width: min(100%, 900px);
}

.product-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: min(100%, 900px);
}

.product-filter-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid #d6dee8;
  border-radius: 10px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  transition: border-color 140ms ease;
}

.product-filter-item:hover {
  border-color: #93c5fd;
}

.product-filter-item span {
  white-space: nowrap;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
}

.product-filter-item select,
.product-filter-item input {
  border: 0;
  background: transparent;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 700;
  outline: none;
  min-width: 80px;
  max-width: 160px;
}

.product-filter-item select {
  cursor: pointer;
}

.product-list-section {
  margin-top: 1.5rem;
}

.product-list-head {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}

body.catalog-page .product-list-section .section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

body.catalog-page .product-list-section .section-subtitle {
  margin-top: 2px;
  font-size: 0.82rem;
  color: #64748b;
}

/* Product grid: 5 columns on desktop to match homepage */
body.catalog-page .catalog-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 640px) {
  body.catalog-page .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  body.catalog-page .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  body.catalog-page .catalog-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
  }
}

/* Smaller cards to match homepage */
body.catalog-page .best-seller-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.catalog-page .best-seller-image-wrap {
  aspect-ratio: 1.02;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

body.catalog-page .best-seller-body {
  padding: 8px 2px 0;
}

body.catalog-page .best-seller-name {
  font-size: 0.86rem;
  min-height: 2.2em;
}

body.catalog-page .best-seller-rating {
  font-size: 0.68rem;
}

body.catalog-page .best-seller-meta {
  font-size: 0.68rem;
}

body.catalog-page .best-seller-price {
  font-size: 1rem;
}

body.catalog-page .best-seller-stock-row {
  font-size: 0.68rem;
  margin-top: 4px;
}

body.catalog-page .best-seller-body .catalog-action {
  margin-top: 6px;
  min-height: 34px;
  font-size: 0.78rem;
  border-radius: 8px;
}

/* Product Pagination */
.product-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.product-page-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border: 1px solid #d6dee8;
  border-radius: 10px;
  background: #fff;
  color: #003087;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 140ms ease;
}

.product-page-btn:hover {
  background: #003087;
  color: #fff;
  border-color: #003087;
}

.product-page-info {
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Filter bar responsive */
@media (max-width: 640px) {
  .product-filter-bar {
    gap: 8px;
  }

  .product-filter-item {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
}

/* ─── Catalog Breadcrumb ─── */

.catalog-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
}

.catalog-breadcrumb a {
  color: #003087;
  text-decoration: none;
  transition: color 140ms ease;
}

.catalog-breadcrumb a:hover {
  color: #0f75b8;
}

.catalog-breadcrumb-sep {
  color: #cbd5e1;
  font-weight: 400;
}

.catalog-breadcrumb-current {
  color: #0f172a;
  font-weight: 700;
}

/* ─── Parts Catalog Page (match homepage) ─── */

body.catalog-page .parts-page-shell {
  max-width: 1180px;
}

body.catalog-page .product-list-section .parts-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (min-width: 640px) {
  body.catalog-page .product-list-section .parts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  body.catalog-page .product-list-section .parts-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  body.catalog-page .product-list-section .parts-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

body.catalog-page .parts-card {
  border-radius: 14px;
  border-color: #e2e8f0;
}

body.catalog-page .parts-card-image-wrap {
  aspect-ratio: 1.15;
  border-radius: 14px 14px 0 0;
}

body.catalog-page .parts-card-body {
  padding: 12px;
}

body.catalog-page .parts-card-title {
  font-size: 0.9rem;
}

body.catalog-page .parts-card-meta {
  font-size: 0.74rem;
}

body.catalog-page .parts-card-link {
  font-size: 0.72rem;
}

/* ─── Product Detail Page ─── */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1180px;
  margin: 1.5rem auto 0;
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
}

@media (min-width: 768px) {
  .product-detail-layout {
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
  }
}

.product-detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-detail-image-main {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  background: #f8fafc;
  object-fit: cover;
}

.product-detail-info {
  display: flex;
  flex-direction: column;
}

.product-detail-sku-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.product-detail-sku-badge {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.product-detail-title {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 900;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.product-detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.product-detail-meta-label {
  font-weight: 700;
  color: #1e293b;
}

.product-detail-specs-box {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.product-detail-specs-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.75rem;
}

.product-detail-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  font-size: 0.82rem;
}

@media (min-width: 480px) {
  .product-detail-specs-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.product-detail-spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-detail-spec-name {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 600;
}

.product-detail-spec-value {
  color: #0f172a;
  font-weight: 700;
}

.product-detail-price-box {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.product-detail-price {
  font-size: 2rem;
  font-weight: 900;
  color: #003087;
}

.product-detail-old-price {
  font-size: 1.2rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.product-detail-discount-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.product-qty-control {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  height: 44px;
}

.product-qty-btn {
  background: #f8fafc;
  border: 0;
  width: 36px;
  height: 100%;
  font-size: 1.1rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: background 120ms;
}

.product-qty-btn:hover {
  background: #e2e8f0;
}

.product-qty-input {
  border: 0;
  width: 44px;
  height: 100%;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  outline: none;
  background: #fff;
}

.product-detail-actions .catalog-action {
  flex: 1;
  min-width: 150px;
  height: 44px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
}

.related-products-section {
  margin-top: 3rem;
}
