/* Shopping flow: products, configurator, cart, sent, dialogs. Loaded after portal.css. */
[x-cloak] { display: none !important; }
.visually-hidden { position: absolute; left: 0; margin: -1px; padding: 0; border: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.crumbs { margin: 0 0 .6rem; color: var(--muted); font-size: .9rem; }
.link-quiet { color: var(--muted); text-decoration: none; }
.link-quiet:hover { color: var(--ink); text-decoration: underline; }
.link-btn { background: none; border: 0; padding: .25rem 0; color: var(--ink); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { text-decoration-thickness: 2px; }
.hint-center { text-align: center; }
.inline-form { display: inline; margin: 0; }

/* --- Inicio: primary button ---------------------------------------------------------------- */
.cta {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 4.2rem; margin: 1.25rem 0; padding: 0 1.4rem;
  border-radius: var(--radius); background: var(--ink); color: #fff;
  font-size: 1.2rem; font-weight: 800; text-decoration: none;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}
.cta:hover { transform: translateY(-2px); background: var(--ink-soft); box-shadow: 0 10px 24px rgba(0, 0, 0, .22); }
.cta:active { transform: scale(.985); }
.cta-plus { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--yellow); color: var(--ink); font-size: 1.7rem; font-weight: 500; line-height: 1; transition: transform .2s var(--ease); }
.cta:hover .cta-plus { transform: rotate(90deg); }

.cart-bar { display: flex; align-items: center; justify-content: space-between; margin: 0 0 1.1rem; padding: .95rem 1.1rem; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; transition: box-shadow .15s var(--ease); }
.cart-bar:hover { box-shadow: var(--shadow-md); }
.cart-link { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; color: #fff; font-weight: 700; font-size: .92rem; text-decoration: none; }
.cart-link.nav-link-active { text-decoration: underline; text-underline-offset: 4px; }
.cart-badge { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: 999px; background: var(--yellow); color: var(--ink); font-size: .78rem; font-weight: 800; }

/* --- Product list -------------------------------------------------------------------------- */
.families { margin: 0 0 1.5rem; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); overflow: hidden; }
.family { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.25rem; color: inherit; text-decoration: none; transition: background .15s var(--ease), padding-left .15s var(--ease); }
.families li + li .family { border-top: 1px solid var(--line); }
.family:hover { background: #fafaf8; padding-left: 1.45rem; }
.family:focus-visible { outline-offset: -3px; }
.family-text { display: grid; gap: .2rem; min-width: 0; }
.family-title { font-size: 1.05rem; line-height: 1.2; font-weight: 800; }
.family-text .muted { font-size: .9rem; line-height: 1.35; }
.family-price { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 0 .3rem; flex: none; max-width: 7.6rem; text-align: right; }
.family-price strong { font-size: 1.05rem; }
.family-price > :last-child { flex-basis: 100%; text-align: right; }

/* --- Configurator -------------------------------------------------------------------------- */
.configurator { display: grid; gap: 1.5rem; margin-top: 1.25rem; }
.config-form, .config-side { display: grid; gap: 1.4rem; align-content: start; min-width: 0; }
.config-form .field, .config-side .field { margin: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, .label { display: block; margin: 0 0 .5rem; padding: 0; font-weight: 700; }
.field-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.field-head .label { margin: 0; }
.field-hint { margin: .4rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.field-hint:empty { display: none; }
.tag { padding: .15rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.tag-required { background: #fbe0e0; color: #8f1d1d; }

.select, .input {
  width: 100%; min-height: 3.1rem; padding: .6rem .95rem;
  border: 1px solid var(--line-strong); border-radius: 12px; background-color: var(--card);
  font: inherit; font-size: 1.05rem; color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.select:hover, .input:hover { border-color: #8a8a84; }
.select {
  appearance: none; padding-right: 2.6rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%227%22 viewBox=%220 0 12 7%22%3E%3Cpath d=%22M1 1l5 5 5-5%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}
.select:focus-visible, .input:focus-visible, .stepper-value:focus-visible { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0, 150, 214, .45); }
.input-short { max-width: 8rem; }
textarea.input { min-height: 4.5rem; resize: vertical; }

/* Technology and delivery cards */
.choices { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; }
.choice {
  position: relative; display: grid; align-content: center; gap: .15rem; padding: .8rem .9rem; min-height: 4rem;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card);
  cursor: pointer; user-select: none;
  transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease);
}
.choice:hover { border-color: var(--ink); }
.choice:active { transform: scale(.98); }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }
.choice:has(input:focus-visible) { outline: 3px solid var(--cyan); outline-offset: 2px; }
.choice-name { display: block; font-size: .96rem; font-weight: 800; line-height: 1.2; }
.choice-price { display: block; font-size: .85rem; line-height: 1.25; opacity: .8; }

/* Delivery: radio rows */
.choice-wide {
  grid-column: 1 / -1; margin-bottom: .6rem; padding: .95rem 1rem;
  grid-template-columns: 1.4rem 1fr; column-gap: .9rem; row-gap: .1rem; align-items: center;
}
.choice-wide input { position: static; grid-row: 1 / span 2; width: 1.4rem; height: 1.4rem; opacity: 1; appearance: none; border: 2px solid var(--ink); border-radius: 50%; background: #fff; display: grid; place-content: center; transition: background .15s var(--ease); }
.choice-wide input::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .15s var(--ease); }
.choice-wide input:checked::before { transform: scale(1); }
.choice-wide .choice-name, .choice-wide .choice-price { grid-column: 2; }
.choice-wide:has(input:checked) { background: var(--card); border: 2px solid var(--ink); color: var(--ink); box-shadow: none; padding: calc(.95rem - 1px) calc(1rem - 1px); }
.choice-wide .choice-price { color: var(--muted); opacity: 1; }

/* Measures */
.measures { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.measures .field { margin: 0; }
.measures .field > label:not([class]) { color: var(--muted); font-size: .85rem; font-weight: 500; margin-bottom: .3rem; }
.measures-title { grid-column: 1 / -1; margin: 0 0 -.4rem; font-weight: 700; }
.measures .copies { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.measures .copies > label { margin: 0 !important; color: var(--ink) !important; font-size: 1rem !important; font-weight: 700 !important; }
.stepper { display: flex; align-items: center; gap: .35rem; }
.stepper-btn {
  width: 3rem; height: 3rem; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--card);
  font: inherit; font-size: 1.5rem; font-weight: 700; line-height: 1; cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease), transform .1s var(--ease);
}
.stepper-btn:hover { background: var(--ink); color: #fff; }
.stepper-btn:active { transform: scale(.92); }
.stepper-btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.field .stepper-value, .stepper-value {
  width: 3.4rem; min-height: 3rem; padding: 0; border: 0; border-radius: 12px; background: transparent;
  font: inherit; font-size: 1.2rem; font-weight: 800; text-align: center;
}

/* Finishes */
.finishes { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); overflow: hidden; }
.finishes li + li { border-top: 1px solid var(--line); }
.finish { display: flex; align-items: center; gap: .95rem; padding: .95rem 1rem; cursor: pointer; transition: background .15s var(--ease); }
.finish:hover { background: #fafaf8; }
.finish:has(input:checked) { background: #f7f7f2; }
.finish input {
  flex: none; width: 1.6rem; height: 1.6rem; margin: 0; cursor: pointer;
  appearance: none; border: 2px solid var(--ink); border-radius: 7px; background: #fff;
  display: grid; place-content: center; transition: background .15s var(--ease), transform .1s var(--ease);
}
.finish input::before {
  content: ""; width: .85rem; height: .85rem; background: #fff; transform: scale(0); transition: transform .15s var(--ease);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.finish input:checked { background: var(--ink); }
.finish input:checked::before { transform: scale(1); }
.finish input:active { transform: scale(.9); }
.finish input:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.finish-text { display: grid; line-height: 1.3; }
.finish-text strong { font-weight: 700; }
.finish-extra { padding: 0 1rem 1rem 3.55rem; animation: page-in .2s var(--ease) both; }
.finish-extra label { display: block; margin-bottom: .4rem; font-weight: 700; }

/* --- File: dropzone, progress, card, preview ------------------------------------------------ */
.uploader { position: relative; display: grid; gap: .75rem; }
.dropzone {
  display: grid; justify-items: center; gap: .45rem; padding: 1.6rem 1rem;
  border: 2px dashed var(--ink); border-radius: var(--radius); background: var(--card); text-align: center;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease);
}
.dropzone:hover { background: #fafaf8; }
.dropzone.is-dragging { background: #eaf6fc; border-color: var(--cyan); transform: scale(1.01); }
.dropzone-icon { width: 2.3rem; height: 2.3rem; color: var(--ink); transition: transform .2s var(--ease); }
.dropzone:hover .dropzone-icon, .dropzone.is-dragging .dropzone-icon { transform: translateY(-3px); }
.dropzone strong { font-size: 1.1rem; }
.btn-inline { display: inline-block; width: auto; min-height: 2.8rem; margin-top: .35rem; padding: .5rem 1.4rem; }
.progress { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.progress-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.progress-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-bar { height: .6rem; border-radius: 999px; background: #e4e4df; overflow: hidden; }
.progress-bar span {
  display: block; height: 100%; border-radius: inherit; transition: width .2s var(--ease);
  background: repeating-linear-gradient(135deg, var(--ink) 0 10px, #3a3a38 10px 20px); background-size: 28px 28px;
  animation: stripes .8s linear infinite;
}
@keyframes stripes { to { background-position: 28px 0; } }
.progress p { margin: .6rem 0 0; }

.file-card { position: relative; display: flex; align-items: center; gap: .9rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; animation: page-in .25s var(--ease) both; }
.file-card-ok { border-color: #b7dfc7; }
.file-card-ok .file-icon { background: #e1f4e8; color: var(--ok); }
.file-card-error { border-color: #efb4b0; background: #fbe6e4; color: #8f1d1d; }
.file-card-pending::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent); background-size: 50% 100%; background-repeat: no-repeat;
  animation: sweep 1.2s ease-in-out infinite;
}
@keyframes sweep { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.file-icon { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 10px; background: var(--chip); }
.file-text { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.file-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spinner { flex: none; width: 1.5rem; height: 1.5rem; border: 3px solid #ddd; border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.correction .dropzone { padding: 1rem; border-width: 1.5px; }
.correction .dropzone-icon { width: 1.8rem; height: 1.8rem; }

/* Preview at scale, with selection handles on the corners and mid-edges like the design */
.preview-frame {
  --h: radial-gradient(circle, #fff 0 2px, #000 2.5px 3.5px, transparent 4px);
  /* The frame has the proportions of the requested piece and never grows past 24rem tall:
     a tall piece (50 × 100) gets a narrow frame instead of overflowing onto the price. */
  --max-h: 24rem;
  position: relative; box-sizing: border-box; margin-inline: auto;
  width: min(100%, calc(var(--max-h) * var(--rw, 1) / var(--rh, 1)));
  aspect-ratio: var(--rw, 1) / var(--rh, 1);
  padding: .55rem; border: 1px solid var(--ink); background-color: #fff;
  background-image: var(--h), var(--h), var(--h), var(--h), var(--h), var(--h), var(--h), var(--h);
  background-size: 9px 9px; background-repeat: no-repeat;
  background-position: left top, right top, left bottom, right bottom, center top, center bottom, left center, right center;
  animation: page-in .3s var(--ease) both;
}
.preview-frame img { position: absolute; inset: .55rem; display: block; width: calc(100% - 1.1rem); height: calc(100% - 1.1rem); object-fit: contain; }
.preview-empty { display: grid; place-items: center; min-height: 7.5rem; padding: 1.4rem 1rem; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); font-size: .9rem; text-align: center; }
.preview p { margin: .55rem 0 0; }

.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: .3rem; border-radius: var(--radius); background: #e2e2dd; gap: .3rem; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.segmented span { display: block; padding: .8rem .5rem; border-radius: 10px; font-weight: 700; text-align: center; transition: background .15s var(--ease), color .15s var(--ease); }
.segmented label:hover span { background: rgba(255, 255, 255, .55); }
.segmented input:checked + span { background: var(--ink); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 1px; }

/* --- Price card ----------------------------------------------------------------------------- */
.price-card { padding: 1.15rem 1.25rem; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); }
.price-head { display: flex; align-items: center; justify-content: space-between; }
.price-head h3 { font-size: 1.05rem; font-stretch: 100%; font-weight: 800; }
.cmyk { display: inline-flex; gap: .25rem; }
.cmyk i { width: .65rem; height: .65rem; display: block; }
.cmyk i:nth-child(1) { background: var(--cyan); }
.cmyk i:nth-child(2) { background: var(--magenta); }
.cmyk i:nth-child(3) { background: var(--yellow); }
.cmyk i:nth-child(4) { background: var(--ink); }
.price-card > .muted { margin: .1rem 0 0; }
.price-lines { margin: .7rem 0; padding: 0 0 .9rem; list-style: none; border-bottom: 2px dotted var(--line-strong); }
.price-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .22rem 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.price-lines li span:last-child { color: var(--ink); font-weight: 600; }
.price-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: .75rem; font-weight: 700; }
.price-total strong { font-size: 2.9rem; line-height: .95; font-stretch: 68%; font-weight: 850; letter-spacing: -.005em; font-variant-numeric: tabular-nums; }
.price-transfer { display: flex; align-items: baseline; justify-content: space-between; margin-top: .65rem; color: var(--muted); }
.price-transfer strong { color: var(--ink); font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.note { margin: .8rem 0 0; padding: .7rem .9rem; border-radius: 10px; background: var(--chip); font-size: .9rem; }
.note-warning { background: #fff4c2; }
.note-info { position: relative; margin: 1.25rem 0 0; padding: 1rem 1rem 1rem 3.1rem; background: #fff4c2; border: 1px solid #f0d96a; border-radius: var(--radius); font-size: .95rem; }
.note-info::before { content: "i"; position: absolute; left: 1rem; top: 1rem; display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--ink); color: #fff; font-size: .85rem; font-weight: 800; font-style: italic; }
.btn:disabled { background: #d9d9d3; border-color: #d9d9d3; color: #6b6b66; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-dashed { border: 1.5px dashed var(--ink); background: transparent; color: var(--ink); margin: 1rem 0; }
.btn-dashed:hover { background: var(--card); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; margin-bottom: .6rem; }
.btn-danger:hover { background: #9a2019; }
.btn-small { display: inline-block; width: auto; min-height: 2.75rem; padding: .4rem 1.1rem; font-size: .92rem; }
.config-side .btn-primary { margin-top: 0; }
.config-side .hint { margin: .75rem 0 0; font-size: .85rem; }
.config-side .hint-center { text-align: center; }
.config-side .price-card + .hint { margin-top: 1rem; }

/* Live price: dim while the server answers, new numbers fade in */
#price { display: grid; gap: 0; }
#product-form.htmx-request .price-card, .htmx-settling .price-card { opacity: .6; }
#product-form.htmx-request .price-total strong, #product-form.htmx-request .price-transfer strong {
  color: transparent; border-radius: 6px; background: linear-gradient(90deg, #e6e6e1 25%, #f4f4f0 50%, #e6e6e1 75%); background-size: 200% 100%; animation: shimmer 1s linear infinite;
}
.price-card { transition: opacity .15s var(--ease); }
.price-total strong, .price-transfer strong { animation: price-in .35s var(--ease) both; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes price-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* --- Cart ----------------------------------------------------------------------------------- */
.progress-steps { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; font-size: .85rem; color: var(--muted); }
.progress-steps li { padding-top: .5rem; border-top: 4px solid var(--line-strong); }
.progress-steps .is-done { border-top-color: var(--ink); }
.progress-steps .is-current { border-top-color: var(--ink); color: var(--ink); font-weight: 800; }
.cart-items { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); overflow: hidden; }
.cart-item { display: flex; gap: 1rem; padding: 1rem; }
.cart-item + .cart-item { border-top: 1px solid var(--line); }
.cart-item-missing { background: #fffbd6; }
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-head { display: flex; justify-content: space-between; gap: 1rem; }
.cart-item-head strong:last-child { font-variant-numeric: tabular-nums; }
.cart-item-body p { margin: .3rem 0 0; line-height: 1.4; }
.cart-item-actions { display: flex; gap: 1.4rem; margin-top: .5rem; }
.cart-item-actions form { margin: 0; }
.cart-item-actions .link, .cart-item-actions .link-btn { display: inline-flex; align-items: center; min-height: 2.25rem; }
.thumb { flex: none; display: grid; place-items: center; width: 56px; height: 56px; padding: 4px; overflow: hidden; border-radius: 10px; background: var(--chip); }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb-lg { width: 84px; height: 72px; }
.thumb:empty::after { content: ""; width: 40%; height: 40%; border-radius: 4px; background: #d6d6d0; }
.send-form { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
.send-form .field { margin: 0; }
.send-form .hint { margin: 0; }
.empty-state { display: grid; gap: 1rem; justify-items: center; padding: 2.5rem 1rem; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); text-align: center; }
.empty-state .btn { width: auto; padding-left: 1.6rem; padding-right: 1.6rem; }
.empty-state p { margin: 0; color: var(--muted); }

/* --- Sent ----------------------------------------------------------------------------------- */
.sent-check { display: grid; place-items: center; width: 4.2rem; height: 4.2rem; margin: .5rem 0 1.1rem; border-radius: 50%; background: var(--ok); animation: pop .5s var(--ease) both; }
.sent-summary { margin: 1.5rem 0 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); overflow: hidden; }
.sent-lines { margin: 0; padding: 0; list-style: none; }
.sent-lines li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .95rem 1.1rem; border-bottom: 1px solid var(--line); }
.sent-lines li:last-child { border-bottom: 0; }
.sent-lines li strong { flex: none; font-size: 1.05rem; }
.sent-total { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border-top: 2px solid var(--ink); }
.sent-total span { font-weight: 800; font-size: 1.05rem; }
.sent-total strong { font-size: 1.9rem; line-height: 1; letter-spacing: -.01em; }
.sent-check path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .4s .25s var(--ease) forwards; }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.next-steps { margin: 0 0 1.75rem; padding: 0; list-style: none; display: grid; gap: 1.1rem; }
.next-steps li { display: flex; gap: .9rem; align-items: flex-start; }
.step-num { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: .9rem; }
.step-num-accent { background: var(--magenta); }
.stack-actions { display: grid; gap: .75rem; margin-top: 1.75rem; }
.stack-actions form { margin: 0; }

/* --- Cards with actions, order detail ------------------------------------------------------- */
.card-link { display: grid; gap: .1rem; color: inherit; text-decoration: none; }
.card-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.card-actions form { margin: 0; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card-row .card-title { margin: 0; }
.card-row p { margin-top: .1rem; }
.item { display: grid; gap: .8rem; padding: .85rem 1rem; }
.item-row { display: flex; align-items: center; gap: .9rem; }
.item-row > div:last-child { min-width: 0; }
.correction { display: grid; gap: .75rem; padding-bottom: .3rem; }

/* --- Banner, dialog, chips ------------------------------------------------------------------ */
.banner-error { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; margin: 0 0 1rem; padding: 1rem; border: 1px solid #efb4b0; border-radius: var(--radius); background: #fbe6e4; animation: page-in .25s var(--ease) both; }
.banner-error p { flex: 1; min-width: 14rem; margin: 0; }
.banner-error .btn { width: auto; min-height: 2.75rem; padding-top: .55rem; padding-bottom: .55rem; }
.banner-icon { display: grid; place-items: center; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--danger); color: #fff; font-weight: 800; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); backdrop-filter: blur(2px); z-index: 40; }
.modal { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; padding: 1.75rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--card); box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); }
.modal::before { content: ""; position: absolute; top: .6rem; left: 50%; width: 2.6rem; height: 4px; margin-left: -1.3rem; border-radius: 4px; background: #cfcfc9; }
.modal h2 { margin-bottom: .6rem; font-size: 1.9rem; }
.modal .hint { margin: 1rem 0 1.25rem; }
.modal-actions { display: grid; gap: .6rem; }
.modal-actions .btn-danger { margin: 0; }
.modal-enter { transition: transform .26s var(--ease), opacity .26s var(--ease); }
.modal-enter-start { transform: translateY(60px); opacity: 0; }
.modal-enter-end { transform: translateY(0); opacity: 1; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .5rem 1.05rem; border-radius: 999px; background: var(--chip); font-weight: 700; font-size: .92rem; transition: background .15s var(--ease), color .15s var(--ease), transform .1s var(--ease); }
.chip:hover span { background: #e0e0da; }
.chip:active span { transform: scale(.96); }
.chip input:checked + span { background: var(--ink); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }

@media (min-width: 720px) {
  .measures { grid-template-columns: 1fr 1fr 7.5rem; align-items: end; }
  .measures-title { display: none; }
  .measures .field > label:not([class]) { color: var(--ink); font-size: .95rem; font-weight: 700; }
  .measures .copies { grid-column: auto; display: block; }
  .measures .copies > label { display: block; margin: 0 0 .3rem !important; font-size: .95rem !important; }
  .stepper-btn { width: 2.6rem; height: 3.1rem; }
  .field .stepper-value, .stepper-value { width: 2rem; }
  .stepper { gap: .2rem; }
  .measures-title + .field, .measures .field { min-width: 0; }
}
@media (min-width: 960px) {
  .configurator { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; margin-top: 1.5rem; }
  .config-side { position: sticky; top: 5.5rem; }
  .modal { left: 50%; right: auto; bottom: auto; top: 50%; width: 30rem; padding-top: 1.75rem; border-radius: 20px; transform: translate(-50%, -50%); box-shadow: var(--shadow-md), 0 30px 80px rgba(0, 0, 0, .25); }
  .modal::before { display: none; }
  .modal-enter-start { transform: translate(-50%, -46%) scale(.97); }
  .modal-enter-end { transform: translate(-50%, -50%); }
  .modal-actions { display: flex; flex-direction: row-reverse; justify-content: flex-start; gap: .6rem; }
  .modal-actions .btn { width: auto; margin: 0; padding-left: 1.4rem; padding-right: 1.4rem; }
  .stack-actions { max-width: 28rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .sent-check path { stroke-dashoffset: 0; }
}

/* Pictures that mark an error (shop and customer) */
.problem-images { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.problem-images img { display: block; width: 120px; height: 90px; object-fit: cover; border: 2px solid #fff; border-radius: 8px; background: #fff; }

/* --- Shipping address (cart): steps, street autocomplete ------------------------------------- */
.ship-form { display: grid; gap: 1.25rem; margin-top: .75rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); animation: page-in .2s var(--ease) both; }
.ship-intro h3 { margin: 0 0 .25rem; font-size: 1.3rem; }
.ship-intro p { margin: 0; color: var(--muted); font-size: .92rem; }
.ship-step { display: grid; gap: .6rem; min-width: 0; }
.ship-step-title { display: flex; align-items: center; gap: .55rem; margin: 0; font-weight: 800; }
.ship-n { display: grid; place-items: center; flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--ink); color: #fff; font-size: .8rem; }
.ship-opt { margin-left: auto; color: var(--muted); font-size: .78rem; font-weight: 600; }
.ship-label { display: block; margin: 0 0 .3rem; color: var(--ink); font-size: .95rem; font-weight: 600; }
.ship-row { display: grid; gap: .75rem; grid-template-columns: 1fr; min-width: 0; }
.ship-row > * { min-width: 0; }
.ship-count { text-align: right; margin-top: .2rem; }
.ship-form .field-hint { margin-top: .35rem; }
.addr-combo { position: relative; }
.addr-credit { display: block; margin-top: .15rem; font-size: .75rem; opacity: .85; }
.addr-warn { color: var(--danger); font-weight: 600; }
.addr-spinner { position: absolute; right: .9rem; top: 2.45rem; width: 1rem; height: 1rem; border: 2px solid var(--line-strong); border-top-color: var(--ink); border-radius: 50%; opacity: 0; pointer-events: none; animation: addr-spin .7s linear infinite; }
.addr-spinner.htmx-request { opacity: 1; }
@keyframes addr-spin { to { transform: rotate(360deg); } }
.addr-results { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: .25rem 0 0; padding: .3rem; max-height: 17rem; overflow-y: auto; list-style: none; border: 1px solid var(--ink); border-radius: 12px; background: var(--card); box-shadow: var(--shadow-md); }
.addr-option { display: grid; gap: .05rem; min-height: 2.75rem; padding: .5rem .7rem; border-radius: 8px; cursor: pointer; }
.addr-option:hover, .addr-option.is-active { background: var(--chip); }
.addr-option.is-active { outline: 2px solid var(--cyan); outline-offset: -2px; }
.addr-street { font-weight: 700; }
.addr-locality { color: var(--muted); font-size: .85rem; }
.addr-note { padding: .7rem; color: var(--muted); font-size: .9rem; }
.ship-confirm { padding: .9rem 1rem; border: 1px solid #f0d96a; border-radius: var(--radius); background: #fff4c2; }
.ship-confirm-label { display: flex; gap: .75rem; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.ship-confirm-label input { flex: none; width: 1.4rem; height: 1.4rem; margin: .1rem 0 0; accent-color: var(--ink); }
.ship-confirm-label:has(input:focus-visible) { outline: 3px solid var(--cyan); outline-offset: 3px; }
@media (min-width: 640px) {
  .ship-form { padding: 1.4rem; }
  .ship-row { grid-template-columns: 1fr 1fr; }
  .ship-row-street { grid-template-columns: 1fr 9rem; }
}
@media (prefers-reduced-motion: reduce) { .ship-form, .addr-spinner { animation: none; } }
.addr-note-credit { padding: .35rem .7rem .2rem; font-size: .72rem; border-top: 1px solid var(--line); }

/* --- Shipment to the interior (Vía Cargo) ---------------------------------------------------- */
fieldset.ship-form, fieldset.ship-sub { min-width: 0; margin-inline: 0; }
fieldset.ship-form { margin-bottom: 0; }
.ship-sub { display: grid; gap: .85rem; margin-top: .9rem; padding: 0; border: 0; animation: page-in .2s var(--ease) both; }
.ship-national .choices { margin-top: .1rem; }
.ship-national .choice { min-height: 4.25rem; }
.ship-national .choice-price { font-size: .8rem; }
.ship-soft { margin: 0; }
.ship-opt-inline { margin-left: .35rem; color: var(--muted); font-size: .75rem; font-weight: 500; }
.ship-picked { color: var(--ok); font-weight: 700; }
.ship-picked::before { content: "✓ "; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { .ship-sub { animation: none; } }

/* Archivo subido: «Quitar» con zona táctil de 44 px; aviso de que las medidas se completaron solas. */
.file-card .link-btn { min-height: 2.75rem; padding: 0 .5rem; }
.file-fill { margin-top: .15rem; color: var(--ink); font-weight: 600; }

/* «Si no sabés cuál…» under the print choices: a full row of the grid. */
.techs-hint { grid-column: 1 / -1; margin: 0; }

/* ===== «Tu pedido»: subir varios archivos, tarjeta por archivo (#75, pantallas 34–37) ========= */
/* Home CTA (pantalla 34) */
.upload-cta { margin: 1.25rem 0; padding: 1.6rem; border-radius: 22px; background: var(--ink); color: #fff; }
.upload-cta h2 { margin: 1.1rem 0 .55rem; color: #fff; font-size: 2.05rem; line-height: 1.02; letter-spacing: -.01em; }
.upload-cta p { margin: 0 0 1.4rem; color: #cfcfca; font-size: 1.05rem; line-height: 1.4; }
.upload-cta-art { display: inline-flex; align-items: flex-end; }
.upload-cta-art i { width: 2.7rem; height: 3.1rem; border-radius: 8px; box-shadow: 0 3px 10px rgba(0, 0, 0, .4); }
.upload-cta-art i:nth-child(1) { background: #00a0dc; transform: rotate(-8deg); }
.upload-cta-art i:nth-child(2) { background: #e6007e; margin-left: -.6rem; transform: rotate(5deg); z-index: 1; }
.upload-cta-art i:nth-child(3) { background: var(--yellow); margin-left: -.6rem; transform: rotate(-3deg); }
.upload-cta .btn-yellow { min-height: 3.5rem; font-size: 1.1rem; }
.btn-yellow { background: var(--yellow); color: var(--ink); font-weight: 800; border-color: var(--yellow); }
.btn-yellow:hover { background: #ffd23d; border-color: #ffd23d; box-shadow: var(--shadow-md); }
.btn-block { display: flex; width: 100%; align-items: center; justify-content: center; gap: .55rem; }
.row-link { display: flex; align-items: center; gap: .85rem; margin: 0 0 1.75rem; padding: 1.1rem 1.15rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); font-weight: 800; font-size: 1.05rem; text-decoration: none; box-shadow: var(--shadow-sm); transition: box-shadow .15s var(--ease), transform .12s var(--ease); }
.row-link:hover { box-shadow: var(--shadow-md); }
.row-link:active { transform: scale(.995); }
.row-link-icon { display: grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--chip); font-size: 1.2rem; }
.row-link span:nth-child(2) { flex: 1; }
.row-link-arrow { flex: none; color: var(--muted); font-size: 1.5rem; }

/* The open card: the file being completed. 2px black border = the one thing to act on now. */
.order-card { margin: 0 0 1.1rem; padding: 1.25rem; border: 2px solid var(--ink); border-radius: 18px; background: var(--card); box-shadow: 0 6px 20px rgba(0, 0, 0, .08); animation: page-in .22s var(--ease) both; }
.card-field { margin-bottom: 1.3rem; }
.card-q { display: block; margin-bottom: .55rem; font-weight: 800; font-size: 1.05rem; }

/* Card header: the file's thumbnail, name and «Archivo N de M» */
.card-header { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.3rem; }
.card-thumb { flex: none; }
.card-thumb .thumb-doc { color: var(--muted); }
.card-header-text { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.card-filename { font-size: 1.2rem; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-count { color: var(--muted); font-size: .92rem; font-weight: 600; }
.card-file-remove { flex: none; align-self: flex-start; min-height: 2.75rem; padding: 0 .25rem; font-size: .88rem; color: var(--muted); text-decoration: none; }
.card-file-remove:hover { color: var(--ink); text-decoration: underline; }

.group-choice { display: flex; gap: .5rem; margin-bottom: .7rem; }
.group-btn { flex: 1; display: grid; place-items: center; min-height: 3.3rem; padding: .5rem; border: 1.5px solid var(--line-strong, #c9c9c2); border-radius: 14px; background: #fff; font-size: 1.05rem; font-weight: 800; cursor: pointer; transition: background .14s var(--ease), color .14s var(--ease), border-color .14s var(--ease); }
.group-btn:hover { border-color: var(--ink); }
.group-btn.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.group-btn input:focus-visible + span { outline: 3px solid var(--cyan, #0096d6); outline-offset: 3px; }
/* The chosen material, shown as a quiet recessed control (tap to change) */
.card-material { width: 100%; background-color: #f4f4ef; border-color: transparent; font-weight: 700; }
.card-material:hover { border-color: var(--line-strong); }
.measures-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.measures-row .field > label:not([class]) { margin-bottom: .35rem; font-weight: 700; }
.measures-row .input { min-height: 3.5rem; font-size: 1.5rem; font-weight: 800; }

/* Stepper inside the card: a soft grey segmented group (matches designs 35–36) */
.order-card .stepper { gap: .25rem; padding: .25rem; border-radius: 13px; background: var(--chip); }
.order-card .stepper-btn { width: 2.9rem; height: 2.7rem; border: 0; border-radius: 10px; background: transparent; font-size: 1.4rem; }
.order-card .stepper-btn:hover { background: #fff; color: var(--ink); }
.order-card .stepper-value { width: 3rem; min-height: 2.7rem; }
/* Label on the left, control on the right (Copias, ¿Lleva ojales?, ¿Cuántos por copia?): matches
   the designs and keeps the card short. Wraps on very narrow screens so nothing is cut off.
   Own name (not .card-row, which is the order-detail card elsewhere) to keep one meaning per class. */
.card-inline-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; }
.card-inline-row .card-q { margin-bottom: 0; }
.card-inline-row > label { margin: 0; font-weight: 700; }
.copies-field { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; }
.copies-field label { margin: 0; font-weight: 700; }
.yesno { display: inline-flex; gap: .5rem; }
.yesno-btn { display: grid; place-items: center; min-width: 5.2rem; min-height: 3.1rem; padding: .5rem 1rem; border: 1.5px solid var(--line-strong, #c9c9c2); border-radius: 14px; background: #fff; font-weight: 800; cursor: pointer; transition: background .14s var(--ease), color .14s var(--ease), border-color .14s var(--ease); }
.yesno-btn:hover { border-color: var(--ink); }
.yesno-btn.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.grommets-extra { margin-top: .9rem; display: grid; gap: .5rem; }
/* Separator + «Este producto $…» on the left, «Siguiente →» on the right (side by side) */
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .9rem 1rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.card-price { flex: 1 1 auto; min-width: 0; display: grid; gap: .1rem; }
.card-price-amount { font-size: 2rem; font-weight: 850; line-height: 1; letter-spacing: -.01em; }
.card-next { flex: 0 0 auto; width: auto; min-height: 3.2rem; padding-left: 1.5rem; padding-right: 1.5rem; }

/* Folded completed products: white card, green ✓, «Editar» on the right */
.order-lines { margin: 0 0 1.1rem; padding: 0; list-style: none; display: grid; gap: .75rem; }
.order-line { display: flex; align-items: center; gap: .9rem; padding: .95rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); }
.order-line-warn { border-color: #ecd68a; background: #fffdf0; }
.order-line .thumb-doc { color: var(--muted); }
.order-line-body { flex: 1; min-width: 0; }
.order-line-title { margin: 0 0 .15rem; font-weight: 800; line-height: 1.15; }
.order-ok { color: var(--ok); font-weight: 900; }
.order-line-actions { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: .15rem; }
.order-line-actions form { margin: 0; }
.order-line-edit { min-height: 2.5rem; display: inline-flex; align-items: center; font-weight: 800; font-size: 1.02rem; text-decoration: underline; text-underline-offset: 3px; }
.order-line-remove { font-size: .82rem; color: var(--muted); text-decoration: none; }
.order-line-remove:hover { color: var(--ink); text-decoration: underline; }
.order-add { width: 100%; min-height: 3.6rem; margin: 0 0 1.25rem; border: 1.5px dashed var(--line-strong); color: var(--ink); font-size: 1.02rem; }
.order-add:hover { background: var(--card); border-color: var(--ink); }

/* «Tu pedido»: queue of files waiting their turn (folded, muted — designs 35–36) */
.order-queue { margin-top: -.35rem; }
.order-line-pending { background: #f5f4ef; box-shadow: none; }
.order-line-pending .thumb { opacity: .85; }
.order-line-pending .order-line-title { font-weight: 700; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-upload { margin: 0 0 1.25rem; }
.dropzone-busy, .upload-busy { display: flex; flex-direction: column; align-items: center; gap: .55rem; text-align: center; }
.dropzone-busy strong, .upload-busy strong { font-size: 1.05rem; }
.upload-busy { margin-top: 1rem; }
.upload-failed { margin-top: 1rem; text-align: left; }
.upload-failed ul { margin: .4rem 0 .8rem; padding-left: 1.1rem; }
.upload-failed .btn { margin-top: .4rem; }

/* Delivery summary + fields + note */
.order-delivery-card { margin: 1rem 0; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.delivery-summary { display: flex; align-items: center; gap: .85rem; padding-bottom: 1.1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.delivery-summary-icon { flex: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px; background: var(--chip); color: var(--ink); }
.delivery-summary-text { flex: 1; min-width: 0; display: grid; gap: .05rem; }
.delivery-summary-k { color: var(--muted); font-size: .9rem; }
.delivery-summary-text strong { font-size: 1.1rem; line-height: 1.1; }
.delivery-change { flex: none; font-weight: 800; text-decoration: underline; }
.order-note textarea { width: 100%; }

/* Sticky total + send bar (pantallas 35–36) */
.order-bar { position: sticky; bottom: 0; z-index: 5; display: grid; gap: .8rem; margin: 1rem -1rem 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; box-shadow: 0 -8px 24px rgba(0, 0, 0, .14); }
.order-bar-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.order-bar-labels { display: grid; gap: .1rem; min-width: 0; }
.order-bar-label { font-weight: 800; }
.order-bar-transfer { color: #c9c9c3; }
.order-bar-amount { font-size: 2.2rem; line-height: 1; white-space: nowrap; letter-spacing: -.01em; }
.order-bar .order-send { width: 100%; background: var(--yellow); color: var(--ink); font-weight: 800; min-height: 3.2rem; font-size: 1.05rem; }
.order-bar .order-send:disabled { background: #595959; color: #cfcfcf; }
@media (min-width: 640px) { .order-bar { margin-inline: 0; border-radius: var(--radius); } }
