:root {
  color-scheme: light;
  --ink: #071b2b;
  --ink-soft: #405262;
  --blue: #087f9b;
  --blue-dark: #056078;
  --ice: #e7f5f8;
  --orange: #ffb000;
  --paper: #ffffff;
  --canvas: #f1f5f7;
  --line: #d7e0e5;
  --success: #16845b;
  --shadow: 0 18px 45px rgba(7, 27, 43, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  min-height: 84px;
  padding: 14px clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--ink);
  color: white;
  border-bottom: 3px solid var(--orange);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: white;
  text-decoration: none;
}

.brand img {
  display: block;
  width: clamp(205px, 26vw, 245px);
  height: auto;
}

.header-contact {
  display: grid;
  justify-items: end;
  line-height: 1.25;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.language-switch {
  display: flex;
  flex-shrink: 0;
  padding: 3px;
  gap: 3px;
  border: 1px solid #7291a3;
  border-radius: 4px;
}

.language-switch button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: white;
  font-size: 0.875rem;
  font-weight: 800;
  cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
  background: var(--orange);
  color: var(--ink);
}

.language-switch button:hover {
  box-shadow: inset 0 0 0 2px #b8c7d0;
}

.language-switch button:focus-visible {
  outline: 3px solid #65d6ec;
  outline-offset: 3px;
}

.header-contact span {
  color: #a9bbc7;
  font-size: 0.78rem;
}

.header-contact a {
  color: white;
  font-size: 1.08rem;
  font-weight: 800;
  text-decoration: none;
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(40px, 6vw, 76px) 0 80px;
}

.catalog-intro {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 36px;
  margin-bottom: 32px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue-dark);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.intro-copy {
  max-width: 660px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 2vw, 1.12rem);
}

.inventory-summary {
  min-width: 160px;
  padding: 19px 22px;
  display: grid;
  background: var(--ink);
  color: white;
  border-left: 4px solid var(--orange);
  box-shadow: var(--shadow);
}

.inventory-summary strong {
  font-size: 2rem;
  line-height: 1;
}

.inventory-summary span {
  margin-top: 7px;
  color: #b8c7d0;
  font-size: 0.78rem;
}

.inventory-notice {
  margin-bottom: 24px;
  padding: clamp(22px, 4vw, 34px);
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(360px, 1.4fr) auto;
  align-items: center;
  gap: 24px 36px;
  background: var(--ink);
  color: white;
  border-left: 5px solid var(--orange);
  box-shadow: var(--shadow);
}

.notice-label {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.notice-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.notice-content {
  color: #d5e0e6;
  font-size: 0.94rem;
}

.notice-content p {
  margin: 0;
}

.notice-content p + p {
  margin-top: 8px;
}

.notice-content strong {
  color: white;
}

.notice-actions {
  display: grid;
  gap: 9px;
}

.notice-action {
  min-height: 50px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.notice-action:hover,
.notice-action:focus-visible {
  background: white;
}

.notice-action-email {
  border: 1px solid #9eb1bd;
  background: transparent;
  color: white;
}

.notice-action-email:hover,
.notice-action-email:focus-visible {
  color: var(--ink);
}

.catalog-controls {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 190px 170px;
  gap: 12px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(7, 27, 43, 0.055);
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field svg {
  position: absolute;
  left: 16px;
  width: 21px;
  fill: none;
  stroke: var(--ink-soft);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search-field input,
.select-field select {
  width: 100%;
  height: 52px;
  border: 1px solid #cbd6dc;
  border-radius: 2px;
  background: #fafdfe;
  color: var(--ink);
  outline: none;
}

.search-field input {
  padding: 0 16px 0 49px;
}

.search-field input:focus,
.select-field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(8, 127, 155, 0.14);
}

.select-field {
  position: relative;
}

.select-field span {
  position: absolute;
  z-index: 1;
  top: 5px;
  left: 13px;
  color: #60717e;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  pointer-events: none;
}

.select-field select {
  padding: 17px 34px 1px 12px;
  font-weight: 650;
}

.results-line {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.results-line p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 700;
}

.text-button {
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.product-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(7, 27, 43, 0.07);
}

.product-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e3e9ec;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  transition: transform 220ms ease;
}

.product-card:hover .product-image-wrap img {
  transform: scale(1.025);
}

.availability,
.condition-badge {
  position: absolute;
  top: 14px;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 3px 14px rgba(7, 27, 43, 0.14);
}

.availability {
  left: 14px;
}

.availability i {
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--success);
}

.condition-badge {
  right: 14px;
  color: var(--blue-dark);
}

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

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  color: var(--blue-dark);
  font-size: 0.73rem;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-meta span + span {
  position: relative;
}

.product-meta span + span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -9px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #93a3ae;
}

