/*
  WordPress adapter for the prototype CSS (main.css stays generated from src/).
  Maps core-block markup and theme-block states onto the approved design; tokens only.
*/

/* ---------- Core block resets inside prototype components ---------- */
.wp-block-image.intro__badge,
.wp-block-image.brand-panel__logo {
  margin: 0;
}

/* Sticky header below the WordPress admin bar (logged-in users only) */
.admin-bar .site-header {
  top: var(--wp-admin--admin-bar--height, 32px);
}

@media (max-width: 600px) {
  .admin-bar .site-header {
    top: 0;
  }
}

/* ---------- Hero facts (prototype used <dl>; editable paragraphs here) ---------- */
.hero__fact-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: #8ea3b6;
  margin-bottom: var(--space-2);
}

.hero__fact-value {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

/* ---------- Process list as an editable core list (numbers from a counter) ---------- */
.process-list.wp-block-list {
  list-style: none;
  padding: 0;
  counter-reset: process;
}

.process-list.wp-block-list > li {
  counter-increment: process;
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--white);
}

.process-list.wp-block-list > li::before {
  content: counter(process, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  color: var(--trp-orange);
}

/* ---------- Photo placeholder: label on the right (intro image) ---------- */
.ph__label--right {
  left: auto;
  max-width: 60%;
}

/* ---------- Product search while the catalog is not yet available ---------- */
.meta-search.is-unavailable .search-field__input:disabled {
  background: transparent;
  cursor: not-allowed;
}

.meta-search.is-unavailable .btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.meta-search .search-status {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
}

.catalog-pending {
  max-width: 48rem;
}

/* 3B.13H-2: homepage — quiet status line instead of a notice box */
.catalog-pending--quiet {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  margin: 0;
  font-size: var(--text-sm);
  color: var(--gray-600);
}

.catalog-pending--quiet svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--gray-500);
}

/* ---------- Server-rendered catalog listing (/products/, 3B.5A) ---------- */
.catalog-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

.catalog-preview {
  margin-bottom: var(--space-4);
}

.filters__apply {
  margin-top: var(--space-3);
}

.search-hints a.chip {
  text-decoration: none;
}

/* ---------- 3B.9A: compact results mode (search or category filter active) ----------
   The landing state keeps the full catalog head. With a query/filter the head shrinks (eyebrow, intro and examples
   are not rendered), the H1 drops to a compact size and the notices collapse to one line (full wording in <details>). */
.catalog-hero--results {
  padding-block: var(--space-5);
}

.catalog-hero--results::before {
  display: none;
}

.catalog-hero--results > .container {
  gap: var(--space-3);
}

.catalog-hero--results .h1 {
  font-size: var(--text-xl);
  max-width: none;
}

.catalog-hero--results .catalog-search {
  margin-top: 0;
}

.catalog-results-mode .section--sm {
  padding-top: var(--space-5);
}

.catalog-results-mode .catalog-notice {
  margin-bottom: var(--space-5);
}

.catalog-results-mode .catalog-preview {
  margin-bottom: var(--space-2);
}

.notice--compact {
  align-items: center;
  padding-block: var(--space-2);
}

.notice__more {
  flex: 1;
  min-width: 0;
}

.notice__more > summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px; /* the summary is the touch target */
  cursor: pointer;
  list-style: none;
}

.notice__more > summary::-webkit-details-marker {
  display: none;
}

.notice__more > summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--font-mono);
  color: var(--color-text-muted);
}

.notice__more[open] > summary::after {
  content: "−";
}

.notice__summary {
  flex: 1;
  min-width: 0;
}

