/* checkout4 — оформление заказа */

body.checkout4 {
  background:
    radial-gradient(ellipse 70% 45% at 90% -5%, rgba(200, 16, 46, 0.1), transparent 55%),
    radial-gradient(ellipse 55% 40% at 0% 20%, rgba(245, 197, 24, 0.08), transparent 50%),
    linear-gradient(180deg, #faf7f2 0%, #f3eee6 45%, #ebe3d6 100%);
}

.c4-main {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 1.5rem var(--pad) 3rem;
}

.c4-hero {
  margin-bottom: 1.15rem;
}

.c4-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.c4-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-transform: uppercase;
  padding-bottom: 0.08em;
  overflow: visible;
}

.c4-hero > p {
  margin: 0.7rem 0 0;
  max-width: 36rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.5;
}

.c4-notice {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(200, 16, 46, 0.18);
  box-shadow: 0 10px 28px rgba(20, 12, 8, 0.04);
  color: rgba(10, 10, 12, 0.78);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

.c4-notice strong {
  color: var(--red);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.c4-layout {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.75fr);
  gap: 1.25rem 1.4rem;
  align-items: start;
}

.c4-form-wrap,
.c4-summary {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(13, 13, 15, 0.08);
  border-radius: 1.35rem;
  padding: 1.35rem 1.25rem 1.5rem;
  box-shadow: 0 18px 40px rgba(20, 12, 8, 0.06);
}

.c4-form-wrap h2,
.c4-summary h2 {
  margin: 0 0 1.1rem;
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.c4-subhead {
  margin: 0.85rem 0 0.15rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.c4-form {
  display: grid;
  gap: 0.95rem;
}

.c4-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem;
}

.c4-field {
  display: grid;
  gap: 0.4rem;
}

.c4-field > span {
  font-size: 0.86rem;
  font-weight: 700;
  color: rgba(10, 10, 12, 0.7);
}

.c4-field i {
  font-style: normal;
  color: var(--red);
  font-weight: 800;
}

.c4-field em {
  font-style: normal;
  color: rgba(10, 10, 12, 0.42);
  font-weight: 600;
}

.c4-field input,
.c4-field select,
.c4-field textarea,
.c4-date-trigger {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(13, 13, 15, 0.08);
  border-radius: 0.85rem;
  background: #f4efe7;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.c4-field input::placeholder,
.c4-field textarea::placeholder {
  color: rgba(10, 10, 12, 0.38);
}

.c4-field input:focus,
.c4-field select:focus,
.c4-field textarea:focus,
.c4-date-trigger:focus,
.c4-datepicker.is-open .c4-date-trigger {
  border-color: rgba(200, 16, 46, 0.42);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

.c4-datepicker {
  position: relative;
}

.c4-date-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  cursor: pointer;
  font-weight: 700;
  color: rgba(10, 10, 12, 0.85);
}

.c4-date-trigger.is-placeholder {
  color: rgba(10, 10, 12, 0.38);
  font-weight: 600;
}

.c4-date-trigger svg {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  color: var(--red);
}

.c4-date-panel {
  position: absolute;
  left: 0;
  right: auto;
  top: calc(100% + 0.4rem);
  z-index: 20;
  width: min(100%, 300px);
  padding: 0.7rem;
  border-radius: 0.9rem;
  background: #fff;
  border: 1px solid rgba(13, 13, 15, 0.1);
  box-shadow: 0 14px 32px rgba(20, 12, 8, 0.14);
  animation: c4Pop 0.2s var(--ease);
}

@keyframes c4Pop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.c4-date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.c4-date-nav strong {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: capitalize;
}

.c4-date-nav button {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.55rem;
  background: #f4efe7;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(10, 10, 12, 0.75);
}

.c4-date-nav button:hover {
  background: var(--ink);
  color: #fff;
}

.c4-date-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.18rem;
  margin-bottom: 0.3rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(10, 10, 12, 0.4);
}

.c4-date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.2rem;
}

.c4-day {
  aspect-ratio: 1;
  border-radius: 0.55rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(10, 10, 12, 0.82);
  background: transparent;
  min-height: 0;
  padding: 0;
}

.c4-day:not(:disabled):hover {
  background: rgba(200, 16, 46, 0.1);
}

.c4-day:disabled {
  color: rgba(10, 10, 12, 0.22);
  cursor: default;
}

.c4-day.is-muted {
  color: rgba(10, 10, 12, 0.28);
}

.c4-day.is-selected {
  background: var(--red);
  color: #fff;
}

.c4-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1px rgba(200, 16, 46, 0.45);
}

.c4-hint {
  color: rgba(10, 10, 12, 0.48);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}

.c4-policy {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(10, 10, 12, 0.62);
  line-height: 1.45;
}

.c4-policy a {
  color: var(--red);
  text-decoration: underline;
}

.c4-pay-note {
  margin: -0.35rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: rgba(200, 16, 46, 0.08);
  border: 1px solid rgba(200, 16, 46, 0.16);
  font-size: 0.88rem;
  font-weight: 650;
  color: rgba(10, 10, 12, 0.72);
  line-height: 1.45;
}

.pay-online-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: start;
  margin: 0.35rem 0 0.15rem;
  font-size: 0.88rem;
  font-weight: 650;
  color: rgba(10, 10, 12, 0.72);
}

.pay-online-check input {
  margin-top: 0.15rem;
}

.c4-error {
  margin: 0;
  color: var(--red);
  font-weight: 800;
  font-size: 0.9rem;
}

.c4-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0.85rem 1.3rem;
  border-radius: 0.95rem;
  background: linear-gradient(135deg, var(--red-hot), var(--red-deep));
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(200, 16, 46, 0.28);
  transition: transform 0.2s, filter 0.2s;
}

.c4-submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.c4-summary {
  position: sticky;
  top: 6.5rem;
}

.c4-summary-list {
  display: grid;
  gap: 0.7rem;
}

.c4-summary-item {
  display: grid;
  grid-template-columns: 3.4rem 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.45rem;
  border-radius: 0.85rem;
  background: rgba(244, 239, 231, 0.75);
}

.c4-summary-item img {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 0.6rem;
  object-fit: cover;
  object-position: center;
  display: block;
  background: linear-gradient(160deg, #efe6da 0%, #e4d8c8 100%);
}

.c4-summary-item strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.25;
}

.c4-summary-item small {
  color: var(--muted);
  font-weight: 600;
}

.c4-summary-item em {
  font-style: normal;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.c4-summary-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.c4-summary-empty a {
  color: var(--red);
  text-decoration: underline;
}

.c4-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(13, 13, 15, 0.08);
  font-weight: 700;
}

.c4-summary-total strong {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.c4-back-cart {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--red);
  text-decoration: underline;
}

.c4-summary-note {
  margin-top: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 0.85rem;
  background: rgba(10, 10, 12, 0.92);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .c4-layout {
    grid-template-columns: 1fr;
  }

  .c4-summary {
    order: -1;
    position: static;
  }

  .c4-grid-2 {
    grid-template-columns: 1fr;
  }
}
