:root {
  color-scheme: light;
  --ink: #18202a;
  --muted: #637083;
  --line: #d9e0e8;
  --panel: #ffffff;
  --soft: #f3f6f9;
  --accent: #0d7f8f;
  --accent-dark: #075d6b;
  --warm: #f0a23a;
  --success: #167c4b;
  --danger: #a64230;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f8fafc;
  color: var(--ink);
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px clamp(18px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.top-nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 15px;
}

.top-nav a:hover,
.phone:hover {
  color: var(--accent-dark);
}

.phone {
  font-weight: 700;
  white-space: nowrap;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(48px, 8vw, 92px) clamp(18px, 5vw, 72px) 42px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.78) 48%, rgba(255, 255, 255, 0.28) 100%),
    url("https://images.unsplash.com/photo-1621905252507-b35492cc74b4?auto=format&fit=crop&w=1600&q=80") center / cover;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: #39485a;
  font-size: 19px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-action,
.secondary-action,
.quick-form button,
.product-footer a,
.reset-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary-action,
.quick-form button,
.product-footer a {
  background: var(--accent);
  color: #fff;
}

.secondary-action,
.reset-button {
  background: #e7edf3;
  color: var(--ink);
}

.quick-form {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(24, 32, 42, 0.12);
}

.quick-form h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 clamp(18px, 5vw, 72px);
  transform: translateY(24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.trust-strip div {
  display: grid;
  gap: 5px;
  padding: 20px;
  background: #fff;
}

.trust-strip strong {
  font-size: 26px;
}

.trust-strip span {
  color: var(--muted);
}

.content-section,
.catalog-section {
  padding: 84px clamp(18px, 5vw, 72px) 32px;
}

.section-heading {
  max-width: 840px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.selection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.selection-grid article {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.selection-grid h3 {
  margin: 0 0 10px;
}

.selection-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.filters {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
}

.catalog-toolbar {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.catalog-toolbar span {
  color: var(--muted);
  font-weight: 800;
}

.catalog-toolbar select {
  max-width: 230px;
}

.compare-bar {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compare-bar span {
  color: var(--muted);
  font-weight: 800;
}

.compare-bar div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.compare-bar button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.product-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  min-height: 248px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.product-card:hover,
.product-card:focus-visible {
  border-color: rgba(13, 127, 143, 0.45);
  box-shadow: 0 16px 44px rgba(24, 32, 42, 0.1);
  outline: 0;
  transform: translateY(-2px);
}

.product-media {
  display: grid;
  place-items: center;
  padding: 12px;
  background: linear-gradient(150deg, #eef7f8, #f8f1df);
}

.product-media img {
  display: block;
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.product-media span {
  color: var(--accent-dark);
  font-size: 28px;
  font-weight: 900;
}

.product-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.product-title-row {
  display: grid;
  gap: 8px;
}

.product-title-row h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.stock,
.out-stock {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.stock {
  background: #e3f6ec;
  color: var(--success);
}

.out-stock {
  background: #fae8e2;
  color: var(--danger);
}

.product-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.product-body > p:first-of-type {
  display: -webkit-box;
  min-height: 66px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.product-card .meta-line {
  font-size: 13px;
}

.compare-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.compare-toggle input {
  width: 18px;
  min-height: 18px;
}

.spec-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}

.spec-list div {
  display: grid;
  gap: 4px;
  padding: 9px;
  background: var(--soft);
  border-radius: 8px;
}

.spec-list dt {
  color: var(--muted);
  font-size: 12px;
}

.spec-list dd {
  margin: 0;
  font-weight: 800;
}

.product-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.product-footer strong {
  font-size: 22px;
}

.product-modal[aria-hidden="true"] {
  display: none;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 38px);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 32, 0.62);
}

.modal-panel {
  position: relative;
  width: min(1320px, 100%);
  max-height: calc(100vh - clamp(28px, 6vw, 76px));
  overflow: visible;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.modal-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.38fr) minmax(0, 0.62fr);
  gap: 28px;
  padding: 34px;
  border-bottom: 1px solid var(--line);
}

.modal-image {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 24px;
  background: linear-gradient(150deg, #eef7f8, #f8f1df);
  border-radius: 8px;
}

.modal-image img {
  display: block;
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.modal-image span {
  color: var(--accent-dark);
  font-size: 38px;
  font-weight: 900;
}

.modal-content {
  display: grid;
  align-content: start;
  gap: 14px;
  padding-right: 44px;
}

.modal-kicker,
.modal-series,
.modal-description {
  margin: 0;
}

.modal-kicker {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  background: #e3f6ec;
  color: var(--success);
  font-size: 13px;
  font-weight: 800;
}

.modal-content h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

.modal-series {
  color: var(--accent-dark);
  font-weight: 800;
}

.modal-description {
  color: var(--muted);
  line-height: 1.65;
}

.modal-price {
  font-size: 30px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0;
  padding: 1px;
  background: var(--line);
}

.detail-grid div {
  display: grid;
  gap: 6px;
  min-height: 74px;
  padding: 14px;
  background: #fff;
}

.detail-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 0;
  font-weight: 800;
  line-height: 1.35;
}

@media (max-height: 780px) and (min-width: 981px) {
  .modal-panel:not(.compare-panel) {
    overflow: auto;
  }

  .modal-layout {
    padding: 24px;
  }

  .modal-image {
    min-height: 220px;
  }

  .modal-image img {
    max-height: 210px;
  }
}

.compare-panel {
  width: min(1480px, 100%);
  overflow: hidden;
}

.compare-header {
  display: grid;
  gap: 10px;
  padding: 28px 72px 22px 28px;
  border-bottom: 1px solid var(--line);
}

.compare-header h2,
.compare-header p {
  margin: 0;
}

.compare-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

.compare-header p:not(.modal-kicker) {
  color: var(--muted);
}

.compare-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 230px);
}

.compare-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.compare-table th,
.compare-table td {
  min-width: 190px;
  max-width: 260px;
  padding: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
}

.compare-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 210px;
  background: #f8fafc;
}

.compare-table thead th:first-child {
  z-index: 4;
}

.compare-table thead span,
.compare-table thead small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.compare-table thead strong {
  display: block;
  margin: 5px 0;
  color: var(--ink);
  line-height: 1.25;
}

.compare-table tbody th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.compare-table td {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

.service-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  color: #455468;
  font-size: 17px;
  line-height: 1.7;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.site-footer {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 34px clamp(18px, 5vw, 72px);
  background: #17202b;
  color: #fff;
}

.site-footer p,
.site-footer a {
  display: block;
  color: #cad5df;
}

@media (max-width: 980px) {
  .site-header,
  .top-nav,
  .hero,
  .catalog-layout,
  .service-columns,
  .modal-layout {
    grid-template-columns: 1fr;
  }

  .site-header {
    display: grid;
  }

  .top-nav {
    display: flex;
    flex-wrap: wrap;
  }

  .trust-strip,
  .selection-grid,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters {
    position: static;
  }

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

  .modal-panel {
    overflow: auto;
  }

  .modal-content {
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 34px;
  }

  h1 {
    font-size: 38px;
  }

  .trust-strip,
  .selection-grid,
  .product-grid,
  .product-card {
    grid-template-columns: 1fr;
  }

  .product-media {
    min-height: 104px;
  }

  .spec-list {
    grid-template-columns: 1fr;
  }

  .catalog-toolbar,
  .compare-bar,
  .product-footer,
  .site-footer,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .product-modal {
    padding: 10px;
  }

  .modal-panel {
    max-height: calc(100vh - 20px);
  }

  .modal-layout {
    gap: 18px;
    padding: 22px;
  }

  .modal-image {
    min-height: 190px;
  }

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