.notice__toggle {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.notice__more > p {
  padding-bottom: var(--space-2);
}

@media (max-width: 900px) {
  .catalog-results-mode .catalog {
    row-gap: var(--space-4);
  }
}

@media (max-width: 600px) {
  /* The search field already states the context; the H1 stays for screen readers (results mode, phones only). */
  .catalog-hero--results .h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* ---------- 3B.9A: touch targets ≥ 44 × 44 px on touch screens and narrow viewports ----------
   Visual size is kept where the control sits in a dense row (copy buttons: negative margins). */
@media (max-width: 900px), (pointer: coarse) {
  .copy-btn {
    width: 44px;
    height: 44px;
    margin-block: calc(-1 * var(--space-2));
    margin-inline-end: calc(-1 * var(--space-3));
  }

  .qty button {
    width: 44px;
    height: 44px;
  }

  .qty input {
    height: 44px;
  }

  .add-btn,
  .chip,
  .catalog-search.pd-search .search-field .btn, /* beats the later 36px detail rule */
  .filters__apply {
    min-height: 44px;
  }

  .filter-opt {
    min-height: 44px;
  }
}

/* ---------- Product detail (3B.5B) ---------- */
.pd-search {
  max-width: 560px;
}

.pd-search .search-field__input {
  min-height: 46px;
  font-size: var(--text-base);
}

.pd-search .search-field .btn {
  min-height: 36px;
}

/* 3B.7D: the slim page-hero (breadcrumb + search) already separates the page head; a full section padding on top of
   it left ~94px (plus the staff-preview notice) before the product grid. Top only; bottom padding unchanged. */
.pd-section {
  padding-top: var(--space-6);
}

/* Copy button: short confirmation state (set by product.js for ~1.6 s after a successful copy). */
.copy-btn.is-copied,
.copy-btn.is-copied:hover {
  color: var(--color-success);
  background: var(--gray-100);
}

.pd .pd__photo img,
.pd .pd__thumb .ph--photo img {
  object-fit: contain; /* show the whole part, never crop a product photo */
  background: var(--color-white, #fff);
}

.pd__thumb .ph--photo {
  display: block;
  position: relative;
  aspect-ratio: 1;
}

.pd__actions .qty {
  flex: none;
}

.pd__docs a,
.pd__related a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.pd__docs li,
.pd__related li {
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
}

/* ---------- Request a Quote submission (3B.6A) ---------- */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

[data-rfq-result]:empty,
[data-rfq-lines-error]:empty {
  display: none;
}

[data-rfq-result] {
  margin-bottom: var(--space-4);
}

.inquiry-form .btn[aria-busy="true"] {
  cursor: progress;
  opacity: 0.6;
}

/* ---------- Product image system (3B.8, ADR-030) ----------
   ph--media: any resolved image (SKU photo or representative) — whole part visible, never cropped, calm light ground.
   ph--rep:   representative image frame; its disclaimer is figcaption.ph-caption BELOW the frame (never on the image).
   ph--empty: neutral placeholder text, no schematic. */
.ph--media {
  background: #f7f8fa;
  background-image: none;
}

.ph.ph--media img {
  object-fit: contain;
  background: transparent;
}

.ph-figure {
  margin: 0;
}

/* Disclaimer under a representative image: one compact line of secondary text. */
.ph-caption {
  margin: 0;
  padding-top: var(--space-2);
  color: var(--color-text-muted);
  font-size: 11px;
  line-height: 1.35;
}

.product-card .ph-caption {
  padding: var(--space-2) var(--space-5) 0;
}

.cat-card .ph-caption {
  padding: var(--space-2) var(--space-6) 0;
}

.ph--empty {
  display: grid;
  place-items: center;
  background-image: none;
  background-color: var(--gray-50);
}

.ph__empty {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.ph__empty svg {
  width: 28px;
  height: 28px;
  opacity: 0.55;
}

/* ---------- Photo area with an authentic photo chosen in the editor ---------- */
figure.ph--photo {
  margin: 0;
  background: var(--gray-100);
}

.ph--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Corporate pages (3B.2B): core-block versions of prototype elements ---------- */
.wp-block-image.about-logo {
  margin: var(--space-8) 0 0;
}

.wp-block-image.about-logo img {
  width: 200px;
}

/* Check list as an editable core list; tick drawn from the sprite's i-check shape */
.check-list.wp-block-list {
  list-style: none;
  padding: 0;
}

.check-list.wp-block-list > li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  background: var(--meta-blue);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Contact list items are groups (icon block + paragraph) instead of <li> */
.contact-list > .wp-block-group {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-inverse-soft);
}

.cert-slot .wp-block-meta-icon svg {
  width: 28px;
  height: 28px;
}

/* Inquiry forms while the inquiry backend is not connected */
.inquiry-form .form-unavailable {
  margin: 0;
}

.quote-form.inquiry-form > .form-unavailable {
  margin-bottom: var(--space-5);
}

.inquiry-form .form-actions {
  display: grid;
  gap: var(--space-2);
  justify-items: start;
}

.inquiry-form .btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ---------- 3B.9C: grid / compact list catalog views (inc/catalog-views.php) ----------
   data-view="auto": both views are rendered; the list shows up to 900 px, the grid above (server default, no flash).
   data-view="grid" | "list": only that view is rendered. */
.catalog-views[data-view="auto"] .catalog-view--list,
.results-bar .view-toggle--mobile {
  display: none;
}

@media (max-width: 900px) {
  .catalog-views[data-view="auto"] .catalog-view--list,
  .results-bar .view-toggle--mobile {
    display: block;
  }

  .catalog-views[data-view="auto"] .catalog-view--grid,
  .results-bar .view-toggle--desktop {
    display: none;
  }

  .results-bar .view-toggle--mobile {
    display: inline-flex;
  }
}

/* View switch: segmented control beside the result count; ≥ 44 × 44 px targets; selected = filled. */
.results-bar__count {
  flex: 1 1 auto;
  min-width: 0;
}

.view-toggle {
  display: inline-flex;
  flex: none;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-xs);
  background: var(--white);
}

.view-toggle__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-soft);
  text-decoration: none;
}

