:root {
  --paper: #fff8ec;
  --paper-deep: #f3dfc5;
  --ink: #2c1d18;
  --muted: #7b665b;
  --thread-red: #bd4d3d;
  --thread-blue: #426f95;
  --thread-green: #6f8d55;
  --thread-gold: #e3aa4d;
  --cream: rgba(255, 252, 245, 0.82);
  --line: rgba(44, 29, 24, 0.13);
  --shadow: 0 24px 70px rgba(82, 48, 31, 0.16);
  font-family: "Manrope", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 12%, rgba(189, 77, 61, 0.18), transparent 24rem),
    radial-gradient(circle at 84% 10%, rgba(66, 111, 149, 0.16), transparent 26rem),
    linear-gradient(135deg, #fff7ea 0%, #f4e1c7 46%, #fff4e1 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(44, 29, 24, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 29, 24, 0.055) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0.84) 48%, transparent 100%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.24) 0 2px, transparent 2px 9px);
  opacity: 0.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  width: 100%;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1200px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.76);
  box-shadow: 0 18px 60px rgba(74, 46, 29, 0.11);
  backdrop-filter: blur(22px);
}

.brand,
.nav,
.header-actions,
.hero-actions,
.thread-palette,
.ribbon,
.section-heading,
.scheme-bottom {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  padding-right: 18px;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.brand-text small {
  max-width: 230px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px dashed rgba(255, 248, 236, 0.7);
  border-radius: 50%;
  color: #fff8ec;
  background:
    radial-gradient(circle, var(--thread-red) 0 38%, transparent 39%),
    var(--ink);
  box-shadow: inset 0 0 0 7px var(--ink);
  font-family: "Playfair Display", Georgia, serif;
}

.nav {
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav a:hover {
  color: var(--ink);
  background: var(--paper);
}

.header-actions {
  gap: 8px;
}

.ghost-button,
.cart-button,
.scheme-bottom button,
.club button {
  border: 0;
  border-radius: 999px;
  font-weight: 900;
}

.ghost-button,
.cart-button {
  min-height: 44px;
  padding: 0 16px;
}

.ghost-button {
  color: var(--ink);
  background: var(--paper);
}

.cart-button {
  color: #fff8ec;
  background: var(--ink);
}

.cart-button span {
  display: inline-grid;
  width: 22px;
  height: 22px;
  margin-left: 8px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--thread-gold);
}

main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(440px, 1.1fr);
  gap: 54px;
  align-items: center;
  min-height: calc(100vh - 96px);
  padding: 70px 0 42px;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 12px;
  border: 1px dashed rgba(44, 29, 24, 0.28);
  border-radius: 999px;
  color: var(--thread-red);
  background: rgba(255, 252, 245, 0.62);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
}

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.hero-text {
  max-width: 620px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.72;
}

.hero-actions {
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
}

.primary-link {
  color: #fff8ec;
  background: var(--thread-red);
  box-shadow: 0 16px 36px rgba(189, 77, 61, 0.28);
}

.secondary-link {
  border: 1px solid var(--line);
  background: rgba(255, 252, 245, 0.68);
}

.thread-palette {
  gap: 9px;
  width: fit-content;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.66);
  box-shadow: 0 12px 40px rgba(82, 48, 31, 0.09);
}

.thread-palette span {
  width: 30px;
  height: 30px;
  border: 4px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: var(--color);
  box-shadow: inset 0 0 0 2px rgba(44, 29, 24, 0.1);
}

.thread-palette strong {
  padding-left: 6px;
  font-size: 14px;
}

.hero-board {
  position: relative;
  min-height: 650px;
}

.hero-board::before {
  position: absolute;
  inset: 7% 5% 7% 8%;
  content: "";
  border: 1px solid rgba(44, 29, 24, 0.09);
  border-radius: 42px;
  background:
    linear-gradient(rgba(44, 29, 24, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 29, 24, 0.045) 1px, transparent 1px),
    rgba(255, 252, 245, 0.5);
  background-size: 22px 22px;
  transform: rotate(2deg);
}

.pattern-card,
.mini-pattern,
.floating-note {
  position: absolute;
  box-shadow: var(--shadow);
}

.pattern-card,
.mini-pattern {
  overflow: hidden;
  border: 12px solid #fffaf0;
  background: var(--paper);
}

.pattern-card img,
.mini-pattern img,
.scheme-image img,
.kit-card img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s ease;
}

.pattern-card:hover img,
.mini-pattern:hover img,
.scheme-card:hover img,
.kit-card:hover img {
  transform: scale(1.06);
}

.main-pattern {
  inset: 2% 17% 9% 5%;
  border-radius: 48px;
  transform: rotate(-2.5deg);
}

