:root {
  color-scheme: light;
  --ink: #13161c;
  --muted: #626a76;
  --line: #e1e5ea;
  --paper: #ffffff;
  --soft: #f5f7f9;
  --panel: #f9fafb;
  --charcoal: #1b2028;
  --teal: #176b63;
  --teal-dark: #0f4e49;
  --coral: #d84a3a;
  --gold: #bc7a25;
  --shadow: 0 18px 45px rgba(19, 22, 28, 0.12);
  --shadow-hover: 0 20px 55px rgba(19, 22, 28, 0.18);
  --ease: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

img {
  max-width: 100%;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(216, 74, 58, 0.55);
  outline-offset: 3px;
}

mark {
  border-radius: 4px;
  background: rgba(216, 74, 58, 0.18);
  color: inherit;
  padding: 0 2px;
}

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

.app-header,
.detail-header {
  background:
    linear-gradient(118deg, rgba(19, 22, 28, 0.96), rgba(15, 78, 73, 0.9)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1280' height='820' viewBox='0 0 1280 820'%3E%3Crect width='1280' height='820' fill='%231b2028'/%3E%3Cpath d='M70 668c196-106 354-136 548-112 188 24 356-23 586-166v430H70z' fill='%23ffffff' opacity='.07'/%3E%3Cpath d='M164 426c155-72 302-106 442-101 153 5 300 57 459 30' fill='none' stroke='%23d84a3a' stroke-width='20' stroke-linecap='round' opacity='.42'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  color: #fff;
}

.topbar,
.commerce-hero,
.app-shell,
.site-footer,
.product-detail {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  width: clamp(148px, 18vw, 196px);
  height: 54px;
  flex: 0 0 auto;
  border-radius: 4px;
  object-fit: contain;
  object-position: left center;
}

.brand-copy {
  min-width: 0;
}

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

.brand small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link,
.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none;
  transition:
    background var(--ease),
    border-color var(--ease),
    color var(--ease),
    transform var(--ease),
    box-shadow var(--ease);
  white-space: nowrap;
}

.button:hover,
.nav-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(19, 22, 28, 0.12);
}

.nav-link {
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 0 14px;
}

.button {
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 0 18px;
}

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

.button-secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--charcoal);
}

.button-light {
  background: #fff;
  color: var(--charcoal);
}

.button-ghost {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--charcoal);
}

.button-wide {
  width: 100%;
}

.commerce-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 44px;
  align-items: end;
  padding: 56px 0 74px;
}

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

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

.hero-copy h1,
.workspace-toolbar h2,
.panel-heading h2,
.detail-panel h1,
.related-section h2,
.not-found h1 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.04;
}

.hero-copy h1 {
  font-size: clamp(42px, 7vw, 78px);
}

.hero-copy p:not(.eyebrow) {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.hero-search {
  max-width: 620px;
  margin-top: 28px;
}

.hero-search input {
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  outline: none;
  padding: 0 18px;
}

.hero-search input:focus {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.hero-metrics div {
  min-width: 0;
  padding: 18px;
}

.hero-metrics div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-metrics span,
.hero-metrics small {
  display: block;
}

.hero-metrics span {
  font-size: 30px;
  font-weight: 900;
}

.hero-metrics small {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 750;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 36px 0 76px;
}

.filter-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 20px;
  border-right: 1px solid var(--line);
  padding-right: 24px;
}

.panel-heading h2 {
  font-size: 25px;
}

.filter-group {
  min-width: 0;
  border: 0;
  margin: 0 0 18px;
  padding: 0;
}

.filter-group legend {
  margin-bottom: 10px;
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 900;
}

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

.filter-option {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 750;
  transition: color var(--ease);
}

.filter-option:hover {
  color: var(--charcoal);
}

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

.catalog-workspace {
  min-width: 0;
}

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

.workspace-toolbar h2 {
  font-size: clamp(30px, 4vw, 44px);
}

.result-count {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
  margin-bottom: 18px;
}

.active-filter {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--charcoal);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  padding: 0 12px;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}