.view-toggle__btn + .view-toggle__btn {
  border-left: 1px solid var(--color-line);
}

.view-toggle__btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.view-toggle__btn:hover {
  color: var(--color-primary);
  background: var(--blue-50);
}

.view-toggle__btn[aria-current="true"] {
  background: var(--color-primary);
  color: var(--white);
}

.view-toggle__btn:focus-visible {
  position: relative;
  z-index: 1;
  outline-offset: 2px;
}

.results-bar .active-filters {
  flex-basis: 100%;
}

.results-bar .active-filters:empty {
  display: none;
}

@media (max-width: 600px) {
  .view-toggle__text {
    display: none; /* icon-only on phones; each link keeps its aria-label */
  }

  .view-toggle__btn {
    padding: 0;
  }
}

/* ---------- Compact list ---------- */
.catalog-view--list .pl-note {
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.pl-family {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--color-line);
  background: var(--gray-25);
}

.pl-family .ph-figure {
  flex: none;
  width: 112px;
}

.pl-family .ph-caption {
  padding-top: var(--space-1);
  font-size: var(--text-xs);
}

.pl-family__text {
  font-size: var(--text-sm);
  color: var(--color-text-soft);
}

.pl-head {
  display: none;
}

.product-list {
  border-top: 1px solid var(--color-line);
}

.pl-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "id   act"
    "name act"
    "oem  oem";
  column-gap: var(--space-3);
  row-gap: 2px;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-line);
}

.pl-row--media {
  grid-template-columns: 76px minmax(0, 1fr) auto;
  grid-template-areas:
    "thumb id   act"
    "thumb name act"
    "oem   oem  oem";
}

.pl-thumb {
  grid-area: thumb;
  align-self: start;
}

.pl-thumb__img {
  display: block;
  width: 76px;
  height: 57px;
  object-fit: contain; /* never crop the part */
  background: #f7f8fa;
  border: 1px solid var(--color-line);
}

.pl-thumb__cap {
  display: block;
  margin-top: 2px;
  font-size: var(--text-xs);
  line-height: 1.25;
  color: var(--color-text-muted);
}

