:root {
  --ink: #241812;
  --paper: #fffaf2;
  --cream: #f2eadc;
  --soft: #766457;
  --wine: #742132;
  --wine-dark: #43131d;
  --gold: #c89d5a;
  --moss: #26372d;
  --shadow: 0 30px 90px rgba(35, 21, 14, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(200, 157, 90, 0.18), transparent 28%),
    linear-gradient(135deg, #20130f, #3a251c 42%, #110d0b);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

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

.configurator-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(460px, 0.97fr);
  min-height: 100vh;
}

.configurator-panel {
  padding: clamp(22px, 4vw, 54px);
  background:
    linear-gradient(90deg, rgba(255, 250, 242, 0.98), rgba(255, 250, 242, 0.94)),
    url("assets/zestawy-prezentowe.jpg") center/cover;
}

.configurator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(54px, 9vw, 96px);
}

.configurator-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(36, 24, 18, 0.18);
  color: var(--wine);
}

.brand-mark svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.configurator-brand strong,
.configurator-brand small {
  display: block;
}

.configurator-brand strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 27px;
  line-height: 0.9;
}

.configurator-brand small {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.quiet-link {
  color: var(--soft);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.quiet-link:hover {
  color: var(--wine);
}

.configurator-intro {
  max-width: 760px;
}

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

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

h1 {
  margin-bottom: 18px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(58px, 9vw, 118px);
  line-height: 0.86;
  letter-spacing: 0;
}

.configurator-intro p:not(.eyebrow) {
  max-width: 680px;
  color: var(--soft);
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.5;
}

.configuration-form {
  display: grid;
  gap: 18px;
  max-width: 900px;
  margin-top: clamp(36px, 6vw, 68px);
}

.honeypot {
  display: none;
}

.step-block {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(36, 24, 18, 0.12);
  background: rgba(255, 250, 242, 0.72);
  box-shadow: 0 16px 50px rgba(36, 24, 18, 0.08);
}

.step-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 20px;
}

.step-heading > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(116, 33, 50, 0.24);
  color: var(--wine);
  font-size: 12px;
  font-weight: 900;
}

.step-heading h2 {
  margin-bottom: 4px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 0.95;
}

.step-heading p {
  margin: 0;
  color: var(--soft);
  line-height: 1.5;
}

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