.active-filter:hover {
  border-color: var(--teal);
  background: #eef7f5;
  transform: translateY(-1px);
}

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

.product-card {
  display: grid;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(19, 22, 28, 0.04);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.product-card:hover {
  border-color: rgba(23, 107, 99, 0.35);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.product-media {
  position: relative;
  display: block;
  aspect-ratio: 1.32;
  background: var(--soft);
  text-decoration: none;
}

.product-media::before,
.gallery-frame::before,
.skeleton-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, #eef2f5 8%, #f8fafc 18%, #eef2f5 33%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.25s linear infinite;
}

.product-media img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--ease), transform 240ms ease;
}

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

.tag-row {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--charcoal);
  font-size: 11px;
  font-weight: 900;
  padding: 6px 9px;
  text-transform: uppercase;
}

.tag-featured {
  background: var(--charcoal);
  color: #fff;
}

.tag-new {
  color: var(--teal-dark);
}

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

.product-kicker,
.commercial-row,
.product-actions {
  display: flex;
  gap: 10px;
}

.product-kicker,
.commercial-row {
  align-items: center;
  justify-content: space-between;
}

.product-kicker span,
.product-kicker small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.product-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-specs span {
  border-radius: 999px;
  background: var(--soft);
  color: var(--charcoal);
  font-size: 12px;
  font-weight: 850;
  padding: 6px 9px;
}

.commercial-row {
  align-items: start;
}

.commercial-row strong {
  font-size: 18px;
}

.commercial-row small {
  max-width: 150px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

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

.empty-state {
  margin: 20px 0 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.detail-header {
  color: #fff;
}

.product-detail {
  padding: 36px 0 76px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 34px;
  align-items: start;
}

.product-gallery {
  display: grid;
  gap: 14px;
}

.gallery-frame {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.gallery-frame img {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.32;
  object-fit: cover;
}

.detail-panel {
  display: grid;
  gap: 18px;
  border-left: 1px solid var(--line);
  padding-left: 28px;
}

.detail-panel h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.detail-panel .tag-row {
  position: static;
}

.detail-description {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.detail-specs {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-specs div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.detail-specs dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-specs dd {
  margin: 0;
  font-weight: 900;
  text-align: right;
}

.detail-price {
  display: grid;
  gap: 3px;
}

.detail-price strong {
  font-size: 24px;
}

.detail-price span {
  color: var(--muted);
  font-weight: 750;
}

.related-section {
  margin-top: 44px;
}

.not-found {
  max-width: 680px;
  padding: 60px 0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 26px 0;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--teal);
  font-weight: 900;
  text-decoration: none;
}

.skeleton-card {
  position: relative;
  min-height: 420px;
  border-color: transparent;
  background: var(--soft);
}

.skeleton-card::before {
  border-radius: 8px;
}

@keyframes skeleton-loading {
  to {
    background-position-x: -200%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .commerce-hero,
  .app-shell,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 20px;
  }

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

  .detail-panel {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 620px) {
  .topbar,
  .commerce-hero,
  .app-shell,
  .site-footer,
  .product-detail {
    width: min(100% - 24px, 1180px);
  }

  .topbar,
  .topbar-actions,
  .workspace-toolbar,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .brand {
    align-items: center;
  }

  .brand-logo {
    width: min(156px, 46vw);
    height: 42px;
  }

  .topbar {
    padding: 16px 0;
  }

  .topbar-actions,
  .nav-link,
  .button {
    width: 100%;
  }

  .commerce-hero {
    padding: 34px 0 52px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .hero-metrics,
  .product-grid,
  .product-actions {
    grid-template-columns: 1fr;
  }

  .hero-metrics div + div {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-left: 0;
  }

  .commercial-row {
    align-items: start;
    flex-direction: column;
  }

  .commercial-row small {
    max-width: none;
    text-align: left;
  }

  .detail-specs div {
    align-items: start;
    flex-direction: column;
    gap: 3px;
  }

  .detail-specs dd {
    text-align: left;
  }
}