.pl-thumb__empty {
  display: grid;
  place-items: center;
  width: 76px;
  height: 57px;
  border: 1px dashed var(--color-line-strong);
  font-size: var(--text-xs);
  text-align: center;
  color: var(--color-text-muted);
}

.pl-id {
  grid-area: id;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  min-width: 0;
}

.pl-code {
  margin: 0;
  font-size: var(--text-md);
  line-height: 1.2;
}

.pl-code a {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* touch target; text stays compact */
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-line-strong);
  text-underline-offset: 3px;
}

.pl-code a:hover {
  color: var(--color-primary);
  text-decoration-color: currentColor;
}

.pl-code mark,
.pl-oem mark {
  background: #ffe2c6;
  color: inherit;
}

.pl-draft {
  font-size: var(--text-xs);
}

.pl-name {
  grid-area: name;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-2);
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-soft);
  min-width: 0;
}

.pl-name__text {
  color: var(--color-text-muted);
}

.pl-name__text::before {
  content: "· ";
}

.pl-oem {
  grid-area: oem;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
}

.pl-oem dt {
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.pl-oem dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px var(--space-2);
  margin: 0;
  min-width: 0;
}

.pl-oem__ref {
  padding: 2px 6px;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-soft);
  overflow-wrap: anywhere;
}

.pl-oem__more,
.pl-oem__staff {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.pl-oem__staff {
  flex-basis: 100%;
}

/* 3B.15A: grid-card OEM references a little larger and darker (same chips, same layout) */
.product-card__oem dt {
  font-size: 11px;
  color: var(--color-text-soft);
}

.product-card__oem .code {
  font-size: var(--text-sm);
  color: var(--color-text);
  border-color: var(--gray-200, var(--gray-100));
}

.pl-act {
  grid-area: act;
  align-self: start;
}

.pl-add {
  min-height: 44px;
  min-width: 44px;
}

.pl-add__label::before {
  content: "Add";
}

.pl-add[aria-pressed="true"] .pl-add__label::before {
  content: "Added";
}

.pl-add--email .pl-add__label::before {
  content: "Quote";
}

/* 3B.18E: Turkish visual labels (decorative, aria-hidden; the accessible name comes from aria-label) */
:lang(tr) .pl-add__label::before {
  content: "Ekle";
}

:lang(tr) .pl-add[aria-pressed="true"] .pl-add__label::before {
  content: "Eklendi";
}

:lang(tr) .pl-add--email .pl-add__label::before {
  content: "Teklif";
}

/* Desktop: table-like rows with a column header (header is decorative; each row is self-describing). */
@media (min-width: 901px) {
  .pl-head {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1.6fr) 110px;
    gap: var(--space-4);
    padding-bottom: var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    color: var(--color-text-muted);
  }

  .pl-head--media {
    grid-template-columns: 76px 170px minmax(0, 1fr) minmax(0, 1.6fr) 110px;
  }

  .pl-row {
    grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1.6fr) 110px;
    grid-template-areas: "id name oem act";
    align-items: center;
    column-gap: var(--space-4);
    padding: var(--space-2) 0;
  }

  .pl-row--media {
    grid-template-columns: 76px 170px minmax(0, 1fr) minmax(0, 1.6fr) 110px;
    grid-template-areas: "thumb id name oem act";
  }

  .pl-thumb,
  .pl-act {
    align-self: center;
  }

  .pl-act {
    justify-self: end;
  }

  .pl-name {
    flex-direction: column;
  }

  .pl-name__text::before {
    content: none;
  }

  .pl-oem {
    margin-top: 0;
  }

  .pl-oem dt {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap; /* named by the column header visually; still read per row */
  }
}

/* ---------- 3B.10A: source-preserving naming ----------
   Main name = approved family label; the unchanged CSV source description is shown as labelled supplier data
   (never restyled to look like a product name). The card footer no longer repeats the family. */
