:root {
  color-scheme: light;
  --ink: #2f2723;
  --muted: #756d66;
  --line: #e7e0d8;
  --paper: #fbf8f2;
  --surface: #ffffff;
  --aqua: #e4f0ee;
  --teal: #2d8b84;
  --deep-teal: #12645f;
  --rose: #e8a5ad;
  --peach: #edc9ac;
  --cream: #fffdf9;
  --coral: #bd544b;
  --shell: #f6eadc;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 190px 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 82px;
  padding: 14px 34px;
  background: rgba(251, 248, 242, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand img {
  width: 168px;
  height: 54px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: 26px;
  flex-wrap: wrap;
}

.top-nav a,
.header-instagram,
.text-button {
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
}

.header-instagram {
  border: 1px solid var(--ink);
  padding: 11px 16px;
  background: rgba(255, 248, 236, 0.52);
}

.top-nav a {
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}

.top-nav a.active {
  color: var(--deep-teal);
  border-bottom-color: var(--deep-teal);
}

.hero {
  position: relative;
  min-height: calc(100svh - 82px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--aqua);
}

.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(217, 238, 235, 0.04), rgba(244, 222, 200, 0.26)),
    linear-gradient(90deg, rgba(49, 36, 31, 0.08), rgba(49, 36, 31, 0.2));
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 40px));
  margin: 0 auto 10vh;
  text-align: center;
}

.hero-copy img {
  width: min(760px, 82vw);
  margin: 0 auto;
  filter: drop-shadow(0 2px 20px rgba(0, 0, 0, 0.28));
}

.catalog-shell {
  padding: 34px 28px 80px;
}

.filter-block p,
.catalog-heading p,
.product-meta small,
.dialog-info p,
dt,
.filter-group p,
.filter-panel-heading p {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.filter-row button,
.text-button {
  min-height: 36px;
  border: 1px solid rgba(49, 36, 31, 0.22);
  background: rgba(255, 248, 236, 0.62);
  padding: 0 12px;
  cursor: pointer;
}

.filter-row button.active {
  color: #fff;
  background: var(--deep-teal);
  border-color: var(--deep-teal);
}

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

.catalog-heading h2 {
  margin: 2px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 44px;
  font-weight: 400;
}

.filter-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 12;
  min-height: 46px;
  border: 1px solid var(--deep-teal);
  background: var(--deep-teal);
  color: #fff;
  padding: 0 18px;
  text-transform: uppercase;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(47, 39, 35, 0.18);
}

.filter-panel {
  position: fixed;
  inset: 0;
  z-index: 13;
  display: grid;
  align-items: end;
  background: rgba(47, 39, 35, 0.28);
}

.filter-panel[hidden] {
  display: none;
}

.filter-panel-card {
  width: min(520px, calc(100% - 24px));
  margin: 0 auto 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 22px;
  box-shadow: 0 16px 50px rgba(47, 39, 35, 0.2);
}

.filter-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.filter-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.filter-group {
  display: grid;
  gap: 2px;
  margin-bottom: 20px;
}

.filter-clear {
  width: 100%;
  margin-top: 2px;
}

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

.product-card button {
  display: grid;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.image-wrap {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #fff;
}

.image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 300ms ease;
}

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

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  padding: 10px 0 0;
  font-size: 13px;
}

.product-meta span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.price-inline,
.price-block {
  display: grid;
  justify-items: end;
  gap: 3px;
  white-space: nowrap;
}

.price-block {
  justify-items: start;
  gap: 7px;
}

.price-old {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.price-sale {
  color: var(--coral);
  font-weight: 700;
}

.discount-badge {
  width: fit-content;
  border: 1px solid #b62920;
  border-color: var(--coral);
  color: var(--coral);
  padding: 3px 6px;
  text-transform: uppercase;
  font-size: 10px;
  line-height: 1;
}

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

.product-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100svh - 28px);
  padding: 0;
  border: 0;
  background: var(--surface);
}

.product-dialog::backdrop {
  background: rgba(49, 36, 31, 0.42);
}

