:root {
  color-scheme: light;
  --ink: #1d2933;
  --muted: #62717f;
  --line: #d9e4ea;
  --paper: #ffffff;
  --wash: #f4f8fa;
  --mint: #2bbf9f;
  --blue: #2f80ed;
  --coral: #f26f4b;
  --yellow: #f6c85f;
  --shadow: 0 18px 50px rgba(30, 54, 72, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--wash);
}

button,
input,
select {
  font: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(217, 228, 234, 0.85);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.brand,
.topnav,
.hero-actions,
.dock-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--yellow) 0 15%, transparent 16%),
    conic-gradient(from 20deg, var(--blue), var(--mint), var(--coral), var(--blue));
  box-shadow: inset 0 0 0 7px #fff, 0 8px 24px rgba(47, 128, 237, 0.18);
}

.topnav {
  gap: 8px;
}

.topnav a,
.ghost-button,
.secondary-button,
.primary-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 15px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.topnav a,
.ghost-button {
  background: transparent;
  color: var(--muted);
}

.topnav a:hover,
.ghost-button:hover:not(:disabled) {
  color: var(--ink);
  background: #eef5f7;
}

.ghost-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary-button {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.secondary-button {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.disabled-link {
  color: var(--muted);
  cursor: default;
}

.full {
  width: 100%;
}

.hero {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(34px, 6vw, 72px) clamp(18px, 5vw, 72px) 28px;
  background: linear-gradient(120deg, #f7fcff 0%, #eff8f4 52%, #fff8ed 100%);
}

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

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

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

h1 {
  margin-bottom: 20px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.hero-subtitle {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

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

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual img {
  width: min(100%, 560px);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metrics div {
  min-height: 112px;
  padding: 24px clamp(18px, 4vw, 52px);
  background: #fff;
}

.metrics strong,
.metrics span {
  display: block;
}

.metrics strong {
  font-size: 32px;
}

.metrics span {
  margin-top: 6px;
  color: var(--muted);
}

.section {
  padding: 68px clamp(18px, 5vw, 72px);
  background: #fff;
}

.section-head {
  margin-bottom: 24px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 14px;
}

.category-card {
  overflow: hidden;
  min-height: 284px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.category-card:hover,
.category-card.active {
  transform: translateY(-3px);
  border-color: rgba(43, 191, 159, 0.58);
  box-shadow: 0 16px 36px rgba(30, 54, 72, 0.12);
}

.category-card img {
  width: 100%;
  aspect-ratio: 1.45;
  object-fit: cover;
  display: block;
}

.category-card div {
  padding: 16px;
}

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

.catalog {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 38px clamp(18px, 5vw, 72px) 104px;
}

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

.filter-block {
  display: grid;
  gap: 8px;
}

.filter-block label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

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

input:focus,
select:focus {
  outline: 3px solid rgba(47, 128, 237, 0.16);
  border-color: rgba(47, 128, 237, 0.55);
}

.product-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.result-count {
  color: var(--muted);
  white-space: nowrap;
}

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

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.product-image {
  position: relative;
  aspect-ratio: 1.55;
  background: #f7fbfc;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.price-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
}

.product-body {
  display: grid;
  gap: 13px;
  padding: 16px;
  flex: 1;
}

.product-title {
  min-height: 48px;
  margin: 0;
  line-height: 1.35;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 8px;
  padding: 0 8px;
  background: #edf7f5;
  color: #176d5e;
  font-size: 12px;
  font-weight: 750;
}

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

.spec {
  min-height: 50px;
  padding: 9px 10px;
  border: 1px solid #edf2f5;
  border-radius: 8px;
  background: #fbfdfe;
}

.spec span,
.spec strong {
  display: block;
  overflow-wrap: anywhere;
}

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

.spec strong {
  margin-top: 3px;
  font-size: 13px;
}

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

.compare-toggle {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.compare-toggle.selected {
  border-color: var(--mint);
  background: #e9fbf7;
  color: #147866;
  font-weight: 800;
}

.compare-dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 30;
  width: min(720px, calc(100% - 28px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(29, 41, 51, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.compare-dock strong,
.compare-dock span {
  display: block;
}

.compare-dock span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.modal {
  width: min(920px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.modal::backdrop {
  background: rgba(14, 28, 38, 0.45);
  backdrop-filter: blur(6px);
}

.modal-shell {
  position: relative;
  overflow: auto;
  max-height: calc(100vh - 36px);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-shell.wide {
  min-width: min(1120px, calc(100vw - 28px));
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.close-modal {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  font-size: 24px;
  line-height: 1;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
}

.detail-media {
  min-height: 100%;
  background: #f4fafb;
}

.detail-media img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
  display: block;
}

.detail-main {
  padding: 42px;
}

.detail-main h2 {
  margin-bottom: 12px;
}

.detail-price {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.detail-price span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
  background: #f3f7fa;
  font-weight: 750;
}

.detail-section {
  margin-top: 24px;
}

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

.product-detail-page {
  padding: clamp(22px, 4vw, 52px) clamp(18px, 5vw, 72px) 80px;
}

.detail-loading {
  min-height: 260px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.product-detail {
  display: grid;
  gap: 24px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(22px, 4vw, 46px);
  align-items: start;
}

.detail-gallery,
.detail-summary,
.detail-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-gallery {
  overflow: hidden;
}

.detail-primary-media {
  aspect-ratio: 1.05;
  background: #f7fbfc;
}

.detail-primary-media img,
.detail-thumbs img,
.detail-image-stack img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.detail-primary-media img {
  height: 100%;
}

.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.detail-thumbs img {
  aspect-ratio: 1;
  background: #fff;
}

.detail-summary,
.detail-band {
  padding: clamp(22px, 4vw, 42px);
}

.detail-summary h1 {
  margin-bottom: 14px;
  font-size: clamp(34px, 5vw, 54px);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-band {
  display: grid;
  gap: 26px;
}

.param-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.param-table div {
  display: grid;
  grid-template-columns: minmax(110px, 0.42fr) minmax(0, 0.58fr);
  min-height: 46px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.param-table span,
.param-table strong {
  padding: 12px;
  overflow-wrap: anywhere;
}

.param-table span {
  color: var(--muted);
  background: #f7fafb;
  font-weight: 750;
}

.param-table strong {
  font-weight: 650;
}

.detail-video {
  width: 100%;
  max-height: 680px;
  border-radius: 8px;
  background: #000;
}

.detail-image-stack {
  display: grid;
  gap: 12px;
}

.detail-image-stack img {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.detail-page-error {
  margin: 48px auto;
  max-width: 720px;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compare-head {
  padding: 34px 42px 16px;
}

.compare-table-wrap {
  overflow-x: auto;
  padding: 0 42px 42px;
}

.compare-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  border: 1px solid var(--line);
}

.compare-table th,
.compare-table td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  width: 160px;
  background: #f7fafb;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

@media (max-width: 1180px) {
  .category-grid,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topnav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  .param-table {
    grid-template-columns: 1fr;
  }

  .detail-media img {
    min-height: 260px;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: 39px;
  }

  .category-grid,
  .product-grid,
  .filters,
  .spec-list,
  .detail-grid,
  .detail-thumbs {
    grid-template-columns: 1fr;
  }

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

  .product-toolbar,
  .compare-dock {
    align-items: stretch;
    flex-direction: column;
  }

  .dock-actions {
    width: 100%;
  }

  .dock-actions button {
    flex: 1;
  }

  .detail-main,
  .compare-head,
  .compare-table-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }
}
