.checkout-hero {
  padding: 28px 48px 12px;
}

.checkout-hero__line {
  display: none;
}

.checkout-hero h1 {
  margin: 0;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: clamp(34px, 4.8vw, 56px);
  color: #7b4f2f;
  letter-spacing: .02em;
}

.checkout-hero p {
  max-width: 760px;
  margin: 14px auto 0;
  text-align: center;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.5;
  color: #74553d;
}

.checkout-layout {
  padding: 18px 48px 52px;
}

.checkout-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, .72fr);
  gap: 28px;
  align-items: start;
}

.checkout-card,
.checkout-summary__card {
  border: 1px solid rgba(185, 135, 92, .24);
  border-radius: 34px;
  background: #fff;
  box-shadow: 0 20px 42px rgba(74, 46, 16, .08);
}

.checkout-card {
  padding: 28px 30px 30px;
}

.checkout-section + .checkout-section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(185, 135, 92, .14);
}

.checkout-section__head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.checkout-section__head span {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #d8a170, #bc7a45);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(188, 122, 69, .22);
}

.checkout-section__head h2 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: #7c4f2e;
}

.checkout-section__head p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: #8b6b53;
}

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

.checkout-field {
  display: grid;
  gap: 8px;
}

.checkout-field--full {
  grid-column: 1 / -1;
}

.checkout-field span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9c6a47;
}

.checkout-field input,
.checkout-field textarea {
  width: 100%;
  border: 1px solid rgba(174, 122, 82, .24);
  border-radius: 18px;
  background: rgba(255,255,255,.86);
  padding: 14px 16px;
  font: inherit;
  font-size: 13px;
  color: #5e4028;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.checkout-field input:focus,
.checkout-field textarea:focus {
  border-color: rgba(176, 110, 63, .6);
  box-shadow: 0 0 0 4px rgba(211, 154, 107, .14);
  background: #fff;
}

.checkout-field textarea {
  resize: vertical;
  min-height: 140px;
}

.checkout-field__error {
  min-height: 16px;
  display: block;
  font-size: 12px;
  line-height: 1.35;
  color: #cf4d4d;
  visibility: visible;
}

.checkout-field__error:empty {
  visibility: hidden;
}

.checkout-field input.is-error,
.checkout-field textarea.is-error {
  border-color: rgba(207, 77, 77, .62);
  box-shadow: 0 0 0 4px rgba(207, 77, 77, .08);
  background: #fffafa;
}

.payment-card {
  display: block;
  border: 1px solid rgba(176, 110, 63, .24);
  border-radius: 26px;
  background: #fff;
  padding: 18px 20px;
  cursor: pointer;
  margin-top: 18px;
}

.payment-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-card__body {
  display: flex;
  gap: 16px;
  align-items: center;
}

.payment-card__badge {
  min-width: 98px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-radius: 999px;
  background: #eef7ff;
  color: #003087;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(0, 48, 135, .08);
}

.payment-card__badge span:last-child {
  color: #009cde;
}

.payment-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  color: #5f3f27;
}

.payment-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: #86654e;
}

.checkout-summary__card {
  position: sticky;
  top: 34px;
  padding: 30px 30px 32px;
}

.checkout-summary__top {
  margin-bottom: 18px;
}

.checkout-summary__top p,
.checkout-summary__top strong {
  margin: 0;
}

.checkout-summary__top p {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #603b20;
}

.checkout-details-box {
  padding: 22px 24px;
  border: 1px solid rgba(185, 135, 92, .22);
  border-radius: 24px;
  background: #fff;
}

.checkout-details-box p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #5d412e;
}

.checkout-details-box p + p {
  margin-top: 6px;
}

.checkout-details-box strong {
  color: #3f2718;
}

.checkout-details-box__items {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(185, 135, 92, .18);
}

.checkout-details-box__items > strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.checkout-details-box__items ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.checkout-details-box__items li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: start;
  font-size: 14px;
  line-height: 1.6;
  color: #6a4c35;
}

.checkout-details-box__items li span:first-child {
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkout-summary__items,
.checkout-summary__rows,
.checkout-summary__back {
  display: none;
}

.checkout-summary__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  margin-bottom: 18px;
}

.checkout-summary__total span {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}

.checkout-summary__total strong {
  font-size: 34px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.checkout-summary__total--bar {
  padding: 18px 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, #c8834e, #b06e3f);
  box-shadow: 0 16px 30px rgba(176, 110, 63, .18);
}

.checkout-summary__total-count {
  font-style: normal;
  white-space: nowrap;
}

.checkout-summary__confirm,
.checkout-summary__back {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.checkout-summary__confirm {
  margin-top: 10px;
  background: #93dcec;
  color: #fff;
  box-shadow: 0 16px 30px rgba(147, 220, 236, .3);
}

.checkout-summary__back {
  margin-top: 18px;
  background: linear-gradient(180deg, #f4ecdf, #ead9c4);
  color: #7b4f2f;
}

.mobile-paybar {
  display: none;
}

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

  .checkout-summary__card {
    position: static;
  }
}

@media (max-width: 960px) {
  .checkout-hero.reveal,
  .checkout-form.reveal,
  .checkout-summary.reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .checkout-hero,
  .checkout-layout {
    padding-left: 22px;
    padding-right: 22px;
  }

  .checkout-card,
  .checkout-summary__card {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .checkout-card,
  .checkout-summary__card {
    padding: 0;
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: 148px;
  }

  .checkout-hero {
    padding-top: 20px;
  }

  .checkout-hero h1 {
    font-size: 30px;
  }

  .checkout-hero p {
    font-size: 14px;
    line-height: 1.45;
  }

  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .checkout-section__head {
    gap: 12px;
  }

  .checkout-section__head span {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    flex: 0 0 38px;
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    font-size: 12px;
  }

  .checkout-section__head h2,
  .checkout-summary__top p {
    font-size: 24px;
  }

  .payment-card__body {
    flex-direction: column;
    align-items: flex-start;
  }

  .checkout-summary__total strong {
    font-size: 26px;
    white-space: nowrap;
  }

  .checkout-summary__total span {
    font-size: 12px;
    white-space: nowrap;
  }

  .checkout-summary__total {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .checkout-details-box,
  .checkout-summary__total--bar {
    border-radius: 20px;
  }

  .checkout-details-box__items li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .checkout-summary__confirm {
    display: none;
  }

  .mobile-paybar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(250,247,242,.2), rgba(250,247,242,.96) 26%, rgba(250,247,242,.98));
    backdrop-filter: blur(10px);
    z-index: 1400;
  }

  .mobile-paybar__button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    width: 100%;
    border-radius: 16px;
    background: #93dcec !important;
    color: #fff !important;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow:
      0 14px 28px rgba(147, 220, 236, .28),
      0 0 0 1px rgba(255,255,255,.45);
  }

  .footer {
    margin-bottom: 96px;
  }
}
