:root {
  --blue: #1d4289;
  --ink: #111318;
  --muted: #626a76;
  --line: #d9dde5;
  --surface: #f6f7f9;
  --brand-soft: #e5e1e6;
  --white: #ffffff;
  font-family:
    "Nunito Sans", "Segoe UI", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

img {
  display: block;
  max-width: 100%;
}

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

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

.brand img {
  width: 178px;
  height: auto;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.header-actions a {
  padding: 9px 12px;
  border-radius: 6px;
}

.header-actions a:hover {
  background: var(--surface);
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(320px, 1.22fr);
  align-items: center;
  min-height: 76vh;
  padding: clamp(28px, 6vw, 82px) clamp(18px, 5vw, 64px) 36px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(48px, 9vw, 112px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 560px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}

.hero-media {
  align-self: end;
}

.hero-media img {
  width: min(1040px, 76vw);
  margin-left: auto;
  object-fit: contain;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 524px) minmax(250px, auto) minmax(440px, auto);
  gap: clamp(28px, 6vw, 96px);
  align-items: end;
  padding: 26px clamp(18px, 5vw, 64px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.search span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.search input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

.search input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(29, 66, 137, 0.16);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.filter-stack {
  display: grid;
  gap: 10px;
  justify-content: end;
}

.filter-stack > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
}

.filter,
.primary-action,
.card-action,
.close-dialog {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.filter {
  min-height: 48px;
  min-width: 76px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.filter:hover,
.filter.is-active {
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

.catalogue {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.product-card {
  display: grid;
  grid-template-rows: 280px auto;
  min-width: 0;
  background: var(--white);
}

.product-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-info {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-top: 1px solid var(--line);
}

.product-info h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.price {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tag {
  color: var(--blue);
  background: rgba(29, 66, 137, 0.1);
}

.price {
  color: var(--muted);
  background: var(--brand-soft);
}

.card-action {
  height: 42px;
  color: var(--white);
  background: var(--blue);
}

.card-action:hover,
.primary-action:hover {
  filter: brightness(0.94);
}

.contact {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 42px clamp(18px, 5vw, 64px);
  background: var(--ink);
  color: var(--white);
}

.contact h2 {
  margin-bottom: 0;
  font-size: 32px;
}

.contact p:not(.eyebrow) {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.5;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  color: var(--white);
  background: var(--blue);
  white-space: nowrap;
}

.product-dialog {
  width: min(1040px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  max-height: calc(100dvh - 30px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: auto;
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.24);
}

.product-dialog::backdrop {
  background: rgba(17, 19, 24, 0.58);
}

.product-dialog[open] {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  align-items: stretch;
}

.product-dialog img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: contain;
  background: var(--surface);
}

.product-dialog > div {
  min-height: 0;
  padding: 30px;
}

.product-dialog h2 {
  font-size: 34px;
  line-height: 1;
}

.dialog-price {
  color: var(--muted);
  font-weight: 900;
}

.dialog-action {
  width: 100%;
  margin-top: 18px;
}

.detail-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.detail-section h3 {
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.spec-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.spec-list div {
  display: grid;
  grid-template-columns: minmax(130px, 0.48fr) 1fr;
  gap: 12px;
  align-items: start;
}

.spec-list dt {
  color: var(--blue);
  font-weight: 900;
}

.spec-list dd {
  margin: 0;
  color: var(--ink);
}

.empty-detail {
  margin: 0;
  color: var(--muted);
}

.accessory-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.accessories-section {
  margin-top: 16px;
}

.accessories-dropdown {
  border: 1px solid rgba(29, 66, 137, 0.22);
  border-radius: 8px;
  background: rgba(29, 66, 137, 0.04);
  overflow: hidden;
}

.accessories-dropdown summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.accessories-dropdown summary::-webkit-details-marker {
  display: none;
}

.accessories-dropdown summary strong {
  display: block;
  color: var(--blue);
  font-size: 16px;
  text-transform: uppercase;
}

.accessories-dropdown summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.accessories-dropdown summary > b {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--white);
  background: var(--blue);
  border-radius: 6px;
  font-size: 22px;
  line-height: 1;
}

.accessories-dropdown[open] summary > b {
  transform: rotate(45deg);
}

.accessory-option {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.accessory-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.accessory-option strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.accessory-option small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.accessory-option b {
  color: var(--blue);
  font-size: 14px;
  white-space: nowrap;
}

.close-dialog {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 28px;
  line-height: 1;
}

.is-hidden {
  display: none;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-media img {
    width: 100%;
    margin-top: 22px;
  }

  .toolbar,
  .contact {
    grid-template-columns: 1fr;
  }

  .filters {
    justify-content: flex-start;
  }

  .filter-stack {
    justify-content: start;
  }

  .filter-stack > span {
    text-align: left;
  }

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

  .product-dialog[open] {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(180px, 34dvh) minmax(0, 1fr);
    align-items: stretch;
    overflow: auto;
    max-height: calc(100dvh - 20px);
  }

  .product-dialog > div {
    max-height: none;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .brand img {
    width: 150px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-copy p:not(.eyebrow) {
    font-size: 17px;
  }

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

  .product-card {
    grid-template-rows: 230px auto;
  }

  .product-dialog img {
    height: 100%;
    min-height: 180px;
  }

  .spec-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .accessory-option {
    grid-template-columns: 20px 1fr;
  }

  .accessory-option b {
    grid-column: 2;
  }
}
