:root {
  --yellow: #f9b004;
  --yellow-soft: #fff3cc;
  --blue: #138eff;
  --blue-dark: #0876dc;
  --red: #f20934;
  --brown: #2b0d0d;
  --brown-soft: #6f5752;
  --paper: #fff8ea;
  --surface: #ffffff;
  --line: #ead7bd;
  --shadow: 0 18px 45px rgba(43, 13, 13, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

.form-trap {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--brown);
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.page-shell {
  min-height: 100vh;
}

.constructor-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  align-items: center;
  gap: 48px;
  width: min(100%, 1400px);
  margin: 0 auto;
  padding: 54px 16px 34px;
}

.hero-copy h1 {
  margin: 0;
  max-width: 760px;
  color: var(--brown);
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-copy h1::after {
  content: "";
  display: block;
  width: min(100%, 360px);
  height: 12px;
  margin-top: 22px;
  background: repeating-linear-gradient(90deg, var(--yellow) 0 28px, transparent 28px 42px);
  border-radius: 999px;
}

.hero-copy p {
  max-width: 650px;
  margin: 26px 0 0;
  color: var(--brown);
  font-size: clamp(18px, 2.1vw, 26px);
  line-height: 1.25;
}

.hero-media {
  position: relative;
  min-height: 360px;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 14% 2% 6% 10%;
  background: var(--yellow);
  border-radius: 50%;
  box-shadow: 12px 14px 0 var(--blue);
}

.hero-media img {
  position: relative;
  z-index: 1;
  width: min(100%, 530px);
  margin-left: auto;
  object-fit: contain;
}

.constructor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: start;
  gap: 28px;
  width: min(100%, 1400px);
  margin: 0 auto;
  padding: 24px 16px 72px;
}

.builder-column {
  display: grid;
  gap: 28px;
}

.section-block {
  padding: 26px;
  background: var(--surface);
  border: 1px solid rgba(234, 215, 189, 0.8);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(43, 13, 13, 0.08);
}

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

.section-heading h2,
.summary-panel h2,
.order-form h2 {
  margin: 0;
  color: var(--brown);
  font-size: clamp(24px, 2.6vw, 40px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: 0;
}

.section-heading span {
  max-width: 300px;
  color: var(--brown-soft);
  font-size: 14px;
  text-align: right;
}

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

.egg-card {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  min-height: 164px;
  gap: 14px;
  padding: 18px;
  background: var(--yellow-soft);
  border: 2px solid transparent;
  border-radius: var(--radius);
  color: var(--brown);
  text-align: left;
  cursor: pointer;
}

.egg-card:nth-child(2) {
  background: #ecf6ff;
}

.egg-card:nth-child(3) {
  background: #ffe9ee;
}

.egg-card.is-selected {
  border-color: var(--blue);
  box-shadow: 0 10px 24px rgba(19, 142, 255, 0.16);
}

.egg-card img {
  width: 96px;
  height: 126px;
  object-fit: contain;
}

.egg-card strong {
  display: block;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 800;
}

.egg-card span {
  display: block;
  margin-top: 8px;
  color: var(--brown-soft);
  font-size: 14px;
}

.egg-card small {
  display: block;
  margin-top: 8px;
  color: var(--brown-soft);
  font-size: 12px;
  font-weight: 700;
}

.egg-card em {
  display: block;
  margin-top: 12px;
  color: var(--red);
  font-size: 22px;
  font-style: normal;
  font-weight: 800;
}

.segmented,
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.segment-button,
.category-button,
.preset-button {
  min-height: 44px;
  padding: 10px 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--brown);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.segment-button.is-selected,
.category-button.is-selected {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.variant-note {
  margin: 14px 0 0;
  padding: 14px 16px;
  background: #fff8ea;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--brown);
  font-weight: 700;
}

.reset-button {
  min-height: 40px;
  width: 100%;
  margin: 12px 0 0;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--brown);
  font-weight: 800;
  cursor: pointer;
}

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

.preset-button {
  display: block;
  min-height: 112px;
  padding: 16px;
  text-align: left;
}

.preset-button strong {
  display: block;
  font-size: 17px;
  line-height: 1.15;
}

.preset-button span {
  display: block;
  margin-top: 8px;
  color: var(--brown-soft);
  font-size: 13px;
  font-weight: 400;
}

.category-tabs {
  margin-bottom: 18px;
}

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

.filling-card {
  display: flex;
  flex-direction: column;
  min-height: 430px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

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

.filling-card.is-disabled {
  opacity: 0.48;
}

.filling-image {
  display: grid;
  place-items: center;
  height: 180px;
  background: #fff3cc;
}

.filling-card:nth-child(3n + 2) .filling-image {
  background: #eaf5ff;
}

.filling-card:nth-child(3n + 3) .filling-image {
  background: #ffe9ee;
}

.filling-image img {
  width: 86%;
  height: 150px;
  object-fit: contain;
}

.filling-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.filling-category {
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.filling-body h3 {
  margin: 8px 0 0;
  color: var(--brown);
  font-size: 19px;
  line-height: 1.12;
  font-weight: 800;
}

.filling-body p {
  margin: 10px 0 0;
  color: var(--brown-soft);
  font-size: 14px;
}

.filling-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.filling-meta strong {
  color: var(--red);
  font-size: 22px;
  line-height: 1;
}

.filling-meta span {
  color: var(--brown-soft);
  font-size: 13px;
}

.qty-control {
  display: grid;
  grid-template-columns: 40px 44px 40px;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
}

.qty-control button {
  width: 40px;
  height: 40px;
  background: var(--blue);
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.qty-control button:disabled {
  background: #c8c0b6;
  cursor: not-allowed;
}

.qty-control output {
  display: grid;
  place-items: center;
  width: 44px;
  height: 40px;
  background: #fff8ea;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
}

.summary-panel {
  position: relative;
}

.summary-sticky {
  position: sticky;
  top: 18px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.summary-product {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.summary-product img {
  width: 90px;
  height: 116px;
  object-fit: contain;
}

.summary-product h2 {
  font-size: 26px;
}

.summary-product p {
  margin: 7px 0 0;
  color: var(--brown-soft);
  font-size: 15px;
}

.capacity-box {
  margin-top: 18px;
  padding: 16px;
  background: #fff8ea;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.capacity-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.capacity-top span,
.capacity-top strong {
  font-size: 13px;
}

.capacity-top strong {
  color: var(--blue);
  text-align: right;
}

.capacity-box.is-over .capacity-top strong {
  color: var(--red);
}

.capacity-track {
  height: 12px;
  background: #ead7bd;
  border-radius: 999px;
  overflow: hidden;
}

.capacity-fill {
  width: 0;
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
  transition: width 0.2s ease, background 0.2s ease;
}

.capacity-box.is-over .capacity-fill {
  background: var(--red);
}

.summary-lines {
  display: grid;
  gap: 10px;
  min-height: 42px;
  margin-top: 18px;
}

.summary-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  color: var(--brown);
  font-size: 14px;
}

.summary-line span {
  color: var(--brown-soft);
}

.summary-line button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffe9ee;
  color: var(--red);
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}

.empty-summary {
  color: var(--brown-soft);
  font-size: 14px;
}

.field-label {
  display: block;
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

select,
input,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--brown);
  outline: none;
}

textarea {
  resize: vertical;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(19, 142, 255, 0.14);
}

