:root {
  --bg: #f7f5f0;
  --panel: #ffffff;
  --ink: #1f1f1f;
  --muted: #777777;
  --line: #e8e2d8;
  --blue: #0f2742;
  --gold: #b58b4c;
  --shadow: 0 24px 60px rgba(15, 39, 66, 0.11);
  --soft-shadow: 0 12px 34px rgba(31, 31, 31, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(181, 139, 76, 0.11), transparent 28%),
    linear-gradient(135deg, #fbfaf7 0%, var(--bg) 44%, #f8f8f8 100%);
  color: var(--ink);
  font-family: Inter, Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 76px clamp(22px, 6vw, 84px) 54px;
  overflow: hidden;
  animation: fadeUp 0.75s ease both;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 24px;
  background:
    linear-gradient(90deg, rgba(15, 39, 66, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(15, 39, 66, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  border-radius: 28px;
  pointer-events: none;
  mask-image: linear-gradient(120deg, #000 15%, transparent 78%);
}

.hero__content,
.hero__stats,
.catalog {
  position: relative;
  z-index: 1;
}

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

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

h1 {
  max-width: 790px;
  margin-bottom: 22px;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.98;
  font-weight: 700;
}

.hero__subtitle {
  max-width: 620px;
  margin-bottom: 34px;
  color: #5c5c5c;
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.search-pill {
  min-width: min(100%, 420px);
  height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(15, 39, 66, 0.07);
}

.search-pill span,
.field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.search-pill input,
.field input,
.field select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.primary-btn,
.ghost-btn {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.primary-btn {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 14px 30px rgba(15, 39, 66, 0.2);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.primary-btn:hover {
  background: #17385c;
  box-shadow: 0 18px 38px rgba(15, 39, 66, 0.26);
}

.ghost-btn {
  background: #fff;
  color: var(--blue);
  border-color: var(--line);
}

.hero__stats {
  display: grid;
  gap: 16px;
}

.hero__stats div {
  padding: 28px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(232, 226, 216, 0.9);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(10px);
}

.hero__stats span {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 42px;
  font-weight: 800;
}

.hero__stats small {
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px clamp(18px, 5vw, 64px) 80px;
}

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

.catalog__heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
}

.catalog__heading p:last-child {
  margin-bottom: 8px;
  color: var(--muted);
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) repeat(3, minmax(150px, 0.75fr)) minmax(210px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 28px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  transition: box-shadow 0.25s ease;
}

.toolbar.is-stuck {
  box-shadow: var(--shadow);
}

.field {
  min-height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  background: #fbfaf7;
  border: 1px solid #ece6dc;
  border-radius: 14px;
}

.field input,
.field select {
  height: 22px;
}

.price-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.product-card {
  background: var(--panel);
  border: 1px solid rgba(232, 226, 216, 0.86);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: cardIn 0.55s ease both;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.product-media {
  width: calc(100% - 24px);
  aspect-ratio: 4 / 3;
  margin: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #eee8dc;
  padding: 0;
}

.product-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.product-body {
  padding: 0 18px 20px;
}

.product-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  margin: 4px 0 14px;
}

.product-id {
  margin: 0;
  color: var(--blue);
  font-size: 19px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.price {
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
  white-space: nowrap;
}

.meta-list {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.meta-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.meta-row span:first-child {
  color: var(--muted);
}

.card-btn {
  width: 100%;
}

.empty-state {
  margin: 48px auto 0;
  max-width: 520px;
  padding: 48px 24px;
  text-align: center;
}

.empty-state h3 {
  margin-bottom: 10px;
  font-size: 32px;
}

.empty-state p {
  color: var(--muted);
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-layer.is-open {
  display: grid;
  opacity: 1;
  animation: modalFade 0.22s ease both;
}

.image-lightbox {
  place-items: center;
  padding: 34px;
  background: rgba(0, 0, 0, 0.78);
}

.image-lightbox img {
  max-width: min(1100px, 94vw);
  max-height: 88vh;
  border-radius: 18px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.45);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 22px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.modal-close--dark {
  color: var(--ink);
  border-color: var(--line);
  background: #fff;
}

.detail-modal {
  place-items: center;
  padding: 26px;
  background: rgba(15, 20, 25, 0.58);
  backdrop-filter: blur(10px);
}

.detail-panel {
  position: relative;
  width: min(1080px, 96vw);
  max-height: 90vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 34px;
  overflow: auto;
  padding: 28px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.24);
}

.detail-media {
  min-height: 420px;
  overflow: hidden;
  border-radius: 18px;
  background: #f0ece4;
}

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

.detail-info {
  padding: 18px 10px 10px 0;
}

.detail-info h3 {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: clamp(30px, 4vw, 48px);
  overflow-wrap: anywhere;
}

.detail-price {
  margin-bottom: 24px;
  color: var(--gold);
  font-size: 28px;
  font-weight: 900;
}

.detail-info dl {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px 18px;
  margin: 0 0 28px;
  font-size: 14px;
}

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

.detail-info dd {
  margin: 0;
  overflow-wrap: anywhere;
}

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

.copy-status {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--gold);
  font-weight: 800;
}

body.modal-open {
  overflow: hidden;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

  .hero__stats {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .field--search,
  .price-range {
    grid-column: span 2;
  }

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

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

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

  .catalog__heading {
    display: block;
  }

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

  .detail-panel {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 18px;
  }

  .detail-media {
    min-height: 320px;
  }
}

@media (max-width: 560px) {
  .hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero__actions,
  .search-pill,
  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

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

  .toolbar {
    position: static;
  }

  .product-top {
    display: block;
  }

  .price {
    display: block;
    margin-top: 8px;
  }

  .detail-modal {
    padding: 12px;
  }

  .detail-panel {
    width: 100%;
    max-height: 94vh;
    border-radius: 18px;
  }

  .detail-info dl {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
