.checkout-section {
  padding: 64px 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 248, 240, 0)),
    var(--cream);
}

.checkout-section .container {
  max-width: 1180px;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(320px, 380px);
  gap: 28px;
  align-items: start;
  justify-content: center;
}

.quick-pay-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  gap: 28px;
  align-items: start;
}

.checkout-section .checkout-card,
.checkout-section .checkout-summary,
.checkout-section .order-success {
  min-width: 0;
  background: var(--white);
  border: 1px solid rgba(139, 111, 71, 0.13);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(74, 55, 40, 0.09);
  padding: 28px;
}

.checkout-section .checkout-card h2,
.checkout-section .checkout-summary h3 {
  margin: 0 0 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eadbc9;
  color: var(--dark-brown);
  font-size: 1.35rem;
  line-height: 1.45;
}

.checkout-section .checkout-summary h3 {
  font-size: 1.18rem;
}

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

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

.checkout-section .form-group {
  min-width: 0;
  margin: 0;
}

.checkout-section .form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--dark-brown);
  font-weight: 800;
}

.checkout-section .form-group input,
.checkout-section .form-group select,
.checkout-section .form-group textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #e4d4c1;
  border-radius: 8px;
  background: #fff;
  color: var(--dark-brown);
  font: inherit;
  line-height: 1.6;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.checkout-section .form-group textarea {
  min-height: 112px;
  resize: vertical;
}

.checkout-section .form-group input:focus,
.checkout-section .form-group select:focus,
.checkout-section .form-group textarea:focus {
  border-color: var(--light-brown);
  background: #fffdf9;
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.18);
}

.checkout-section .form-group input::placeholder,
.checkout-section .form-group textarea::placeholder {
  color: #9b8a7b;
}

.checkout-section .manual-city-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 0;
  padding: 9px 11px;
  border: 1px solid #eadbc9;
  border-radius: 8px;
  background: #fffaf3;
  color: #76685d;
  font-size: 0.9rem;
  cursor: pointer;
}

.checkout-section .manual-city-toggle input {
  flex: 0 0 auto;
  width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--light-brown);
}

.checkout-section .manual-city-fields {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #eadbc9;
  border-radius: 8px;
  background: #fffaf3;
}

.checkout-section .manual-city-fields[hidden] {
  display: none;
}

.checkout-section .manual-city-fields small {
  color: #76685d;
  line-height: 1.8;
}

.checkout-section .manual-city-mode > select#city {
  opacity: 0.55;
}

.checkout-section .shipping-method-notes {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  color: #76685d;
  font-size: 0.9rem;
  line-height: 1.8;
}

.checkout-section .shipping-method-notes p,
.checkout-section .payment-method-notes p {
  margin: 0;
}

.checkout-section .payment-method-notes > div {
  display: grid;
  gap: 6px;
}

.checkout-section .payment-method-notes > div[hidden] {
  display: none;
}

.checkout-section .payment-method-notes [dir="ltr"] {
  display: inline-block;
  direction: ltr;
  unicode-bidi: plaintext;
}

.checkout-section .bank-payment-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dfceb9;
  border-radius: 8px;
  background: #fff7ed;
}

.checkout-section .bank-payment-card-head,
.checkout-section .bank-payment-card-grid > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.checkout-section .bank-payment-card-head strong {
  color: var(--dark-brown);
  font-size: 1rem;
}

.checkout-section .bank-payment-card-head span {
  color: #8b3f12;
  font-weight: 900;
  white-space: nowrap;
}

.checkout-section .bank-payment-card-grid {
  display: grid;
  gap: 10px;
}

.checkout-section .bank-payment-card-grid > div {
  min-width: 0;
  padding: 10px 0;
  border-top: 1px solid rgba(139, 111, 71, 0.16);
}

.checkout-section .bank-payment-card-grid span {
  flex: 0 0 92px;
  color: #76685d;
}

.checkout-section .bank-payment-card-grid strong {
  min-width: 0;
  color: var(--dark-brown);
  overflow-wrap: anywhere;
}

.checkout-section .bank-payment-card-grid button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d9c5ad;
  border-radius: 8px;
  background: #fff;
  color: #704214;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.checkout-section .bank-payment-help {
  color: #6b5c50;
}

.checkout-section .checkout-receipt-toggle-group {
  display: grid;
  gap: 12px;
}

.checkout-section .checkout-receipt-toggle {
  width: max-content;
  max-width: 100%;
  justify-content: center;
}

.checkout-section .checkout-receipt-panel {
  padding: 16px;
  border: 1px solid #eadbc9;
  border-radius: 8px;
  background: #fffaf3;
}

.checkout-section .checkout-receipt-panel[hidden] {
  display: none;
}

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

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

.checkout-section .checkout-alert {
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  background: #fff1f2;
  color: #9f1239;
  line-height: 1.8;
}

