:root {
  --ink: #241d1b;
  --muted: #746965;
  --cream: #fffaf6;
  --paper: #fff;
  --coral: #df604d;
  --rose: #fae8e1;
  --green: #397c54;
  --line: rgba(61, 43, 37, .13);
  --shadow: 0 20px 52px rgba(74, 46, 37, .1);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #f7f2ee; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.order-header { min-height: 78px; padding: 14px max(22px, calc((100% - 1240px) / 2)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; background: var(--cream); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; color: white; background: var(--coral); border-radius: 50%; font-size: 23px; }
.brand > span:last-child { display: grid; line-height: 1; }
.brand strong { font-family: Georgia, serif; font-size: 24px; font-style: italic; }
.brand small { margin-top: 4px; color: var(--coral); font-size: 7px; font-weight: 900; letter-spacing: .25em; }
.header-copy { display: grid; gap: 4px; text-align: center; }
.header-copy span { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.header-copy strong { font-family: Georgia, serif; font-size: 16px; font-weight: 500; }
.back-link { justify-self: end; padding: 10px 16px; background: white; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 800; }
.header-links { justify-self: end; display: flex; gap: 8px; }
.header-links .back-link { justify-self: auto; }

.order-shell { width: min(1240px, calc(100% - 36px)); margin: 34px auto 80px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr); gap: 25px; align-items: start; }
.checkout-column { min-width: 0; }
.page-heading { padding: 8px 4px 24px; }
.eyebrow { margin: 0 0 8px; color: var(--coral); font-size: 9px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
h1, h2 { font-family: Georgia, serif; font-weight: 500; letter-spacing: -.025em; }
h1 { margin: 0 0 12px; font-size: clamp(42px, 5vw, 62px); }
.page-heading > p:last-child { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.7; }

.notice { margin-bottom: 16px; padding: 14px 16px; color: #6c5a54; background: #fff8e9; border: 1px solid #ebdfbd; border-radius: 13px; font-size: 12px; line-height: 1.55; }
.notice.is-ready { color: #315e43; background: #edf7f0; border-color: #cfe4d5; }
.notice.is-error { color: #9f4037; background: #fff0ed; border-color: #efcbc5; }
.account-notice { margin-bottom: 16px; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 15px; background: white; border: 1px solid var(--line); border-radius: 13px; }
.account-notice div { display: grid; gap: 3px; }
.account-notice span { color: var(--muted); font-size: 10px; }
.account-notice a { padding: 8px 11px; white-space: nowrap; color: var(--coral); background: var(--rose); border-radius: 9px; font-size: 10px; font-weight: 850; }
.resume-card { margin-bottom: 16px; padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; background: var(--ink); border-radius: 14px; color: white; }
.resume-card div { display: grid; gap: 3px; }
.resume-card span { color: #d9cfcb; font-size: 11px; }
.resume-card button { padding: 9px 12px; color: var(--ink); background: white; border: 0; border-radius: 9px; font-size: 10px; font-weight: 850; }

#order-form { display: grid; gap: 16px; }
.form-card, .summary-card, .side-card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.form-card { padding: 25px; }
.card-heading { margin-bottom: 21px; display: flex; align-items: center; gap: 14px; }
.card-heading > span { width: 37px; height: 37px; display: grid; place-items: center; color: var(--coral); background: var(--rose); border-radius: 11px; font-family: Georgia, serif; font-size: 12px; font-style: italic; }
.card-heading p { margin: 0 0 3px; color: var(--coral); font-size: 8px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.card-heading h2 { margin: 0; font-size: 25px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: grid; gap: 7px; color: #574c48; font-size: 10px; font-weight: 850; }
input, select, textarea { width: 100%; color: var(--ink); background: #fffcfa; border: 1px solid var(--line); border-radius: 10px; outline: none; }
input, select { min-height: 42px; padding: 0 11px; }
textarea { padding: 10px 11px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(223,96,77,.1); }
.form-grid + label, .delivery-options + label { margin-top: 15px; }

.order-items { display: grid; gap: 10px; }
.order-item { padding: 13px; display: grid; grid-template-columns: minmax(150px, 1.4fr) 82px minmax(155px, 1fr) auto auto; align-items: end; gap: 10px; background: #fcf8f5; border: 1px solid var(--line); border-radius: 14px; }
.file-label { position: relative; }
.file-label input { width: 1px; height: 1px; position: absolute; opacity: 0; }
.file-name { min-height: 42px; padding: 0 11px; display: flex; align-items: center; overflow: hidden; color: var(--muted); background: white; border: 1px dashed rgba(76,54,47,.24); border-radius: 10px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font-size: 10px; font-weight: 650; }
.file-label:focus-within .file-name { border-color: var(--coral); }
.item-subtotal { padding-bottom: 13px; white-space: nowrap; font-size: 11px; }
.remove-item { width: 31px; height: 31px; margin-bottom: 5px; color: #9e4b40; background: #f8e7e3; border: 0; border-radius: 9px; font-size: 18px; }
.secondary-button { min-height: 40px; padding: 0 15px; color: var(--ink); background: #f5efeb; border: 1px solid var(--line); border-radius: 10px; font-size: 10px; font-weight: 850; }
#add-item { margin-top: 12px; }
.file-help { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }

.delivery-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card { padding: 14px; display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 10px; background: #fcf8f5; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.choice-card input { width: 17px; min-height: 17px; accent-color: var(--coral); }
.choice-card span { display: grid; gap: 3px; }
.choice-card small { color: var(--muted); font-size: 9px; font-weight: 500; }

.summary-card { padding: 21px 24px; display: grid; gap: 10px; }
.summary-card > div { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
.summary-card strong { color: var(--ink); }
.summary-total { padding-top: 11px; border-top: 1px solid var(--line); font-size: 15px !important; }
.summary-ves { color: var(--coral) !important; font-size: 16px !important; }
.summary-ves strong { color: var(--coral); }
.summary-card > small { color: #9a8d88; text-align: right; font-size: 9px; }
.form-message { min-height: 18px; color: var(--muted); font-size: 11px; font-weight: 700; }
.form-message.is-error { color: #a74338; }
.form-message.is-success { color: var(--green); }
.primary-button { min-height: 50px; padding: 0 20px; color: white; background: var(--coral); border: 0; border-radius: 13px; font-weight: 850; box-shadow: 0 12px 23px rgba(196,72,54,.17); }
.primary-button:disabled { cursor: not-allowed; opacity: .5; }

.payment-column { min-width: 0; position: sticky; top: 22px; }
.side-card { padding: 26px; }
.empty-payment { min-height: 260px; display: grid; place-items: center; align-content: center; text-align: center; }
.lock-icon { width: 50px; height: 50px; display: grid; place-items: center; color: white; background: var(--green); border-radius: 50%; font-size: 22px; }
.empty-payment h2 { margin: 16px 0 8px; font-size: 25px; }
.empty-payment p { max-width: 280px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.payment-card h2, .status-card h2 { margin: 0 0 17px; font-size: 30px; }
.payment-amount { margin-bottom: 17px; padding: 16px; display: grid; gap: 5px; color: white; background: var(--ink); border-radius: 14px; }
.payment-amount span { color: #d6cbc7; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.payment-amount strong { font-family: Georgia, serif; font-size: 31px; font-weight: 500; }
.payment-data { margin: 0; display: grid; }
.payment-data div { padding: 10px 0; display: flex; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.payment-data dt { color: var(--muted); font-size: 10px; }
.payment-data dd { margin: 0; text-align: right; font-size: 11px; font-weight: 850; }
.copy-button { width: 100%; min-height: 40px; margin: 14px 0 24px; color: var(--coral); background: var(--rose); border: 0; border-radius: 10px; font-size: 10px; font-weight: 850; }
#payment-form { padding-top: 20px; display: grid; gap: 13px; border-top: 1px solid var(--line); }
#payment-form h3 { margin: 0 0 2px; font-family: Georgia, serif; font-size: 21px; font-weight: 500; }
.security-note { margin: 0; color: var(--green); font-size: 9px; font-weight: 750; }
.status-pill { margin-bottom: 15px; padding: 11px 13px; color: #315e43; background: #e8f5ec; border-radius: 10px; font-size: 11px; font-weight: 850; }
.status-card > p:not(.eyebrow) { color: var(--muted); font-size: 12px; line-height: 1.6; }
.status-totals { margin: 18px 0; padding: 14px 0; display: flex; justify-content: space-between; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 11px; }
.status-card .secondary-button { width: 100%; }
.text-button { width: 100%; margin-top: 11px; padding: 8px; color: var(--muted); background: transparent; border: 0; font-size: 10px; font-weight: 800; }

@media (max-width: 920px) {
  .order-shell { grid-template-columns: 1fr; }
  .payment-column { position: static; }
}
@media (max-width: 680px) {
  .order-header { padding: 13px 16px; grid-template-columns: 1fr auto; }
  .header-copy { display: none; }
  .header-links .back-link:first-child { display: none; }
  .order-shell { width: calc(100% - 20px); margin-top: 18px; }
  .form-card, .side-card { padding: 20px; border-radius: 18px; }
  .form-grid, .delivery-options { grid-template-columns: 1fr; }
  .order-item { grid-template-columns: minmax(0, 1fr) 74px; }
  .file-label { grid-column: 1 / -1; }
  .item-subtotal { padding: 8px 0 0; }
  .remove-item { justify-self: end; }
  .account-notice { align-items: stretch; flex-direction: column; }
  .account-notice a { text-align: center; }
}

/* V0.24.0 R2 — líneas flexibles de pedido */
.order-item { padding: 14px; display: grid; grid-template-columns: 1fr; align-items: stretch; gap: 11px; }
.item-main-row { display: grid; grid-template-columns: minmax(170px, 1fr) 92px auto auto; align-items: end; gap: 10px; }
.item-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.item-options:empty { display: none; }
.item-kind { width: max-content; max-width: 100%; padding: 6px 9px; color: #315e43; background: #eaf5ed; border-radius: 999px; font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.item-kind.is-manual-photos { color: #8a4a32; background: #fff0e7; }
.item-kind.is-no-photos { color: #5d556f; background: #f1edf7; }
.file-label { max-width: 100%; }
.item-allocations { padding: 12px; display: grid; gap: 8px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.allocation-heading { display: grid; gap: 2px; }
.allocation-heading strong { font-size: 10px; }
.allocation-heading span { color: var(--muted); font-size: 9px; }
.checkout-allocation-row { display: grid; grid-template-columns: minmax(0, 1fr) 82px; align-items: center; gap: 10px; }
.checkout-allocation-row span { overflow: hidden; color: #5c504c; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.checkout-allocation-row input { min-height: 36px; text-align: center; }
.allocation-check { margin: 2px 0 0; color: var(--green); font-size: 9px; font-weight: 850; }
.allocation-check.is-error { color: #a74338; }

@media (max-width: 680px) {
  .item-main-row { grid-template-columns: minmax(0, 1fr) 76px; }
  .item-main-row .item-subtotal { padding: 6px 0 0; }
  .item-main-row .remove-item { justify-self: end; }
  .item-options { grid-template-columns: 1fr; }
}
