.catalog-app {
  min-height: 60vh;
  color: var(--dark);
}
.sg-intro {
  padding: 56px 0 40px;
  background: #f3f5f9;
  border-bottom: 1px solid var(--line);
}
.sg-intro h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.4;
  margin-bottom: 16px;
}
.sg-intro p {
  max-width: 880px;
  line-height: 1.9;
  margin-bottom: 20px;
}
.sg-content {
  padding: 36px 0 72px;
}
.sg-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 24px;
}
.sg-field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  min-width: 0;
  font-weight: 600;
}
.sg-field input,
.sg-field select,
.sg-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--dark);
  background: #fff;
  border: 1px solid #9095b0;
  border-radius: 8px;
}
.sg-field textarea {
  resize: vertical;
  line-height: 1.7;
}
.sg-actions,
.sg-admin-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}
.sg-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.sg-card,
.sg-panel {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
}
.sg-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sg-card h2,
.sg-card h3 {
  font-size: 20px;
  line-height: 1.65;
}
.sg-card p,
.sg-panel p {
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.sg-card .sg-actions {
  margin-top: auto;
}
.sg-panel {
  margin-bottom: 24px;
}
.sg-panel h2,
.sg-panel h3 {
  margin-bottom: 20px;
}
.sg-mpn {
  font-family: "Barlow", sans-serif;
  color: var(--dark);
  font-size: 20px;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-align: start;
}
.sg-part-number {
  display: inline-block;
  max-width: 100%;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-align: left;
  user-select: all;
}
.sg-brand-label {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}
.sg-brand-label img {
  width: 160px;
  height: 60px;
  object-fit: contain;
}
.sg-status {
  min-height: 30px;
  margin: 20px 0;
  line-height: 1.8;
  color: var(--dark);
}
.sg-error {
  color: #971d2c;
}
.sg-success {
  color: #14623c;
}
.sg-sourcing {
  background: #f2f3f8;
  color: #32375c;
  border-radius: 6px;
  padding: 10px 12px;
}
.sg-rfq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.sg-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 20px 0;
  line-height: 1.7;
}
.sg-consent input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 3px;
}
.sg-trap {
  position: absolute;
  inset-inline-start: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.sg-basket-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.sg-basket-fields {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
}
.sg-product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  margin: 28px 0;
  align-items: start;
}
.sg-product-visual img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}
.sg-product-visual p {
  padding: 12px 0;
  line-height: 1.8;
}
.sg-breadcrumb {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}
.sg-table {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
  margin: 18px 0;
}
.sg-table td,
.sg-table th {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: start;
  overflow-wrap: anywhere;
}
.sg-table th {
  width: auto;
  background: var(--light);
}
.sg-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  margin: 18px 0;
}
.sg-rfq-table {
  min-width: 640px;
  table-layout: fixed;
  margin: 0;
}
.sg-rfq-table th:nth-child(1) {
  width: 18%;
}
.sg-rfq-table th:nth-child(2) {
  width: 22%;
}
.sg-rfq-table th:nth-child(3) {
  width: 38%;
}
.sg-rfq-table th:nth-child(4),
.sg-rfq-table th:nth-child(5) {
  width: 11%;
}
.sg-rfq-table td {
  vertical-align: top;
  line-height: 1.8;
  word-break: normal;
}
.sg-panel details,
.sg-panel summary {
  line-height: 1.8;
  margin: 14px 0;
}
.sg-panel summary {
  cursor: pointer;
  font-weight: 600;
}
.sg-panel pre {
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--light);
  color: var(--dark);
  padding: 14px;
}
.sg-json {
  font-family: monospace;
  direction: ltr;
  text-align: left;
}
.sg-pagination {
  justify-content: center;
}
.catalog-app [hidden] {
  display: none;
}
.catalog-app button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sg-sticky-cart {
  position: sticky;
  top: var(--sg-header-height, 84px);
  z-index: 29;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.sg-cart-bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding-block: 4px;
}
.sg-cart-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-weight: 700;
  font-size: .875rem;
  line-height: 1.4;
  color: var(--blue);
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid #d2d5e5;
  border-radius: 3px;
  background: #f6f7fb;
}
.sg-cart-badge {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-variant-numeric: tabular-nums;
  font-size: .75rem;
  line-height: 1;
}
.catalog-app [id] {
  scroll-margin-top: calc(var(--sg-header-height, 84px) + var(--sg-cart-height, 58px) + 18px);
}
.sg-catalog-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  margin-top: 24px;
}
.sg-catalog-heading:not(:has(figure)) {
  grid-template-columns: minmax(0, 1fr);
}
.sg-catalog-hero {
  margin: 0;
  max-width: 440px;
  width: 100%;
  justify-self: end;
}
.sg-catalog-hero img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
}
.sg-catalog-hero figcaption {
  font-size: 14px;
  color: #41465d;
  margin-top: 8px;
  line-height: 1.65;
}
.sg-browse-search {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 24px;
  background: var(--light);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.sg-browse-search > .sg-actions {
  align-self: end;
  margin-bottom: 16px;
}
.sg-browse-card {
  padding: 0;
  overflow: hidden;
  color: var(--dark);
  transition: border-color .15s ease;
  height: 100%;
}
.sg-browse-card:hover,
.sg-browse-card:focus-visible {
  border-color: var(--blue);
}
.sg-category-card,
.sg-range-card {
  background: #f3f5f9;
}
.sg-category-card > img,
.sg-range-card > img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  background: transparent;
}
.sg-browse-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  flex: 1;
}
.sg-count {
  margin-top: auto;
  color: var(--blue);
  font-weight: 600;
  font-size: 15px;
}
.sg-brand-card > img {
  width: 100%;
  height: 112px;
  padding: 22px;
  object-fit: contain;
}
.sg-brand-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sg-directory-search {
  max-width: 480px;
}
.sg-catalog-note {
  color: #41465d;
  line-height: 1.8;
  margin-top: 28px;
}
.sg-product-thumb {
  width: 100%;
  height: 180px;
  object-fit: contain;
}
.sg-add-control {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.sg-card > .sg-add-control {
  margin-top: auto;
}
.sg-add-feedback {
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}
.sg-cart-item h3 {
  font-size: 18px;
  line-height: 1.65;
  margin-bottom: 6px;
}
.sg-cart-mpn {
  color: #41465d;
  font-family: "Barlow", sans-serif;
  font-size: 17px;
  text-align: start;
  overflow-wrap: anywhere;
}
.sg-cart-unit {
  color: #41465d;
  font-size: 15px;
}
.sg-quantity-field {
  margin: 0;
}
.sg-quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid #9095b0;
  border-radius: 8px;
  overflow: hidden;
}
.sg-quantity-control button {
  width: 42px;
  height: 44px;
  background: var(--light);
  color: var(--blue);
  font-size: 21px;
  border: 0;
  cursor: pointer;
}
.sg-quantity-control input {
  width: 86px;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  padding: 6px;
  text-align: center;
}
.sg-remove-item {
  align-self: end;
  min-height: 44px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #971d2c;
  text-decoration: underline;
  cursor: pointer;
}
.sg-line-options {
  grid-column: 1 / -1;
  font-size: 15px;
}
.sg-line-options summary {
  cursor: pointer;
  color: var(--blue);
  margin-bottom: 10px;
}
.sg-line-options .sg-field {
  max-width: 620px;
}
.sg-customer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
}
.sg-rfq-summary {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}
.sg-cart-empty {
  padding: 24px 0;
}
.sg-cart-empty h3 {
  margin-bottom: 12px;
}
.sg-manual-options > summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 600;
  padding: 12px 0;
}
.sg-manual-options form {
  margin-top: 12px;
}
.sg-file-upload {
  border: 1px dashed #9095b0;
  border-radius: 10px;
  padding: 20px;
  margin: 18px 0 24px;
  background: var(--light);
}
.sg-file-upload p {
  font-size: 14px;
}
.sg-step-label {
  color: var(--blue);
  font-weight: 700;
  margin-bottom: 10px;
}