.checkout-section .checkout-card > .btn {
  width: 100%;
  min-height: 52px;
  justify-content: center;
  margin-top: 20px;
  border-radius: 8px;
}

.checkout-section .checkout-card > .btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.checkout-section .summary-item,
.checkout-section .summary-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 14px;
  align-items: start;
  margin: 0;
}

.checkout-section .summary-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(230, 217, 201, 0.78);
}

.checkout-section .summary-item span:first-child,
.checkout-section .summary-total span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.checkout-section .summary-item span:last-child,
.checkout-section .summary-total span:last-child {
  white-space: nowrap;
  text-align: left;
}

.checkout-section .checkout-coupon-box,
.checkout-section .checkout-delivery-card {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #e6d9c9;
  border-radius: 8px;
  background: #fffaf3;
}

.checkout-section .checkout-coupon-box h4,
.checkout-section .checkout-delivery-card h4 {
  margin: 0 0 4px;
  color: var(--dark-brown);
  font-size: 1rem;
  line-height: 1.5;
}

.checkout-section .checkout-coupon-form,
.checkout-section .checkout-coupon-applied {
  display: flex;
  gap: 8px;
  align-items: center;
}

.checkout-section .checkout-coupon-form input {
  min-width: 0;
  flex: 1;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #e6d9c9;
  border-radius: 8px;
  font: inherit;
  outline: none;
}

.checkout-section .checkout-coupon-form input:focus {
  border-color: var(--light-brown);
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.16);
}

.checkout-section .checkout-coupon-form button,
.checkout-section .checkout-coupon-applied button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--light-brown);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.checkout-section .checkout-coupon-applied {
  justify-content: space-between;
}

.checkout-section .checkout-coupon-applied form {
  flex: 0 0 auto;
  margin: 0;
}

.checkout-section .checkout-delivery-card div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.checkout-section .checkout-delivery-card span,
.checkout-section .checkout-delivery-card small {
  color: #76685d;
}

.checkout-section .checkout-delivery-card strong {
  min-width: 0;
  font-weight: 800;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.checkout-section .summary-total {
  margin-top: 16px;
  padding: 16px 0 0;
  border-top: 2px solid #e6d9c9;
  color: var(--dark-brown);
  font-weight: 900;
}

.checkout-section .summary-total span:last-child {
  color: #2f7d5f;
}

.checkout-section .order-success {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.checkout-section .order-success h2 {
  margin: 0 0 12px;
  color: var(--dark-brown);
}

.checkout-section .order-success p {
  margin: 0 0 10px;
}

.checkout-section .order-success code {
  direction: ltr;
  display: inline-block;
  margin-top: 4px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f0e6da;
  color: var(--dark-brown);
  font-weight: 800;
}

.checkout-section .payment-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.checkout-section .payment-actions .btn {
  justify-content: center;
  border-radius: 8px;
}

@media (max-width: 1100px) {
  .checkout-section .checkout-layout,
  .checkout-section .quick-pay-layout {
    grid-template-columns: 1fr;
    max-width: 820px;
    margin: 0 auto;
  }

  .checkout-section .checkout-summary {
    order: 0;
  }
}

@media (max-width: 760px) {
  .checkout-section {
    padding: 42px 0;
  }

  .checkout-section .checkout-card,
  .checkout-section .checkout-summary,
  .checkout-section .order-success {
    padding: 20px;
  }

  body .checkout-section .checkout-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

  .checkout-section .summary-item,
  .checkout-section .summary-total {
    gap: 10px;
  }
}

@media (max-width: 520px) {
  .checkout-section {
    padding: 34px 0;
  }

  .checkout-section .checkout-card,
  .checkout-section .checkout-summary,
  .checkout-section .order-success {
    padding: 16px;
  }

  .checkout-section .checkout-card h2,
  .checkout-section .checkout-summary h3 {
    font-size: 1.12rem;
  }

  .checkout-section .checkout-coupon-form,
  .checkout-section .checkout-coupon-applied,
  .checkout-section .payment-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .checkout-section .checkout-coupon-form button,
  .checkout-section .checkout-coupon-applied button,
  .checkout-section .payment-actions .btn {
    width: 100%;
  }

  .checkout-section .checkout-delivery-card div {
    grid-template-columns: minmax(64px, 0.7fr) minmax(0, 1.3fr);
    gap: 8px;
  }
}

@media (max-width: 380px) {
  .checkout-section .checkout-card,
  .checkout-section .checkout-summary,
  .checkout-section .order-success {
    padding: 14px;
  }

  .checkout-section .summary-item,
  .checkout-section .summary-total {
    grid-template-columns: 1fr;
  }

  .checkout-section .summary-item span:last-child,
  .checkout-section .summary-total span:last-child {
    text-align: right;
  }
}
