:root {
  --ink: #30264d;
  --muted: #766d8e;
  --paper: #fff;
  --line: #eadff4;
  --berry: #ff5f8f;
  --berry-dark: #d93670;
  --peach: #fff0f6;
  --lavender: #eeeaff;
  --purple: #6955d9;
  --shadow: 0 16px 40px rgba(86, 54, 124, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 4% 8%, #ffe1ef 0 7%, transparent 22%), radial-gradient(circle at 96% 44%, #e2f8ff 0 6%, transparent 22%), #fffafe;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}
body:has(.order-section:not([hidden])) { padding-bottom: 92px; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 47px 20px 56px;
  color: #fff;
  text-align: center;
  background: linear-gradient(135deg, #6554d9, #9a62d8 55%, #ff719d);
}
.hero::before, .hero::after { position: absolute; content: ""; border-radius: 50%; opacity: .25; }
.hero::before { width: 270px; height: 270px; top: -165px; left: -65px; background: #f5a4ba; }
.hero::after { width: 310px; height: 310px; right: -130px; bottom: -235px; background: #ffe1ac; }
.hero__inner { position: relative; z-index: 1; max-width: 690px; margin: auto; }
.language-switch { position: absolute; z-index: 2; top: 18px; right: 20px; display: flex; gap: 5px; padding: 4px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; background: rgba(39,25,91,.2); }
.language-button { padding: 6px 10px; border: 0; border-radius: 999px; color: #fff; background: transparent; cursor: pointer; font-size: 12px; font-weight: 800; }
.language-button:hover, .language-button.is-active { color: #4f3c9e; background: #fff; }
.eyebrow, .step { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.eyebrow { color: #ffd6e3; }
h1 { margin: 9px 0 11px; font-family: "Trebuchet MS", "Segoe UI", sans-serif; font-size: clamp(31px, 5vw, 48px); line-height: 1.08; letter-spacing: -.04em; }
.hero__text { max-width: 520px; margin: auto; font-size: 17px; line-height: 1.5; color: #eeeafa; }

main { max-width: 1030px; margin: 0 auto; padding: 34px 20px 70px; }
.products, .order-section { scroll-margin-top: 15px; }
.section-heading { margin: 0 auto 21px; text-align: center; }
.section-heading .step { color: var(--berry); }
.section-heading h2 { margin: 5px 0 7px; font-size: clamp(25px, 4vw, 34px); }
.section-heading > p:not(.step) { margin: 0; color: var(--muted); }

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.product-card { display: grid; grid-template-columns: 43% 57%; overflow: hidden; border: 2px solid #fff; border-radius: 28px; background: var(--paper); box-shadow: var(--shadow); }
.product-card > img { width: 100%; height: 100%; min-height: 265px; display: block; object-fit: cover; }
.product-card__body { display: flex; flex-direction: column; padding: 21px; }
.product-card h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 24px; }
.product-card p { margin: 8px 0 11px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.product-card ul { flex: 1; margin: 0; padding-left: 18px; color: #555167; font-size: 13px; line-height: 1.65; }

.button { border: 0; border-radius: 10px; padding: 13px 16px; cursor: pointer; font-weight: 750; transition: transform .18s, background .18s, box-shadow .18s; }
.button:hover { transform: translateY(-2px); }
.button:focus-visible, .choice-card:focus-visible, .asset-button:focus-visible, .color-option:focus-visible, .without-image:focus-visible, .remove-form:focus-visible { outline: 3px solid rgba(217,80,121,.31); outline-offset: 2px; }
.button--primary { color: #fff; background: var(--berry); box-shadow: 0 7px 15px rgba(217,80,121,.25); }
.button--primary:hover { background: var(--berry-dark); }
.product-card .button { width: 100%; margin-top: 15px; }
.button--secondary { color: var(--purple); background: var(--lavender); }

.order-section { margin-top: 48px; padding-bottom: 100px; }
.order-form { margin-bottom: 18px; padding: 23px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.form-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.sheet-label { color: var(--berry); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.remove-form { padding: 3px 0; border: 0; color: #b13f59; background: transparent; cursor: pointer; font-weight: 650; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(235px, .7fr); gap: 28px; align-items: start; }
fieldset { min-width: 0; margin: 0 0 19px; padding: 0; border: 0; }
legend, .field-label { display: block; margin: 0 0 9px; font-size: 14px; font-weight: 750; }
legend > span:first-child, .field-label > span:first-child { width: 21px; height: 21px; display: inline-grid; place-items: center; margin-right: 4px; border-radius: 50%; color: var(--berry-dark); background: var(--peach); font-size: 11px; }
.field-label input { width: 100%; margin-top: 9px; padding: 12px 13px; border: 1px solid #ded9d8; border-radius: 9px; color: var(--ink); background: #fff; outline: none; }
.field-label input:focus { border-color: var(--berry); box-shadow: 0 0 0 3px rgba(217,80,121,.12); }

.choice-grid { display: grid; gap: 9px; }
.choice-grid--types, .choice-grid--quantity { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-card { min-height: 63px; padding: 10px 11px; border: 1px solid #e3dede; border-radius: 10px; color: var(--ink); text-align: left; background: #fff; cursor: pointer; transition: .18s; }
.choice-card:hover { border-color: #d896ab; background: #fffafb; }
.choice-card strong, .choice-card small { display: block; }
.choice-card small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.choice-card.is-selected { border-color: var(--berry); color: var(--berry-dark); background: var(--peach); box-shadow: inset 0 0 0 1px var(--berry), 0 5px 12px rgba(255,95,143,.12); }

.without-image, .without-background { margin: 0 0 9px; padding: 7px 10px; border: 1px solid #dfdada; border-radius: 999px; color: #605b6a; background: #fff; cursor: pointer; font-size: 12px; }
.without-image.is-selected, .without-background.is-selected { border-color: var(--berry); color: var(--berry-dark); background: var(--peach); box-shadow: 0 0 0 2px rgba(255,95,143,.12); }
.asset-gallery { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.asset-button { aspect-ratio: 1; overflow: hidden; padding: 2px; border: 2px solid transparent; border-radius: 8px; background: #f7f3f1; cursor: pointer; transition: transform .18s, border-color .18s, box-shadow .18s; }
.asset-button:hover { transform: translateY(-2px); }
.asset-button img { display: block; width: 100%; height: 100%; object-fit: contain; }
.asset-button--background { aspect-ratio: 1.55; padding: 0; }
.asset-button--background img { object-fit: cover; }
.asset-button.is-selected { border-color: var(--berry); box-shadow: 0 0 0 2px rgba(217,80,121,.18); }
.color-palette { display: flex; flex-wrap: wrap; gap: 9px; }
.color-option { width: 31px; height: 31px; border: 3px solid #fff; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 1px #ddd7d6; }
.color-option.is-selected { box-shadow: 0 0 0 3px var(--berry); }

.preview-panel { position: sticky; top: 14px; padding: 16px; border: 1px solid #eadde1; border-radius: 16px; background: #fff8f4; }
.preview-panel > p { margin: 0 0 10px; color: var(--berry-dark); font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.preview { width: 100%; overflow: hidden; border: 0; border-radius: 12.5% / 50%; background: #fff; box-shadow: 0 4px 12px rgba(77, 49, 67, .08); }
.preview--termo { aspect-ratio: 4 / 1; }
.preview--stationery { aspect-ratio: 4.235 / 1; border-radius: 7.1% / 30%; }
.preview-canvas { display: block; width: 100%; height: 100%; }
.preview-note { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.4; }

.price-summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 8px 14px; margin: 22px auto 0; padding: 16px; border: 1px solid #efd6df; border-radius: 14px; color: #775263; background: #fff5f7; text-align: center; }
.price-summary strong { color: var(--berry-dark); font-family: Georgia, "Times New Roman", serif; font-size: 28px; }
.price-summary small { width: 100%; color: #8b6c78; }
.order-actions { position: fixed; z-index: 20; right: 0; bottom: 0; left: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0; padding: 12px max(20px, calc((100vw - 900px) / 2)); border-top: 1px solid rgba(220,205,235,.9); background: rgba(255,255,255,.92); box-shadow: 0 -8px 28px rgba(69,46,101,.12); backdrop-filter: blur(12px); }
.order-actions .button { flex: 1 1 290px; min-height: 56px; max-width: 410px; border-radius: 16px; font-size: 16px; }

@media (max-width: 850px) {
  .product-card { grid-template-columns: 38% 62%; }
  .product-card > img { min-height: 255px; }
}
@media (max-width: 690px) {
  body:has(.order-section:not([hidden])) { padding-bottom: 154px; }
  body { overflow-x: hidden; }
  .hero { padding: 74px 17px 38px; }
  .language-switch { top: 12px; right: 12px; }
  .language-button { min-height: 36px; padding: 7px 11px; }
  main { padding: 26px 13px 64px; }
  .section-heading { margin-bottom: 17px; }
  .section-heading h2 { line-height: 1.12; }
  .product-grid { grid-template-columns: 1fr; gap: 14px; }
  .product-card { grid-template-columns: 34% 66%; border-radius: 22px; }
  .product-card > img { min-height: 215px; }
  .product-card__body, .order-form { padding: 15px; }
  .product-card h3 { font-size: 21px; }
  .product-card p { font-size: 13px; }
  .product-card ul { padding-left: 16px; font-size: 12px; }
  .form-layout { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .order-section { padding-bottom: 165px; }
  .form-controls { order: 2; }
  .preview-panel { order: 1; position: sticky; z-index: 5; top: 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; align-items: center; margin: 0 -3px 18px; padding: 10px 12px; border-radius: 18px; box-shadow: 0 8px 22px rgba(69,46,101,.14); }
  .preview-panel > p { grid-column: 1 / -1; margin-bottom: 7px; }
  .preview { min-width: 0; }
  .preview-note { max-width: 128px; margin-top: 0; }
  fieldset { margin-bottom: 17px; }
  legend, .field-label { font-size: 13px; }
  .field-label input { min-height: 48px; margin-top: 8px; padding: 12px; border-radius: 12px; font-size: 16px; }
  .choice-grid { gap: 8px; }
  .choice-card { min-height: 62px; padding: 10px; border-radius: 13px; }
  .without-image, .without-background { min-height: 40px; padding: 8px 12px; }
  .asset-gallery { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
  .asset-button { min-width: 0; border-radius: 10px; }
  .background-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .color-palette { gap: 10px; }
  .color-option { width: 42px; height: 42px; }
  .order-actions { padding: 10px 13px calc(10px + env(safe-area-inset-bottom)); }
  .order-actions .button { width: 100%; max-width: none; min-height: 58px; border-radius: 15px; font-size: 16px; }
}
@media (max-width: 480px) {
  .product-card { grid-template-columns: 1fr; }
  .product-card > img { height: 150px; min-height: 0; }
  .product-card__body { padding: 15px; }
  .hero { padding-top: 73px; }
  .preview-panel { grid-template-columns: 1fr; }
  .preview-note { max-width: none; margin-top: 7px; }
  .asset-gallery { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