@media (max-width: 1100px) {
  .sg-brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sg-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .sg-catalog-hero {
    max-width: 300px;
    justify-self: center;
  }
  .sg-catalog-heading,
  .sg-browse-search,
  .sg-customer-grid,
  .sg-basket-line {
    grid-template-columns: minmax(0, 1fr);
  }
  .sg-brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sg-basket-fields {
    justify-content: space-between;
  }
  .sg-cart-bar-inner {
    gap: 8px;
  }
  .sg-cart-bar-inner > .text-link {
    font-size: 14px;
  }
  .sg-cart-link {
    min-height: 44px;
  }
  .sg-browse-copy {
    padding: 18px;
  }
  .sg-brand-card > img {
    height: 96px;
    padding: 16px;
  }
  .sg-brand-card h3 {
    font-size: 17px;
  }
  .sg-rfq-layout,
  .sg-product-detail,
  .sg-search,
  .sg-product-grid:not(.sg-brand-grid) {
    grid-template-columns: minmax(0, 1fr);
  }
  .sg-rfq-layout,
  .sg-product-detail {
    gap: 20px;
  }
  .sg-panel,
  .sg-card:not(.sg-browse-card) {
    padding: 18px;
  }
  .sg-intro {
    padding: 36px 0 24px;
  }
  .sg-table td,
  .sg-table th {
    padding: 8px;
  }
}