.pattern-label {
  position: absolute;
  right: 20px;
  bottom: 20px;
  max-width: 230px;
  padding: 16px 18px;
  border-radius: 24px;
  color: #fff8ec;
  background: rgba(44, 29, 24, 0.9);
  backdrop-filter: blur(16px);
}

.pattern-label span,
.kit-card span,
.scheme-info span {
  display: block;
  color: var(--thread-gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.pattern-label strong {
  display: block;
  margin-top: 5px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  line-height: 1;
}

.mini-pattern {
  width: 34%;
  height: 31%;
  border-radius: 34px;
}

.mini-pattern.left {
  left: 0;
  bottom: 2%;
  transform: rotate(6deg);
}

.mini-pattern.right {
  right: 0;
  top: 9%;
  transform: rotate(5deg);
}

.floating-note {
  right: 3%;
  bottom: 20%;
  z-index: 3;
  width: 160px;
  padding: 18px;
  border: 1px dashed rgba(44, 29, 24, 0.28);
  border-radius: 28px;
  background: var(--thread-gold);
  transform: rotate(-8deg);
}

.floating-note span {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.floating-note strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 25px;
  line-height: 0.95;
}

.ribbon {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 86px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 34px;
  background: rgba(255, 252, 245, 0.58);
  box-shadow: 0 18px 60px rgba(82, 48, 31, 0.08);
}

.ribbon div {
  flex: 1;
  padding: 20px;
  border-right: 1px dashed var(--line);
}

.ribbon div:last-child {
  border-right: 0;
}

.ribbon strong,
.ribbon span {
  display: block;
}

.ribbon strong {
  margin-bottom: 4px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 34px;
  line-height: 1;
}

.ribbon span {
  color: var(--muted);
  font-size: 14px;
}

.catalog,
.kits,
.process,
.club {
  margin-bottom: 86px;
}

.section-heading {
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.section-heading .eyebrow {
  margin-bottom: 12px;
}

.section-heading h2,
.kits h2,
.club h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(38px, 5.8vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.section-heading a {
  flex: 0 0 auto;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.66);
  font-weight: 900;
}

.catalog-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 30px;
  background: rgba(255, 252, 245, 0.62);
  box-shadow: 0 16px 52px rgba(82, 48, 31, 0.08);
}

.catalog-filters label {
  display: grid;
  gap: 7px;
}

.catalog-filters span {
  color: var(--thread-red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.catalog-filters select,
.filter-reset {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
  font-weight: 800;
}

.catalog-filters select {
  width: 100%;
}

.filter-reset {
  color: #fff8ec;
  background: var(--ink);
}

.catalog-empty {
  margin: 24px 0 0;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 26px;
  color: var(--muted);
  background: rgba(255, 252, 245, 0.62);
  text-align: center;
  font-weight: 800;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.scheme-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 34px;
  background: var(--cream);
  box-shadow: 0 16px 52px rgba(82, 48, 31, 0.09);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.scheme-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.scheme-card:focus-visible {
  outline: 3px solid var(--thread-gold);
  outline-offset: 4px;
}

.scheme-card.is-hidden {
  display: none;
}

.scheme-card.large {
  grid-column: span 2;
}

.scheme-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1.12;
  background:
    linear-gradient(rgba(44, 29, 24, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 29, 24, 0.045) 1px, transparent 1px),
    #ead7bd;
  background-size: 16px 16px;
}

.scheme-card.large .scheme-image {
  aspect-ratio: 1.38 / 1;
}

.badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 9px 12px;
  border-radius: 999px;
  color: #fff8ec;
  background: var(--thread-red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.badge.light {
  color: var(--ink);
  background: var(--thread-gold);
}

.scheme-info {
  padding: 20px;
}

.scheme-info span {
  color: var(--thread-blue);
}

.scheme-info h3 {
  margin: 8px 0 10px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.scheme-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.scheme-apps span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(227, 170, 77, 0.22);
  box-shadow: inset 0 0 0 1px rgba(227, 170, 77, 0.34);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.scheme-apps span::before {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  content: "\2713";
  background: #2f9d55;
  font-size: 11px;
  line-height: 1;
}

.scheme-info p {
  display: none;
  min-height: 0;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.scheme-specs {
  display: grid;
  gap: 8px;
  min-height: 195px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.scheme-specs li {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 10px;
  align-items: start;
  padding: 9px 10px;
  border: 1px dashed rgba(44, 29, 24, 0.14);
  border-radius: 16px;
  background: rgba(255, 248, 236, 0.5);
}

.scheme-specs span {
  color: var(--thread-red);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scheme-specs strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.brand-spec strong {
  display: flex;
  align-items: center;
}

.brand-spec img {
  width: auto;
  max-width: 86px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
}

.scheme-bottom {
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.scheme-bottom button {
  min-width: 46px;
  min-height: 46px;
  padding: 0 16px;
  color: #fff8ec;
  background: var(--ink);
}

.kits {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 24px;
  align-items: stretch;
}

.kit-copy,
.kit-card,
.process article,
.club {
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 40px;
  background: rgba(255, 252, 245, 0.66);
  box-shadow: 0 18px 60px rgba(82, 48, 31, 0.08);
}

.kit-copy {
  padding: 38px;
}

.kit-copy.in-progress {
  grid-column: 1 / -1;
  text-align: center;
}

.kit-copy.in-progress .eyebrow {
  margin-right: auto;
  margin-left: auto;
}

.kit-copy.in-progress h2,
.kit-copy.in-progress p {
  margin-right: auto;
  margin-left: auto;
}

.kit-copy.in-progress p {
  max-width: 680px;
}

.kit-copy p:last-child {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.kit-copy.in-progress p:last-child {
  margin: 22px auto 0;
}

.kit-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  overflow: hidden;
  padding: 18px;
}

.kit-card img {
  min-height: 360px;
  border-radius: 30px;
}

.kit-card div {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
}

.kit-card strong {
  margin: 8px 0 12px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.95;
}

.kit-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.process article {
  padding: 28px;
}

.process span {
  color: var(--thread-red);
  font-weight: 900;
}

.process h3 {
  margin: 15px 0 10px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.process p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.club {
  position: relative;
  overflow: hidden;
  padding: 44px;
  color: #fff8ec;
  background:
    linear-gradient(135deg, rgba(44, 29, 24, 0.93), rgba(44, 29, 24, 0.72)),
    url("images-13-hp-mur/emb-create_235/1-emb-create_235.jpg") center / cover;
}

.club .eyebrow {
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--thread-gold);
  background: rgba(255, 255, 255, 0.1);
}

.club h2 {
  max-width: 860px;
  margin-bottom: 28px;
}

.club-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: fit-content;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.club-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
}

.club-button.tg {
  color: var(--ink);
  background: var(--thread-gold);
}

.club-button.max {
  color: #fff8ec;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.site-footer {
  width: min(1200px, calc(100% - 32px));
  margin: -42px auto 42px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 28px;
  background: rgba(255, 252, 245, 0.62);
  box-shadow: 0 16px 52px rgba(82, 48, 31, 0.08);
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.site-footer a {
  display: inline-flex;
  margin-top: 10px;
  color: var(--thread-red);
  font-weight: 900;
}

.support-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.support-links span {
  color: var(--muted);
  font-weight: 800;
}

.support-links a {
  margin-top: 0;
}

.privacy-main {
  width: min(920px, calc(100% - 32px));
  margin: 70px auto 56px;
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 36px;
  background: rgba(255, 252, 245, 0.72);
  box-shadow: 0 18px 60px rgba(82, 48, 31, 0.1);
}

.privacy-main h1 {
  margin-bottom: 24px;
  font-size: clamp(42px, 7vw, 76px);
}

.privacy-main h2 {
  margin: 30px 0 12px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 30px;
  line-height: 1;
}

.privacy-main p,
.privacy-main li {
  color: var(--muted);
  line-height: 1.72;
}

.privacy-main ul {
  padding-left: 20px;
}

.result-main {
  width: min(920px, calc(100% - 32px));
  margin: 90px auto 56px;
  padding: 46px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 40px;
  background: rgba(255, 252, 245, 0.72);
  box-shadow: 0 18px 60px rgba(82, 48, 31, 0.1);
  text-align: center;
}

.result-main h1 {
  margin-bottom: 18px;
}

.result-main .eyebrow {
  margin-right: auto;
  margin-left: auto;
}

.result-text {
  max-width: 680px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.result-order {
  display: grid;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto 28px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  background: rgba(255, 248, 236, 0.62);
}

.result-order p {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  color: var(--muted);
}

.result-order strong {
  color: var(--ink);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

body.modal-open {
  overflow: hidden;
}

.product-modal[hidden] {
  display: none;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(30, 20, 16, 0.62);
  backdrop-filter: blur(18px);
}

.modal-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 22px;
  width: min(980px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 40px;
  background:
    linear-gradient(rgba(44, 29, 24, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 29, 24, 0.045) 1px, transparent 1px),
    var(--paper);
  background-size: 18px 18px;
  box-shadow: 0 36px 100px rgba(20, 12, 8, 0.36);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff8ec;
  background: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.modal-image {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border: 10px solid #fffaf0;
  border-radius: 30px;
  background: #ead7bd;
  cursor: pointer;
}

.modal-image img {
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.modal-gallery-button {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 248, 236, 0.88);
  box-shadow: 0 12px 30px rgba(20, 12, 8, 0.18);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.modal-gallery-button.prev {
  left: 14px;
}

.modal-gallery-button.next {
  right: 14px;
}

.modal-gallery-button[hidden],
.modal-thumbs[hidden] {
  display: none;
}

.modal-thumbs {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 3;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px;
  border-radius: 18px;
  background: rgba(44, 29, 24, 0.48);
  backdrop-filter: blur(16px);
}

.modal-thumbs button {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 0;
  background: transparent;
  opacity: 0.72;
}

.modal-thumbs button.active {
  border-color: var(--thread-gold);
  opacity: 1;
}

.modal-thumbs img {
  height: 100%;
  object-fit: cover;
}

.modal-content {
  padding: 34px 24px 24px 6px;
}

.modal-meta {
  margin-bottom: 10px;
  color: var(--thread-blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-content h2 {
  margin-bottom: 16px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.modal-subtitle {
  margin: -4px 0 18px;
  padding: 14px 16px;
  border: 1px dashed rgba(44, 29, 24, 0.16);
  border-radius: 20px;
  color: var(--ink);
  background: rgba(227, 170, 77, 0.16);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.55;
}

.modal-content > p:not(.modal-meta):not(.modal-subtitle) {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.modal-specs {
  min-height: auto;
}

.modal-apps {
  margin-bottom: 20px;
}

.modal-apps span {
  color: #fff8ec;
  background: var(--thread-green);
  box-shadow: none;
}

.modal-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
}

.modal-bottom button {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  color: #fff8ec;
  background: var(--thread-red);
  font-weight: 900;
}

@media (max-width: 980px) {
  .site-header {
    position: static;
    flex-wrap: wrap;
    gap: 12px;
    border-radius: 30px;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .hero,
  .kits {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-board {
    min-height: 560px;
  }

  .product-grid,
  .process {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scheme-card.large {
    grid-column: auto;
  }

  .ribbon {
    flex-wrap: wrap;
  }

  .ribbon div {
    flex-basis: calc(50% - 7px);
  }

  .modal-panel {
    grid-template-columns: 1fr;
  }

  .modal-image {
    min-height: 360px;
  }

  .modal-content {
    padding: 4px 8px 12px;
  }
}

@media (max-width: 640px) {
  .site-header,
  main {
    width: min(100% - 20px, 1200px);
  }

  .brand {
    width: 100%;
  }

  .header-actions {
    width: 100%;
  }

  .ghost-button,
  .cart-button {
    flex: 1;
  }

  h1 {
    font-size: clamp(45px, 15vw, 68px);
  }

  .hero {
    gap: 20px;
    padding-top: 42px;
  }

  .hero-board {
    min-height: 430px;
  }

  .pattern-card,
  .mini-pattern {
    border-width: 8px;
  }

  .main-pattern {
    inset: 0 9% 16% 0;
    border-radius: 32px;
  }

  .mini-pattern {
    width: 43%;
    height: 28%;
    border-radius: 24px;
  }

  .floating-note {
    right: 0;
    bottom: 14%;
    width: 134px;
    padding: 14px;
  }

  .ribbon,
  .product-grid,
  .catalog-filters,
  .process,
  .kit-card {
    grid-template-columns: 1fr;
  }

  .ribbon div {
    flex-basis: 100%;
    border-right: 0;
    border-bottom: 1px dashed var(--line);
  }

  .ribbon div:last-child {
    border-bottom: 0;
  }

  .section-heading {
    display: block;
  }

  .section-heading a {
    display: inline-flex;
    margin-top: 16px;
  }

  .scheme-info p {
    min-height: auto;
  }

  .kit-copy,
  .club {
    padding: 28px;
  }

  .kit-card img {
    min-height: 260px;
  }

  .club-actions {
    align-items: stretch;
    flex-direction: column;
    border-radius: 26px;
  }

  .club-button {
    min-height: 50px;
  }

  .product-modal {
    padding: 10px;
  }

  .modal-panel {
    max-height: calc(100vh - 20px);
    border-radius: 28px;
    padding: 12px;
  }

  .modal-image {
    min-height: 280px;
    border-width: 7px;
    border-radius: 22px;
  }

  .modal-gallery-button {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }

  .modal-thumbs {
    right: 8px;
    bottom: 8px;
    left: 8px;
  }

  .modal-thumbs button {
    flex-basis: 50px;
    width: 50px;
    height: 50px;
  }

  .modal-content h2 {
    font-size: clamp(34px, 12vw, 48px);
  }

  .modal-bottom {
    align-items: stretch;
    flex-direction: column;
  }
}