.dialog-close {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 1;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.dialog-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  min-height: 620px;
}

.dialog-gallery {
  display: grid;
  align-content: start;
  gap: 24px;
  background: var(--surface);
  padding: 34px;
  overflow: auto;
}

.selected-variant,
.print-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.selected-variant.single-image,
.print-images.single-image {
  grid-template-columns: 1fr;
  background: var(--surface);
}

.selected-variant img,
.print-images img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: contain;
  background: #fff;
}

.print-variants {
  display: grid;
  gap: 18px;
  padding-top: 8px;
}

.print-variants h5,
.print-group p {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--muted);
}

.print-group {
  display: grid;
  gap: 10px;
}

.dialog-info {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 54px 42px;
}

.product-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
}

.dialog-info h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 50px;
  font-weight: 400;
  line-height: 1;
}

.dialog-info h4 {
  margin: -8px 0 8px;
  font-size: 16px;
  font-weight: 400;
}

.price {
  font-size: 22px;
}

.product-head .price {
  padding-top: 4px;
}

.product-head .price-block {
  justify-items: end;
}

.price .price-old {
  font-size: 16px;
}

.price .discount-badge {
  margin-top: 2px;
}

.color-selector {
  display: grid;
  gap: 14px;
}

.quick-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, auto);
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}

.size-block {
  display: grid;
  align-content: start;
  gap: 10px;
}

.size-block p,
.benefit {
  margin: 0;
}

.size-block strong {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.35;
}

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

.swatch-row button {
  width: 46px;
  height: 58px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  padding: 2px;
}

.swatch-row img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.swatch-row button.active {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.dialog-info .benefit {
  color: var(--ink);
  text-transform: none;
  font-size: 16px;
  line-height: 1.45;
}

.instagram-cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  color: #fff;
  background: var(--teal);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 12px;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 130px 1fr;
    gap: 10px 14px;
    padding: 12px 16px;
  }

  .top-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: center;
    gap: 10px 18px;
    overflow: visible;
    padding-bottom: 0;
  }

  .header-instagram {
    justify-self: end;
  }

  .catalog-shell {
    padding: 26px 16px 60px;
  }

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

  .dialog-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .dialog-info {
    order: -1;
  }

  .dialog-gallery {
    padding: 0 18px 26px;
    gap: 12px;
  }

  .selected-variant,
  .print-images {
    background: transparent;
  }

  .selected-variant img,
  .print-images img {
    min-height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
  }

  .dialog-info {
    gap: 14px;
    padding: 28px 22px 22px;
  }

  .dialog-info h3 {
    font-size: 42px;
  }

  .dialog-info h4 {
    margin: -4px 0 2px;
  }

  .color-selector {
    gap: 10px;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 62px;
  }

  .brand img {
    width: 118px;
  }

  .top-nav a,
  .header-instagram {
    font-size: 11px;
  }

  .header-instagram {
    padding: 9px 12px;
  }

  .hero {
    min-height: 72svh;
  }

  .catalog-heading {
    align-items: start;
    margin-bottom: 18px;
  }

  .catalog-heading h2 {
    font-size: 34px;
  }

  .product-meta {
    display: grid;
    font-size: 12px;
    gap: 8px;
  }

  .price-inline {
    justify-items: start;
  }

  .product-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100svh - 16px);
  }

  .dialog-close {
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
  }

  .dialog-info {
    padding: 24px 18px 18px;
  }

  .product-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .dialog-info h3 {
    font-size: 36px;
  }

  .dialog-info h4 {
    font-size: 15px;
  }

  .price {
    font-size: 18px;
  }

  .swatch-row button {
    width: 38px;
    height: 48px;
  }

  .quick-details {
    grid-template-columns: minmax(0, 1fr) minmax(92px, auto);
    gap: 12px;
    padding-top: 14px;
  }

  .size-block strong {
    font-size: 16px;
  }

  .benefit {
    font-size: 15px;
  }

  .instagram-cta {
    min-height: 44px;
  }
}