.choice-grid.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.choice-card,
.packaging-swatch,
.add-on {
  border: 1px solid rgba(36, 24, 18, 0.14);
  background: rgba(255, 255, 255, 0.54);
  color: var(--ink);
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.choice-card {
  min-height: 118px;
  padding: 16px;
  text-align: left;
}

.choice-card strong,
.choice-card small {
  display: block;
}

.choice-card strong {
  margin-bottom: 10px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 27px;
  line-height: 1;
}

.choice-card small {
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.choice-card:hover,
.packaging-swatch:hover,
.add-on:hover {
  transform: translateY(-2px);
  border-color: rgba(116, 33, 50, 0.34);
}

.choice-card.is-selected,
.packaging-swatch.is-selected,
.add-on.is-selected {
  border-color: var(--wine);
  background: #fff7ea;
  box-shadow: inset 0 0 0 1px var(--wine), 0 18px 42px rgba(116, 33, 50, 0.13);
}

.budget-control {
  padding: clamp(18px, 3vw, 28px);
  background: linear-gradient(135deg, #fffdf8, #f1e4cf);
}

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

.budget-topline span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.budget-topline strong {
  color: var(--wine);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(46px, 6vw, 78px);
  line-height: 0.85;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--wine);
}

.budget-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
}

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

.add-on {
  display: grid;
  place-items: center;
  min-height: 58px;
  padding: 10px;
  font-size: 13px;
  font-weight: 900;
}

.add-on input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

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

.packaging-swatch {
  display: grid;
  gap: 12px;
  padding: 14px;
  text-align: left;
}

.swatch {
  display: block;
  height: 58px;
  border: 1px solid rgba(36, 24, 18, 0.12);
}

.swatch.kraft {
  background: linear-gradient(135deg, #c59b63, #e2c694);
}

.swatch.dark {
  background: linear-gradient(135deg, #1b1513, #633040);
}

.swatch.holiday {
  background: linear-gradient(135deg, #183629, #8d2432 55%, #c99a55);
}

.swatch.bright {
  background: linear-gradient(135deg, #fbf5ea, #d9c6a6);
}

.packaging-swatch strong {
  font-size: 13px;
}

.detail-fields {
  display: grid;
  gap: 12px;
}

.detail-fields label,
.detail-fields span {
  display: grid;
  gap: 8px;
}

.detail-fields span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-fields input,
.detail-fields textarea {
  width: 100%;
  border: 1px solid rgba(36, 24, 18, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 14px;
}

.detail-fields input:focus,
.detail-fields textarea:focus {
  outline: 0;
  border-color: var(--wine);
  box-shadow: 0 0 0 4px rgba(116, 33, 50, 0.1);
}

.submit-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
  padding: clamp(22px, 3vw, 34px);
  background: var(--ink);
  color: var(--paper);
}

.submit-panel p {
  max-width: 760px;
  margin-bottom: 4px;
  color: rgba(255, 250, 242, 0.76);
  line-height: 1.6;
}

.submit-button {
  min-height: 58px;
  width: min(100%, 360px);
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  transition: transform 180ms ease, filter 180ms ease;
}

.submit-button:hover {
  filter: brightness(1.04);
  transform: translateY(-2px);
}

.form-status {
  color: rgba(255, 250, 242, 0.82);
  font-weight: 800;
}

.preview-panel {
  min-height: 100vh;
  padding: clamp(20px, 4vw, 54px);
  background:
    linear-gradient(180deg, rgba(18, 12, 10, 0.42), rgba(18, 12, 10, 0.92)),
    url("assets/wejscie-o-miejscu.png") center/cover;
  color: var(--paper);
}

.preview-sticky {
  position: sticky;
  top: 28px;
  display: grid;
  gap: 22px;
}

.preview-top h2 {
  margin-bottom: 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(42px, 5vw, 76px);
  line-height: 0.9;
}

.preview-top p:not(.eyebrow) {
  color: rgba(255, 250, 242, 0.72);
  line-height: 1.5;
}

.gift-stage {
  position: relative;
  min-height: min(62vh, 640px);
  overflow: hidden;
  border: 1px solid rgba(255, 250, 242, 0.14);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 250, 242, 0.18), transparent 34%),
    linear-gradient(160deg, rgba(255, 250, 242, 0.12), rgba(36, 24, 18, 0.28));
  box-shadow: var(--shadow);
}

.ambient {
  position: absolute;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0.44;
}

.ambient-one {
  width: 180px;
  height: 180px;
  left: 8%;
  top: 14%;
  background: var(--gold);
}

.ambient-two {
  width: 220px;
  height: 220px;
  right: 5%;
  bottom: 5%;
  background: var(--wine);
}

.gift-box {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: min(78%, 560px);
  height: min(70%, 450px);
  transform: translateX(-50%);
}

.box-back,
.box-front,
.box-fill,
.ribbon {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.box-back {
  bottom: 17%;
  width: 88%;
  height: 48%;
  background: linear-gradient(135deg, #d9b270, #a7763e);
  clip-path: polygon(0 26%, 100% 0, 95% 100%, 5% 100%);
}

.box-fill {
  bottom: 22%;
  width: 80%;
  height: 34%;
  background:
    repeating-linear-gradient(135deg, rgba(255, 250, 242, 0.35) 0 8px, transparent 8px 18px),
    rgba(255, 250, 242, 0.14);
  clip-path: polygon(0 20%, 100% 0, 94% 100%, 6% 100%);
}

.box-front {
  bottom: 0;
  width: 96%;
  height: 42%;
  background: linear-gradient(160deg, #c99a55, #8c5d31);
  clip-path: polygon(5% 0, 96% 8%, 88% 100%, 0 90%);
  box-shadow: 0 -18px 32px rgba(20, 12, 9, 0.18) inset;
}

.ribbon {
  bottom: 0;
  width: 13%;
  height: 43%;
  background: linear-gradient(180deg, rgba(116, 33, 50, 0.88), rgba(67, 19, 29, 0.95));
  clip-path: polygon(15% 0, 100% 9%, 78% 100%, 0 91%);
}

.gift-stage[data-packaging-theme="dark"] .box-back,
.gift-stage[data-packaging-theme="dark"] .box-front {
  background: linear-gradient(145deg, #191412, #5b2937);
}

.gift-stage[data-packaging-theme="holiday"] .box-back,
.gift-stage[data-packaging-theme="holiday"] .box-front {
  background: linear-gradient(145deg, #183629, #7b2430);
}

.gift-stage[data-packaging-theme="bright"] .box-back,
.gift-stage[data-packaging-theme="bright"] .box-front {
  background: linear-gradient(145deg, #f8efe1, #c9ae82);
}

.gift-item {
  position: absolute;
  z-index: 2;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 360ms ease, transform 360ms ease, filter 360ms ease;
  filter: drop-shadow(0 20px 22px rgba(0, 0, 0, 0.26));
}

.gift-item.is-hidden {
  opacity: 0;
  transform: translateY(28px) scale(0.9);
  pointer-events: none;
}

.bottle {
  left: 38%;
  bottom: 30%;
  width: 82px;
  height: 260px;
  border-radius: 35px 35px 13px 13px;
  background: linear-gradient(90deg, #141714, #38503c 48%, #121311);
}

.bottle::before {
  content: "";
  position: absolute;
  left: 23px;
  top: -70px;
  width: 36px;
  height: 92px;
  border-radius: 14px 14px 4px 4px;
  background: linear-gradient(90deg, #151715, #314335, #0f100f);
}

.bottle-neck {
  position: absolute;
  left: 21px;
  top: -54px;
  width: 40px;
  height: 18px;
  background: var(--gold);
}

.bottle-label {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 58px;
  display: grid;
  place-items: center;
  height: 78px;
  background: #fbf3e2;
  color: var(--wine);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.coffee {
  left: 17%;
  bottom: 24%;
  width: 88px;
  height: 134px;
  border-radius: 12px 12px 8px 8px;
  background: linear-gradient(145deg, #2e1a14, #7a4b33);
}

.coffee span {
  position: absolute;
  inset: 13px 16px auto;
  height: 38px;
  background: #f5e6cf;
}

.coffee strong,
.tea strong,
.regional strong,
.chocolate strong {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  color: #fff8ea;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tea {
  right: 17%;
  bottom: 23%;
  width: 96px;
  height: 118px;
  border-radius: 50% 50% 13px 13px;
  background: linear-gradient(145deg, #20382e, #7e9b72);
}

.tea span {
  position: absolute;
  left: 16px;
  top: 18px;
  width: 64px;
  height: 24px;
  background: #f7ecd9;
}

.chocolate {
  left: 58%;
  bottom: 20%;
  width: 126px;
  height: 60px;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 31%, rgba(255, 255, 255, 0.14) 31% 34%, transparent 34%),
    linear-gradient(145deg, #3a1711, #8a3d2d);
  transform: rotate(-7deg);
}

.honey,
.jam {
  width: 62px;
  height: 86px;
  border-radius: 18px 18px 12px 12px;
}

.honey {
  left: 25%;
  bottom: 18%;
  background: linear-gradient(180deg, #f7dc78 0 18%, #c8752d 18% 100%);
}

.jam {
  right: 29%;
  bottom: 18%;
  background: linear-gradient(180deg, #2b1c15 0 18%, #842737 18% 100%);
}

.pistachios {
  right: 11%;
  bottom: 17%;
  display: flex;
  gap: 6px;
}

.pistachios span {
  width: 32px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(145deg, #d5c38f, #667747);
}

.candle {
  left: 12%;
  bottom: 17%;
  width: 56px;
  height: 92px;
  border-radius: 12px 12px 7px 7px;
  background: linear-gradient(145deg, #f8f0dd, #c9a873);
}

.candle span {
  position: absolute;
  left: 23px;
  top: -18px;
  width: 12px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  background: var(--gold);
  transform: rotate(45deg);
}

.regional {
  left: 46%;
  bottom: 14%;
  width: 102px;
  height: 76px;
  border-radius: 8px;
  background: linear-gradient(145deg, #efe4c9, #9b7441);
  transform: rotate(8deg);
}

.preview-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 250, 242, 0.14);
  background: rgba(255, 250, 242, 0.14);
}

.preview-summary div {
  min-height: 92px;
  padding: 16px;
  background: rgba(20, 12, 9, 0.54);
}

.preview-summary span,
.preview-summary strong {
  display: block;
}

.preview-summary span {
  margin-bottom: 8px;
  color: rgba(255, 250, 242, 0.58);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.preview-summary strong {
  color: var(--paper);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px;
  line-height: 1;
}

@media (max-width: 1180px) {
  .configurator-shell {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    order: -1;
    min-height: auto;
  }

  .preview-sticky {
    position: static;
  }

  .gift-stage {
    min-height: 560px;
  }
}

@media (max-width: 760px) {
  .configurator-panel,
  .preview-panel {
    padding: 18px;
  }

  .configurator-header {
    align-items: flex-start;
    margin-bottom: 44px;
  }

  .quiet-link {
    font-size: 11px;
  }

  h1 {
    font-size: clamp(50px, 16vw, 78px);
  }

  .choice-grid,
  .choice-grid.compact,
  .add-on-grid,
  .packaging-row,
  .preview-summary {
    grid-template-columns: 1fr;
  }

  .choice-card {
    min-height: 96px;
  }

  .gift-stage {
    min-height: 480px;
  }

  .gift-box {
    width: 92%;
    height: 390px;
  }

  .bottle {
    left: 38%;
    width: 68px;
    height: 218px;
  }

  .bottle::before {
    left: 19px;
    width: 30px;
    height: 74px;
  }

  .bottle-neck {
    left: 17px;
    width: 34px;
  }

  .coffee {
    left: 8%;
  }

  .tea {
    right: 8%;
  }
}