.product-body h2 {
  margin: 10px 0 7px;
  font-size: 1.28rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.part-number {
  margin: 0;
  color: #667984;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.045em;
}

.part-number strong {
  margin-left: 5px;
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: 0;
}

.compatibility {
  flex: 1;
  margin: 15px 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.price-row {
  padding-top: 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
}

.price-row strong {
  font-size: 1.55rem;
  letter-spacing: -0.035em;
}

.price-row .price-on-request {
  font-size: 1.15rem;
  letter-spacing: -0.015em;
}

.dialog-price.price-on-request {
  font-size: 1.55rem;
  letter-spacing: -0.025em;
}

.price-row span {
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 750;
}

.card-actions {
  margin-top: 17px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.details-button,
.text-link,
.primary-action,
.secondary-action,
.email-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.details-button {
  padding: 10px 17px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: white;
}

.details-button:hover,
.details-button:focus-visible,
.primary-action:hover,
.primary-action:focus-visible {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

.text-link {
  padding: 10px 15px;
  border: 1px solid #b8c7cf;
  color: var(--ink);
}

.empty-state {
  padding: 60px 24px;
  text-align: center;
  background: white;
  border: 1px solid var(--line);
}

.empty-state > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  background: var(--ice);
  color: var(--blue-dark);
  font-size: 1.5rem;
  font-weight: 900;
}

.empty-state h2 {
  margin: 0;
  font-size: 1.35rem;
}

.empty-state p {
  max-width: 520px;
  margin: 8px auto 19px;
  color: var(--ink-soft);
}

.empty-state a {
  color: var(--blue-dark);
  font-weight: 800;
}

footer {
  min-height: 180px;
  padding: 38px clamp(20px, 5vw, 72px) 82px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 24px 50px;
  background: var(--ink);
  color: white;
  border-top: 3px solid var(--orange);
}

footer > div:first-child {
  display: grid;
}

footer > div:first-child strong {
  font-size: 1.15rem;
}

footer > div:first-child span,
footer p {
  color: #9eb1bd;
  font-size: 0.82rem;
}

.footer-links {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.footer-links a {
  font-weight: 700;
  text-decoration: none;
}

footer p {
  grid-column: 1 / -1;
  margin: 0;
}

dialog {
  width: min(940px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: auto;
  border: 0;
  background: white;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

dialog::backdrop {
  background: rgba(2, 15, 24, 0.72);
  backdrop-filter: blur(4px);
}

.dialog-close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  width: 43px;
  height: 43px;
  border: 0;
  border-radius: 50%;
  background: rgba(7, 27, 43, 0.92);
  color: white;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.dialog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
}

.dialog-gallery {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  background: #dfe6e9;
}

.dialog-main-image {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: contain;
  object-position: center 12%;
}

.dialog-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.thumbnail-button {
  padding: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 2px solid transparent;
  background: #e3e9ec;
  cursor: pointer;
}

.thumbnail-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-button:hover,
.thumbnail-button:focus-visible,
.thumbnail-button.is-active {
  border-color: var(--blue-dark);
}

.dialog-details {
  padding: clamp(30px, 5vw, 54px);
}

.dialog-details h2 {
  margin: 13px 0 7px;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.dialog-part {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 800;
}

.dialog-part small {
  display: block;
  margin-top: 3px;
  font-weight: 500;
}

.dialog-price {
  display: block;
  margin: 22px 0;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.dialog-details dl {
  margin: 0 0 22px;
  border-top: 1px solid var(--line);
}

.dialog-details dl div {
  padding: 12px 0;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.dialog-details dt {
  color: #667984;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dialog-details dd {
  margin: 0;
  font-weight: 650;
}

.dialog-details > p:last-of-type {
  color: var(--ink-soft);
}

.dialog-actions {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 9px;
}

.primary-action {
  background: var(--ink);
  color: white;
}

.secondary-action {
  border: 1px solid var(--blue-dark);
  color: var(--blue-dark);
}

.email-action {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: 0.86rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mobile-contact {
  display: none;
}

@media (max-width: 880px) {
  .header-contact {
    display: none;
  }

  .inventory-notice {
    grid-template-columns: 1fr auto;
  }

  .notice-content {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .notice-actions {
    grid-column: 2;
    grid-row: 1;
  }

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

  .catalog-controls {
    grid-template-columns: 1fr 1fr;
  }

  .search-field {
    grid-column: 1 / -1;
  }

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

  .dialog-main-image {
    min-height: 0;
    max-height: 390px;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 620px) {
  .site-header {
    min-height: 76px;
    padding: 11px 18px;
    gap: 12px;
  }

  .brand img {
    width: min(190px, 50vw);
  }

  .language-name {
    display: none;
  }

  .header-contact {
    display: none;
  }

  main {
    width: min(100% - 28px, 1180px);
    padding: 34px 0 56px;
  }

  .catalog-intro {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .inventory-summary {
    min-width: 0;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 9px;
  }

  .inventory-summary span {
    margin: 0;
  }

  .inventory-notice {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .notice-content,
  .notice-actions {
    grid-column: auto;
    grid-row: auto;
  }

  .notice-actions,
  .notice-action {
    width: 100%;
  }

  .catalog-controls {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .search-field {
    grid-column: auto;
  }

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

  .product-image-wrap {
    aspect-ratio: 1.18 / 1;
  }

  footer {
    grid-template-columns: 1fr;
    padding-bottom: 94px;
  }

  .footer-links {
    justify-items: start;
  }

  footer p {
    grid-column: auto;
  }

  .dialog-details {
    padding: 28px 22px 32px;
  }

  .dialog-actions {
    grid-template-columns: 1fr;
  }

  .email-action {
    grid-column: auto;
  }

  .mobile-contact {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    padding: 8px;
    background: rgba(7, 27, 43, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 -10px 26px rgba(7, 27, 43, 0.2);
  }

  .mobile-contact a {
    min-height: 47px;
    display: grid;
    place-items: center;
    background: white;
    color: var(--ink);
    font-weight: 850;
    text-decoration: none;
  }

  .mobile-contact a:last-child {
    background: var(--orange);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
