/* =========================================================
   ROSAYA — checkout page
   ========================================================= */
.checkout-body {
  margin: 0;
  min-height: 100vh;
  background: var(--ivory-deep, #FDEFF5);
  color: var(--charcoal, #171417);
  font-family: var(--font-body, 'DM Sans', sans-serif);
}

.checkout-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 40px);
  background: var(--ivory, #fff);
  border-bottom: 1px solid var(--line, rgba(252,110,166,.16));
}
.checkout-top__logo img {
  height: 28px; width: auto;
}
@media (min-width: 700px) {
  .checkout-top__logo img { height: 36px; }
}
.checkout-top__back {
  font-size: 13.5px;
  color: var(--charcoal-70, rgba(23,20,23,.7));
}
.checkout-top__back:hover { color: var(--mauve-dark, #fc6ea6); }

.checkout-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 40px) 64px;
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 800px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
  .checkout-summary-card { order: -1; }
}

.checkout-form-card,
.checkout-summary-card,
.checkout-empty,
.checkout-success {
  background: var(--ivory, #fff);
  border: 1px solid var(--line, rgba(252,110,166,.16));
  border-radius: 8px;
  padding: 28px 24px;
  box-shadow: 0 10px 28px rgba(23,20,23,.05);
}

.checkout-form-card h1,
.checkout-empty h1,
.checkout-success h1 {
  font-family: var(--font-display, 'DM Sans', serif);
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 500;
  margin: 0 0 8px;
}
.checkout-lead {
  color: var(--charcoal-70, rgba(23,20,23,.7));
  font-size: 14px;
  margin: 0 0 22px;
}

.checkout-form-card form {
  display: grid;
  gap: 14px;
}
.checkout-form-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--charcoal-45, rgba(23,20,23,.45));
}
.checkout-form-card input,
.checkout-form-card textarea {
  font-family: inherit;
  font-size: 14.5px;
  color: var(--charcoal, #171417);
  border: 1px solid var(--line, rgba(252,110,166,.16));
  border-radius: 4px;
  padding: 12px 14px;
  background: #fff;
  resize: vertical;
}
.checkout-form-card input:focus,
.checkout-form-card textarea:focus {
  outline: none;
  border-color: var(--mauve-dark, #fc6ea6);
}

.checkout-pay--ip {
  border: 1px solid var(--line, rgba(252,110,166,.16));
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(252,110,166,.08), rgba(252,110,166,.06));
  margin: 4px 0 0;
}
.checkout-pay__ip-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: #1a1a2e;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.checkout-pay--ip > strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--charcoal, #171417);
  margin-bottom: 10px;
}
.checkout-pay__ip-row {
  margin: 0 0 8px;
  font-size: 13.5px;
  color: var(--charcoal, #171417);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.checkout-pay__ipa {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
  color: var(--mauve-dark, #fc6ea6);
}
.checkout-pay__copy {
  border: 1px solid var(--line, rgba(252,110,166,.16));
  background: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--charcoal, #171417);
}
.checkout-pay__copy:hover {
  border-color: var(--mauve-dark, #fc6ea6);
  color: var(--mauve-dark, #fc6ea6);
}
.checkout-pay__note {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--charcoal-70, rgba(23,20,23,.7));
}
.checkout-success__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  margin: 0 auto;
}
.checkout-success__actions .btn { margin: 0; width: 100%; }

.checkout-error {
  background: #FDECEA;
  color: #7A271A;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 4px;
  margin: 0;
}
.checkout-hint {
  font-size: 12px;
  color: var(--charcoal-45, rgba(23,20,23,.45));
  text-align: center;
  margin: 4px 0 0;
  line-height: 1.45;
}

.checkout-summary-card h2 {
  font-family: var(--font-display, 'DM Sans', serif);
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 16px;
}
.co-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(252,110,166,.14);
  width: 100%;
  box-sizing: border-box;
}
.co-line__img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  flex-shrink: 0;
  overflow: hidden;
  background: #FFF5F9;
}
.co-line__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.co-line__info {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.co-line__name {
  font-size: 14px;
  margin-bottom: 4px;
  line-height: 1.35;
  word-break: break-word;
}
.co-line__meta {
  font-size: 12.5px;
  color: rgba(90,58,72,.65);
}
.co-line__price {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  color: #fc6ea6;
}
#co-lines {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.checkout-totals {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}
.checkout-totals__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
.checkout-totals__row--disc { color: #fc6ea6; }
.checkout-totals__row--disc strong { white-space: nowrap; }
#co-discounts { display: grid; gap: 10px; }
#co-discounts:empty { display: none; }
.co-promo { margin-top: 14px; }
.co-line__was { font-weight: 400; font-size: 12px; color: rgba(90,58,72,.5); }
.co-line__info .cart-line__deal { margin-top: 4px; }
.checkout-totals__row--muted {
  color: var(--charcoal-45, rgba(23,20,23,.45));
  font-size: 13px;
}
.checkout-totals__row--total {
  padding-top: 10px;
  border-top: 1px solid var(--line, rgba(252,110,166,.16));
  font-size: 16px;
}

.checkout-empty,
.checkout-success {
  text-align: center;
  max-width: 420px;
  margin: 40px auto;
}
.checkout-empty p,
.checkout-success p {
  color: var(--charcoal-70, rgba(23,20,23,.7));
  font-size: 14px;
  margin: 0 0 20px;
  line-height: 1.55;
}
.checkout-empty .btn,
.checkout-success .btn {
  margin: 6px 8px;
}
.checkout-success__icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--mauve-dark, #fc6ea6);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  font-weight: 600;
}
.checkout-success__summary {
  text-align: start; background: #FFF5F9; border: 1px solid rgba(252,110,166,.18);
  border-radius: 10px; padding: 14px 16px; margin: 4px 0 14px; font-size: 13.5px;
  color: #5A3A48; line-height: 1.9;
}
.checkout-success__summary b { color: #5A3A48; }
.checkout-success__thanks { font-weight: 600; color: #fc6ea6; margin: 0 0 16px; }

.checkout-foot {
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--charcoal-45, rgba(23,20,23,.45));
}
.checkout-foot a { color: var(--mauve-dark, #fc6ea6); text-decoration: underline; }

@media (max-width: 480px) {
  .checkout-form-card,
  .checkout-summary-card {
    padding: 20px 16px;
  }
  .co-line__img { width: 56px; height: 70px; }
}

.checkout-auto-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--charcoal-70, rgba(23,20,23,.7));
  margin: 0 0 16px;
  padding: 10px 12px;
  background: rgba(252,110,166,.06);
  border-radius: 6px;
}
.checkout-auto-note code {
  font-size: 11px;
  background: rgba(0,0,0,.06);
  padding: 1px 4px;
  border-radius: 3px;
}

.checkout-pay-methods {
  border: 1px solid rgba(252,110,166,.2);
  border-radius: 14px;
  padding: 16px;
  margin: 16px 0;
  background: #FFF8FB;
  text-align: start;
}
.checkout-pay-methods legend {
  font-weight: 600; color: #fc6ea6; padding: 0 8px; font-size: 14px;
}
.pay-opt {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 12px; padding: 12px 14px; cursor: pointer; font-size: 14.5px;
  text-align: start; border-radius: 10px; margin: 4px 0;
  background: #fff; border: 1px solid rgba(252,110,166,.12);
  color: #5A3A48;
}
.pay-opt:has(input:checked) {
  border-color: #fc6ea6; background: #FFF5F9;
}
.pay-opt input { accent-color: #fc6ea6; width: 18px; height: 18px; flex-shrink: 0; }
.pay-opt span { flex: 1; text-align: start; }
.checkout-instapay-link {
  margin: -2px 0 4px; padding: 10px 12px;
  background: #fff; border-radius: 8px; font-size: 13.5px; color: #5A3A48;
  border: 1px dashed rgba(252,110,166,.35); word-break: break-all;
}
.checkout-instapay-link a { color: #fc6ea6; font-weight: 600; text-decoration: underline; }
.checkout-cod-note {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
  color: #5A3A48;
  border: 1px dashed rgba(252,110,166,.35);
}



#co-gov {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid rgba(252,110,166,.25);
  border-radius: 8px;
  background: #fff;
}

.checkout-proof {
  margin: 14px 0;
  padding: 14px;
  background: #FFF5F9;
  border: 1px dashed rgba(252,110,166,.4);
  border-radius: 12px;
}
.checkout-proof label { font-size: 14px; font-weight: 500; color: #5A3A48; display: grid; gap: 8px; }
.checkout-proof input[type=file] { font-size: 13px; }
.checkout-proof__hint { font-size: 12.5px; color: rgba(90,58,72,.65); margin: 8px 0 0; }
.checkout-proof__preview img {
  margin-top: 10px; max-width: 100%; max-height: 180px; border-radius: 10px;
  border: 1px solid rgba(252,110,166,.2);
}

/* =========================================================
   v8 — checkout page redesign (pink, soft cards, numbered steps)
   ========================================================= */
.checkout-body {
  background: radial-gradient(900px 420px at 50% -140px, #ffd6e8 0%, rgba(255,214,232,0) 72%), #fff6fa;
}
.checkout-top {
  background: rgba(255,255,255,.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(252,110,166,.14);
}
.checkout-top__logo img { height: 34px; }
@media (min-width: 700px) { .checkout-top__logo img { height: 42px; } }
.checkout-top__back {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 999px;
  border: 1.5px solid rgba(252,110,166,.3); background: #fff; color: #a8455f;
  font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.checkout-top__back:hover { background: #fc6ea6; border-color: #fc6ea6; color: #fff; box-shadow: 0 8px 20px rgba(252,110,166,.3); }

.checkout-main { max-width: 1060px; padding-top: 34px; }
.checkout-layout { grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: 28px; }
.checkout-summary-card { position: sticky; top: 92px; }
@media (max-width: 800px) {
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-summary-card { position: static; }
}

.checkout-form-card, .checkout-summary-card, .checkout-empty, .checkout-success {
  border-radius: 24px; border: 1px solid rgba(252,110,166,.13); background: #fff;
  box-shadow: 0 22px 50px rgba(252,110,166,.12), 0 2px 6px rgba(90,58,72,.04);
}
.checkout-form-card, .checkout-summary-card { padding: 32px 30px; }
@media (max-width: 480px) { .checkout-form-card, .checkout-summary-card { padding: 22px 16px; border-radius: 20px; } }

.checkout-form-card h1 { color: #5A3A48; font-weight: 700; letter-spacing: -.01em; }
.checkout-lead { font-size: 14.5px; color: rgba(90,58,72,.7); margin-bottom: 26px; }
.checkout-form-card form { gap: 16px; }

/* numbered step headings */
.co-step {
  display: flex; align-items: center; gap: 10px; margin: 14px 0 0; padding-top: 18px;
  border-top: 1px dashed rgba(252,110,166,.25); font-size: 15.5px; font-weight: 700; color: #5A3A48;
}
.co-step:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.co-step__n {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ff8dbb, #fc6ea6); color: #fff; font-size: 13px; font-weight: 700;
  box-shadow: 0 6px 14px rgba(252,110,166,.35);
}
.co-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-width: 0; }
.co-row > label { min-width: 0; }
@media (max-width: 560px) { .co-row { grid-template-columns: 1fr; } }

/* fields */
.checkout-form-card label { font-size: 13px; font-weight: 600; color: #7a5566; gap: 7px; }
.checkout-form-card input:not([type="radio"]):not([type="file"]),
.checkout-form-card textarea,
.checkout-form-card select {
  width: 100%; box-sizing: border-box; font: 500 15px/1.4 inherit; font-family: inherit; color: #3d2a33;
  border: 1.5px solid #f3d9e5; border-radius: 14px; padding: 13px 16px; background: #fffafc;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.checkout-form-card textarea { resize: vertical; min-height: 64px; }
.checkout-form-card input::placeholder, .checkout-form-card textarea::placeholder { color: rgba(90,58,72,.38); font-weight: 400; }
.checkout-form-card input:not([type="radio"]):not([type="file"]):focus,
.checkout-form-card textarea:focus, .checkout-form-card select:focus {
  outline: 0; border-color: #fc6ea6; background: #fff; box-shadow: 0 0 0 4px rgba(252,110,166,.14);
}
.checkout-form-card select, #co-gov {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding: 13px 40px 13px 16px;
  background: #fffafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%23fc6ea6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center;
  border: 1.5px solid #f3d9e5; border-radius: 14px;
}
.is-rtl .checkout-form-card select, .is-rtl #co-gov { padding: 13px 16px 13px 40px; background-position: left 16px center; }

/* payment method cards */
.checkout-pay-methods { border: 0; padding: 0; margin: 0; background: none; min-width: 0; }
.checkout-pay-methods legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; }
.checkout-form-card label.pay-opt {
  position: relative; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px;
  padding: 16px 18px; margin: 0 0 10px; border: 1.5px solid #f3d9e5; border-radius: 16px; background: #fff;
  font-size: 15px; font-weight: 600; color: #5A3A48; cursor: pointer;
  transition: border-color .2s, box-shadow .2s, background .2s, transform .15s;
}
.checkout-form-card label.pay-opt:hover { border-color: #fc6ea6; box-shadow: 0 8px 20px rgba(252,110,166,.12); }
.checkout-form-card label.pay-opt:has(input:checked) { border-color: #fc6ea6; background: #fff5f9; box-shadow: 0 10px 24px rgba(252,110,166,.18); }
.checkout-form-card .pay-opt input[type="radio"] {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; padding: 0; flex-shrink: 0; margin: 0;
  border: 2px solid #e8b9cd; border-radius: 50%; background: #fff; display: grid; place-content: center; transition: background .15s, border-color .15s;
}
.checkout-form-card .pay-opt input[type="radio"]::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .15s; }
.checkout-form-card .pay-opt input[type="radio"]:checked { background: #fc6ea6; border-color: #fc6ea6; }
.checkout-form-card .pay-opt input[type="radio"]:checked::after { transform: scale(1); }
.pay-opt span { flex: 1; text-align: start; line-height: 1.4; }
.pay-opt span::before { margin-inline-end: 10px; font-size: 18px; }
.pay-opt:has(input[value="wallet"]) span::before { content: "📱"; }
.pay-opt:has(input[value="instapay"]) span::before { content: "⚡"; }
.pay-opt:has(input[value="cod"]) span::before { content: "💵"; }
.checkout-instapay-link, .checkout-cod-note {
  margin: -2px 0 12px; padding: 12px 16px; border-radius: 14px; background: #fff5f9; font-size: 13.5px; line-height: 1.6;
  color: #5A3A48; border: 1.5px dashed rgba(252,110,166,.4);
}
.checkout-instapay-link a { color: #fc6ea6; font-weight: 700; }

/* receipt upload */
.checkout-proof { margin: 4px 0 0; padding: 16px; background: #fff5f9; border: 1.5px dashed rgba(252,110,166,.45); border-radius: 16px; }
.checkout-proof label { font-size: 14px; font-weight: 600; color: #5A3A48; }
.checkout-form-card .checkout-proof input[type="file"] { width: 100%; font-size: 13.5px; color: #7a5566; border: 0; padding: 4px 0; background: none; }
.checkout-proof input[type="file"]::file-selector-button {
  border: 0; background: #fc6ea6; color: #fff; padding: 10px 18px; border-radius: 999px; font: 600 13px inherit; font-family: inherit;
  cursor: pointer; margin-inline-end: 12px; transition: background .2s;
}
.checkout-proof input[type="file"]::file-selector-button:hover { background: #e8508f; }

/* submit */
.checkout-form-card .btn--primary, #co-submit {
  border: 0; border-radius: 999px; padding: 17px 20px; margin-top: 6px; font-size: 16px; font-weight: 700; letter-spacing: .01em;
  color: #fff; background: linear-gradient(135deg, #ff8dbb 0%, #fc6ea6 100%); box-shadow: 0 14px 30px rgba(252,110,166,.4);
  cursor: pointer; transition: transform .18s, box-shadow .18s, filter .18s;
}
#co-submit:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(252,110,166,.46); filter: brightness(1.04); }
#co-submit:active { transform: translateY(0); }
#co-submit:disabled { opacity: .7; cursor: wait; transform: none; }
.checkout-hint { font-size: 12.5px; }
.checkout-error { border-radius: 12px; padding: 12px 14px; }

/* order summary */
.checkout-summary-card h2 { color: #5A3A48; font-weight: 700; font-size: 20px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid rgba(252,110,166,.15); }
.co-line { gap: 14px; padding: 16px 0; }
.co-line__img { width: 70px; height: 70px; border-radius: 16px; border: 1px solid rgba(252,110,166,.16); background: #fff5f9; }
.co-line__name { font-weight: 600; color: #5A3A48; font-size: 14.5px; }
.co-line__meta { font-size: 12.5px; }
.co-line__price { font-size: 14.5px; font-weight: 700; }
.checkout-totals { margin-top: 18px; padding: 16px; border-radius: 16px; background: #fff7fb; gap: 12px; }
.checkout-totals__row { font-size: 14.5px; color: #5A3A48; }
.checkout-totals__row--total { margin-top: 2px; padding-top: 14px; border-top: 1.5px dashed rgba(252,110,166,.3); font-size: 17px; font-weight: 700; }
.checkout-totals__row--total strong { color: #fc6ea6; font-size: 21px; }

/* confirmation */
.checkout-success { padding: 36px 26px; }
.checkout-success h1 { color: #5A3A48; }
.checkout-success__icon {
  width: 72px; height: 72px; font-size: 32px; background: linear-gradient(135deg, #ff8dbb, #fc6ea6);
  box-shadow: 0 0 0 10px rgba(252,110,166,.14), 0 14px 30px rgba(252,110,166,.4);
}
.checkout-success__summary { border-radius: 16px; padding: 16px 18px; }
.checkout-success .btn { border-radius: 999px; }
.checkout-empty .btn { border-radius: 999px; }
.checkout-foot { padding: 22px 16px 30px; }

.co-ship-note { display: block; margin-top: 6px; padding: 8px 12px; border-radius: 12px; background: #fff0f6; border: 1px solid rgba(252,110,166,.25); color: #5A3A48; font-size: 13px; line-height: 1.5; font-weight: 500; }
.co-ship-note[hidden] { display: none; }
