/* Checkout page — two-column layout */
.checkout-page-body .site-header {
  margin-bottom: 0;
}

.checkout-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px var(--site-gutter) 64px;
}

.checkout-empty {
  text-align: center;
  padding: 80px 20px;
}

.checkout-empty p {
  margin: 0 0 20px;
  font-size: 1.1rem;
  color: var(--color-muted);
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 0;
  align-items: start;
  border: 1.5px solid rgba(175, 73, 50, 0.18);
  border-radius: 18px;
  overflow: hidden;
  background: var(--color-white);
}

.checkout-main {
  padding: 36px 40px 40px;
  background: var(--color-white);
}

.checkout-title {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin: 0 0 28px;
  color: var(--color-dark);
}

.co-section {
  margin-bottom: 28px;
  padding-bottom: 8px;
}

.co-section h2 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--color-dark);
}

.co-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.co-field {
  display: block;
  margin-bottom: 12px;
}

.co-label {
  display: block;
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-bottom: 6px;
}

.co-field input,
.co-field select {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid rgba(26, 26, 26, 0.16);
  border-radius: 10px;
  background: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-dark);
  transition: border-color 0.2s ease;
}

.co-field input:focus,
.co-field select:focus {
  outline: none;
  border-color: var(--color-brand);
}

.co-field select:disabled {
  opacity: 0.85;
  background: var(--color-cream);
}

.co-row {
  display: grid;
  gap: 12px;
}

.co-row-2 { grid-template-columns: 1fr 1fr; }
.co-row-3 { grid-template-columns: 1.1fr 1.2fr 0.9fr; }

.co-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--color-dark);
  margin: 4px 0 0;
  cursor: pointer;
}

.co-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-brand);
}

.co-note,
.co-hint {
  margin: 0 0 14px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--color-muted);
}

.co-note {
  color: var(--color-brand);
  font-style: italic;
}

.co-note a {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.co-ship-box {
  border: 1.5px solid rgba(175, 73, 50, 0.22);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--color-cream);
}

.co-ship-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.co-pay-list {
  border: 1.5px solid rgba(26, 26, 26, 0.12);
  border-radius: 12px;
  overflow: hidden;
}

.co-pay-option {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(26, 26, 26, 0.08);
  cursor: pointer;
  background: var(--color-white);
  transition: background 0.2s ease;
}

.co-pay-option:last-child { border-bottom: none; }

.co-pay-option.is-selected {
  background: rgba(175, 73, 50, 0.07);
  box-shadow: inset 3px 0 0 var(--color-brand);
}

.co-pay-option input {
  margin-top: 3px;
  accent-color: var(--color-brand);
}

.co-pay-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.co-pay-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.co-pay-badges {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.co-pay-desc {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--color-muted);
  line-height: 1.4;
}

.co-error {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(180, 35, 24, 0.08);
  color: #b42318;
  font-size: 0.9rem;
  text-align: center;
}

.co-pay-btn {
  width: 100%;
  padding: 15px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--color-brand);
  background: var(--color-brand);
  color: var(--color-offwhite);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.co-pay-btn:hover:not(:disabled) {
  background: #963f2b;
  border-color: #963f2b;
  transform: translateY(-1px);
}

.co-pay-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

.co-policies {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
  justify-content: center;
}

.co-policies a {
  font-size: 0.82rem;
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.checkout-summary {
  background: #F3EEE6;
  padding: 28px 24px 32px;
  border-left: 1.5px solid rgba(175, 73, 50, 0.12);
  min-height: 100%;
}

.co-summary-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 22px;
}

.co-sum-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: start;
}

.co-sum-thumb {
  position: relative;
  width: 64px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.co-sum-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.co-sum-qty {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--color-dark);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.co-sum-info {
  min-width: 0;
}

.co-sum-name {
  margin: 0 0 4px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-dark);
}

.co-sum-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-muted);
}

.co-sum-delivery {
  margin: 4px 0 0;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--color-muted);
}

.co-sum-price {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.co-discount {
  margin-bottom: 20px;
}

.co-sitewide-applied {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(122, 155, 118, 0.16);
  color: #3f6b3c;
  font-size: 0.82rem;
  font-weight: 500;
}

.co-sum-mrp {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-muted);
  text-decoration: line-through;
  margin-bottom: 2px;
}

.co-featured-name a {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.co-discount-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.co-discount-row input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid rgba(26, 26, 26, 0.16);
  border-radius: 10px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.co-discount-row input:focus {
  outline: none;
  border-color: var(--color-brand);
}

.co-apply-btn {
  padding: 0 18px;
  border-radius: 10px;
  border: 1.5px solid rgba(26, 26, 26, 0.16);
  background: rgba(26, 26, 26, 0.06);
  color: var(--color-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.co-apply-btn.is-ready {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: var(--color-offwhite);
}

.co-featured {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1.5px dashed rgba(175, 73, 50, 0.45);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.co-featured-copy {
  min-width: 0;
}

.co-featured-code {
  margin: 0 0 2px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-brand);
  letter-spacing: 0.04em;
}

.co-featured-name {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.co-featured-apply {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--color-dark);
  background: var(--color-dark);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.co-featured-apply:hover {
  background: var(--color-brand);
  border-color: var(--color-brand);
}

a.co-featured-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  max-width: 9.5rem;
}

.co-coupon-msg {
  margin: 8px 0 0;
  font-size: 0.8rem;
}

.co-coupon-msg.is-ok { color: #3f6b3c; }
.co-coupon-msg.is-err { color: #b42318; }

.co-totals {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
}

.co-total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--color-dark);
}

.co-total-final {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  align-items: baseline;
  font-size: 1rem;
  font-weight: 600;
}

.co-total-final small {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-muted);
  margin-right: 4px;
}

.co-total-final strong {
  font-size: 1.25rem;
  font-weight: 700;
}

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

  .checkout-summary {
    border-left: none;
    border-top: 1.5px solid rgba(175, 73, 50, 0.12);
    order: -1;
  }

  .checkout-main {
    padding: 28px 20px 36px;
  }

  .co-row-2,
  .co-row-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .checkout-page {
    padding: 16px 0 40px;
  }

  .checkout-layout {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}