.product-source {
  margin: 0;
  font-size: var(--text-xs);
  line-height: 1.4;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.product-source__text {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  color: var(--color-text-soft);
}

.product-card .product-source {
  margin-top: 2px;
}

.product-card__foot {
  justify-content: flex-end;
}

.pd__source {
  margin-top: calc(-1 * var(--space-1));
  font-size: var(--text-sm);
}

.pl-name .product-source {
  flex-basis: 100%;
  font-size: var(--text-xs);
}

.pl-name .product-source::before {
  content: none; /* own line, no "· " separator */
}

/* 3B.11B — long search terms and code lists wrap inside the chip and the code-lookup notice (no horizontal scroll) */
.active-filters .chip {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.active-filters .chip svg {
  flex-shrink: 0;
}

.catalog-codes {
  margin: var(--space-2) 0 var(--space-3);
  overflow-wrap: anywhere;
}

.catalog-codes p {
  margin: 0;
}

.empty-state p {
  overflow-wrap: anywhere; /* an unbroken search term in "No product … matches “…”" never widens the page */
}

/* 3B.12B-1 — forms that cannot send yet: fields visibly inactive (disabled fieldsets), no default fieldset frame */
.inquiry-form fieldset.form-fields {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.inquiry-form fieldset:disabled .input,
.inquiry-form fieldset:disabled .select,
.inquiry-form fieldset:disabled .textarea {
  background: var(--color-bg-muted);
  border-color: var(--color-line);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.inquiry-form fieldset:disabled label,
.inquiry-form fieldset:disabled .check {
  color: var(--color-text-muted);
}

/* ---------- 3B.12B-2B: e-mail inquiries while online RFQ is off ---------- */
.email-inquiry .form-section__n svg {
  width: 20px;
  height: 20px;
  vertical-align: -4px;
}

.email-inquiry__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  margin-top: var(--space-2);
}

.email-inquiry__actions p {
  margin: 0;
}

.email-inquiry a:not(.btn),
.catalog-closed a:not(.btn),
.pd__actions--email + p a {
  font-family: var(--font-mono);
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

.hero__cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.catalog-closed {
  flex-wrap: wrap;
  align-items: center;
}

.catalog-closed > span {
  flex: 1 1 280px;
}

.limited-catalog {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-5);
  border-left: 3px solid var(--meta-blue);
  background: var(--blue-50);
  text-align: left;
}

.contact-list a {
  color: var(--white);
  overflow-wrap: anywhere;
}

.site-footer__contact a {
  overflow-wrap: anywhere;
}

/* Photo wrappers without an approved photo are not rendered for visitors: the remaining copy uses one column. */
.intro:not(:has(> .intro__media)),
.mfg-teaser__grid:not(:has(> .mfg-teaser__media)),
.mfg-stage:not(:has(> .mfg-stage__media)) {
  grid-template-columns: minmax(0, 1fr);
}

.intro:not(:has(> .intro__media)) > .intro__copy,
.mfg-teaser__grid:not(:has(> .mfg-teaser__media)) > *,
.mfg-stage:not(:has(> .mfg-stage__media)) > .mfg-stage__copy {
  max-width: 52rem;
}

/* 3B.17B-2: small analytics preference panel (shown only while analytics can run and no choice is stored) */
.analytics-consent {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 1000;
  max-width: 26rem;
  padding: var(--space-4) var(--space-5);
  background: var(--white);
  border-left: 3px solid var(--meta-blue);
  box-shadow: var(--shadow-md);
  font-size: var(--text-sm);
}

.analytics-consent[hidden] {
  display: none;
}

.analytics-consent__text {
  margin: 0 0 var(--space-3);
}

.analytics-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@media (max-width: 600px) {
  .analytics-consent {
    left: var(--space-4);
    max-width: none;
  }
}

/* 3B.17C: with a real photo in the home intro, the logo badge sits below it instead of covering part of the picture */
.intro__media:has(> figure.ph--photo) .intro__badge {
  position: static;
  display: inline-block;
  margin-top: var(--space-4);
}

/* 3B.17C: company-archive photograph in the About heritage text — natural ratio, never cropped */
.wp-block-image.about-archive {
  margin: var(--space-2) 0 0;
}

.wp-block-image.about-archive img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-line);
}

.wp-block-image.about-archive figcaption {
  margin: var(--space-2) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: left;
}

/* 3B.13I: About "At a glance" — confirmed figures in corporate blue instead of the placeholder grey */
.section:not(.section--dark) .stat:not(.meta-pending) .stat__value {
  color: var(--meta-blue);
}

/* ---------- 3B.13H-2: homepage — "Find a part" rows and inquiry steps (homepage only) ---------- */
.home-content .search-band .catalog-closed,
.home-content .search-band__note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-3) var(--space-4);
  align-items: center;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--charcoal);
}