/* v15: mobile product page — keep name and part number in the first screen */
@media (max-width: 700px) {
  .sg-product-detail { margin: 16px 0; gap: 12px; }
  .sg-product-visual { text-align: center; }
  .sg-product-visual img { max-height: 38vh; width: auto; max-width: 100%; margin-inline: auto; }
  .sg-product-visual p { padding: 4px 0 0; }
  body:has(.sg-product-detail) .floating-wa { display: none; }
  .sg-product-visual img { max-height: 32vh; }
  .sg-product-detail .sg-panel h1 { font-size: clamp(1.45rem, 6.4vw, 1.9rem); line-height: 1.35; }
}

/* v16: numbered pagination */
.sg-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 28px 0 8px; }
.sg-page-link { min-width: 42px; height: 42px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line, #d9dbe8); border-radius: 10px; background: #fff; color: var(--primary, #2E3192); font-weight: 700; text-decoration: none; }
.sg-page-link:hover { border-color: var(--primary, #2E3192); }
.sg-page-link.is-current { background: var(--primary, #2E3192); border-color: var(--primary, #2E3192); color: #fff; }
.sg-page-edge { font-size: 1.25rem; }
.sg-page-gap { padding: 0 4px; color: #6b6f86; }
[dir="rtl"] .sg-page-edge { transform: scaleX(-1); }
@media (max-width: 560px) { .sg-page-link { min-width: 38px; height: 38px; } }
.catalog-app .sg-pagination { flex-direction: row !important; }
.catalog-app .sg-pagination > * { width: auto !important; flex: 0 0 auto; margin: 0; }
@media (max-width: 560px) { .sg-pagination { gap: 4px; } .sg-page-link { min-width: 34px; height: 36px; padding: 0 6px; font-size: .9rem; } }
/* in-page navs must not inherit the mobile main-menu nav rules */
.catalog-app nav.sg-breadcrumb, .catalog-app nav.sg-pagination { display: flex !important; position: static !important; flex-direction: row !important; flex-wrap: wrap; inset: auto !important; padding: 0; border: 0; box-shadow: none; background: transparent; }
.catalog-app nav.sg-breadcrumb { gap: 8px; align-items: center; }
.catalog-app nav.sg-breadcrumb a { padding: 0; }
.catalog-app nav.sg-pagination { margin: 28px 0 8px; justify-content: center; align-items: center; gap: 6px; }
/* v16: category filter chips on range pages */
.catalog-app nav.sg-filter-chips { display: flex !important; position: static !important; flex-direction: row !important; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; border: 0; box-shadow: none; background: transparent; }
.sg-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line, #d9dbe8); border-radius: 999px; background: #fff; color: var(--primary, #2E3192); font-weight: 700; font-size: .95rem; text-decoration: none; }
.sg-chip span { font-weight: 500; color: #6b6f86; font-size: .85rem; }
.sg-chip.is-active { background: var(--primary, #2E3192); border-color: var(--primary, #2E3192); color: #fff; }
.sg-chip.is-active span { color: #dfe0f5; }
@media (max-width: 560px) { .catalog-app nav.sg-filter-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; } .sg-chip { white-space: nowrap; } }


/* v20: brand label on range cards, styled like the product card brand link */
.sg-browse-card .sg-card-brand { min-height: 0; align-self: flex-start; margin-bottom: -4px; }