.home-content .search-band__note {
  grid-template-columns: auto minmax(0, 1fr);
  margin-top: var(--space-4);
  color: var(--gray-700);
}

.home-content .search-band__note p {
  margin: 0;
}

.home-content .search-band .catalog-closed > span {
  flex: none;
}

@media (max-width: 600px) {
  .home-content .search-band .catalog-closed {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .home-content .search-band .catalog-closed .btn {
    grid-column: 2;
    justify-self: start;
  }

  .home-content .search-band__note {
    align-items: start;
  }

  .home-content .search-band .catalog-closed svg,
  .home-content .search-band__note svg {
    margin-top: 2px;
  }
}

.home-content .step__n {
  font-size: var(--text-xl);
  line-height: 1;
  color: var(--trp-orange);
}

.home-content .step h3 {
  font-size: var(--text-lg);
  line-height: 1.25;
  color: var(--charcoal);
}

.home-content .step p:not(.step__n) {
  font-size: var(--text-base);
  line-height: 1.55;
}

/* 3B.18D: EN | TR language switcher — text links, no flags. Desktop: header actions; mobile (≤900px): top of the drawer. */
.lang-switch__list {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang-switch__list > li + li::before {
  content: "|";
  padding: 0 var(--space-1);
  color: var(--color-line-strong);
}

.lang-switch__item {
  display: inline-block;
  min-width: 2rem;
  padding: var(--space-2) var(--space-1);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--color-text-soft);
  text-decoration: none;
}

a.lang-switch__item:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.lang-switch__item.is-active {
  color: var(--color-primary);
  font-weight: var(--weight-semibold);
  box-shadow: inset 0 -2px 0 var(--color-primary);
}

.lang-switch--nav {
  display: none;
}

@media (max-width: 900px) {
  .lang-switch--header {
    display: none;
  }

  .lang-switch--nav {
    display: block;
  }

  .lang-switch--nav .lang-switch__item {
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: var(--space-3) var(--space-2);
    font-size: var(--text-base);
  }
}

/* 3B.18H-2: first-visit language choice — small, non-blocking panel (no backdrop): bottom-left on desktop, bottom on
   mobile; moves under the header (.lang-pick--top) while the analytics preference panel is visible, so they never overlap. */
.lang-pick {
  position: fixed;
  left: var(--space-4);
  bottom: var(--space-4);
  z-index: 1001;
  width: min(22rem, calc(100vw - 2 * var(--space-4)));
  padding: var(--space-4) var(--space-5);
  background: var(--white);
  border-left: 3px solid var(--meta-blue);
  box-shadow: var(--shadow-md);
}

.lang-pick__title {
  margin: 0 0 var(--space-1);
  font-weight: var(--weight-semibold);
}

.lang-pick__text {
  margin: 0 0 var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-soft);
}

.lang-pick__alt {
  display: block;
  color: var(--color-text-muted);
}

.lang-pick__options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.lang-pick__options .btn {
  min-height: 44px;
  min-width: 6.5rem;
}

.lang-pick__close {
  display: inline-block;
  min-height: 44px;
  margin-top: var(--space-2);
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--color-text-soft);
  text-decoration: underline;
  cursor: pointer;
}

.lang-pick--top {
  top: calc(var(--header-h) + var(--space-3));
  bottom: auto;
}

@media (max-width: 600px) {
  .lang-pick {
    right: var(--space-4);
    width: auto;
  }
}
