/* ==========================================================================
   Tienda: carrito, finalizar compra, acceso y cuenta del cliente.
   Usa las variables de cada estilo (Taller, Galería, Showroom).
   ========================================================================== */

.sh-page { padding: clamp(28px, 4vw, 48px) 0 clamp(60px, 8vw, 110px); }
.sh-title { font-size: clamp(30px, 4vw, 46px); margin: 0 0 6px; }
.sh-sub { color: var(--muted); margin: 0 0 28px; font-size: 16px; }
.sh-h2 { font-size: 22px; margin: 0 0 18px; display: flex; align-items: center; gap: 12px; }
.sh-h2 .sh-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ink); color: var(--bg); font: 700 14px/1 var(--ff-body); }
.sh-muted { color: var(--muted); }
.sh-small { font-size: 13.5px; }
.sh-link { text-decoration: underline; text-underline-offset: 3px; }
.sh-link:hover { color: var(--accent); }

/* Pasos */
.sh-steps { display: flex; align-items: center; gap: 10px; margin: 0 0 30px; padding: 0; list-style: none; font-size: 14px; font-weight: 600; color: var(--muted); flex-wrap: wrap; }
.sh-steps li { display: flex; align-items: center; gap: 10px; }
.sh-steps li + li::before { content: ""; width: clamp(18px, 4vw, 48px); height: 1px; background: var(--line); }
.sh-steps b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line); font-size: 12.5px; }
.sh-steps .is-done { color: var(--ink-2); }
.sh-steps .is-done b { background: var(--ink-2); border-color: var(--ink-2); color: var(--bg); }
.sh-steps .is-on { color: var(--ink); }
.sh-steps .is-on b { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sh-steps a:hover { color: var(--accent); }

/* Rejilla principal + resumen fijo */
.sh-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.sh-aside { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 16px; }
.sh-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 2.6vw, 30px); }
.sh-card + .sh-card { margin-top: 18px; }
.sh-card-soft { background: var(--bg-2); border-color: transparent; }

/* Líneas del carrito */
.sh-lines { display: flex; flex-direction: column; }
.sh-line { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.sh-line:first-child { padding-top: 0; }
.sh-line-img { width: 104px; aspect-ratio: 1; border-radius: var(--radius-img); overflow: hidden; background: var(--bg-2); display: grid; place-items: center; color: var(--muted); }
.sh-line-img img { width: 100%; height: 100%; object-fit: cover; }
.sh-line-info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sh-line-info h3 { font-size: 18px; margin: 0; line-height: 1.25; }
.sh-line-info h3 a:hover { color: var(--accent); }
.sh-line-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--bg-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.sh-chip i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.sh-line-unit { font-size: 13.5px; color: var(--muted); }
.sh-line-acts { display: flex; align-items: center; gap: 14px; margin-top: 6px; flex-wrap: wrap; }
.sh-line-total { text-align: right; font-weight: 700; font-size: 17px; white-space: nowrap; }
.sh-remove { border: 0; background: none; padding: 0; color: var(--muted); font: 600 13px var(--ff-body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sh-remove:hover { color: #c0392b; }
.sh-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; background: var(--surface); }
.sh-qty button { width: 36px; height: 36px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-size: 17px; line-height: 1; }
.sh-qty button:hover { background: var(--bg-2); }
.sh-qty input { width: 38px; border: 0; text-align: center; font: 700 15px var(--ff-body); background: transparent; color: inherit; -moz-appearance: textfield; padding: 0; }
.sh-qty input::-webkit-inner-spin-button, .sh-qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sh-line.is-busy { opacity: .5; pointer-events: none; }

/* Resumen */
.sh-sum { display: flex; flex-direction: column; gap: 12px; }
.sh-sum h2 { font-size: 22px; margin: 0 0 6px; }
.sh-sum-row { display: flex; justify-content: space-between; gap: 14px; font-size: 15px; color: var(--ink-2); }
.sh-sum-row strong { color: var(--ink); font-weight: 600; white-space: nowrap; }
.sh-sum-row.is-disc strong { color: var(--ok); }
.sh-sum-total { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--line); font-size: 17px; font-weight: 700; }
.sh-sum-total strong { font: var(--fw-display, 600) 30px/1 var(--ff-display); letter-spacing: var(--ls-display, 0); }
.sh-sum-note { font-size: 12.5px; color: var(--muted); text-align: right; margin-top: -6px; }
.sh-sum .sb-btn { width: 100%; margin-top: 8px; }
.sh-mini { display: flex; flex-direction: column; gap: 12px; max-height: 320px; overflow-y: auto; padding-right: 4px; margin-bottom: 4px; }
.sh-mini-line { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 14px; }
.sh-mini-img { position: relative; width: 56px; height: 56px; border-radius: var(--radius-img); background: var(--bg-2); }
.sh-mini-img img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.sh-mini-img b { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--ink); color: var(--bg); font: 700 11px/20px var(--ff-body); text-align: center; }
.sh-mini-line span small { display: block; color: var(--muted); font-size: 12.5px; }
.sh-mini-line > strong { white-space: nowrap; }
.sh-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); vertical-align: -1px; margin-right: 4px; }

/* Cupón */
.sh-coupon summary { cursor: pointer; font-weight: 600; font-size: 14.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.sh-coupon summary::-webkit-details-marker { display: none; }
.sh-coupon summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); }
.sh-coupon[open] summary::after { content: "−"; }
.sh-coupon form { display: flex; gap: 8px; margin-top: 12px; }
.sh-coupon input { flex: 1; min-width: 0; text-transform: uppercase; }
.sh-coupon .sb-btn { min-height: 48px; padding: 0 18px; }
.sh-coupon-ok { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.sh-coupon-ok b { color: var(--ok); }

/* Mensajes */
.sh-msg { padding: 14px 16px; border-radius: var(--radius); font-size: 14.5px; line-height: 1.5; border: 1px solid transparent; }
.sh-msg-ok { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.sh-msg-err { background: color-mix(in srgb, #c0392b 10%, var(--surface)); border-color: color-mix(in srgb, #c0392b 28%, transparent); color: var(--ink); }
.sh-msg-info { background: var(--bg-2); }
.sh-msg + .sh-msg, .sh-msg + form, .sh-msg + .sh-card { margin-top: 14px; }
.sh-msg ul { margin: 6px 0 0; padding-left: 18px; }

/* Ventajas */
.sh-trust { display: grid; gap: 12px; padding: 4px 2px; }
.sh-trust li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.sh-trust .sb-ico { width: 20px; height: 20px; flex: none; color: var(--accent); margin-top: 1px; }
.sh-trust strong { color: var(--ink); display: block; }
ul.sh-trust { list-style: none; margin: 0; }

/* Formulario de pago */
.sh-section { padding: clamp(22px, 2.6vw, 30px) 0; border-bottom: 1px solid var(--line); }
.sh-section:first-child { padding-top: 0; }
.sh-section:last-child { border-bottom: 0; }
.sh-form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 16px; }
.sh-form-grid .sb-field { grid-column: span 3; }
.sh-form-grid .sb-field.c-2 { grid-column: span 2; }
.sh-form-grid .sb-field.c-4 { grid-column: span 4; }
.sh-form-grid .sb-field.c-6 { grid-column: 1 / -1; }
.sb-field .sh-err-txt { color: #c0392b; font-weight: 600; font-size: 12.5px; }
.sb-field.has-err input, .sb-field.has-err select, .sb-field.has-err textarea { border-color: #c0392b; }
.sh-hint { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.sh-who { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--radius); background: var(--bg-2); font-size: 14.5px; margin-bottom: 18px; }
.sh-toggle { margin-top: 16px; }
.sh-toggle-body { margin-top: 14px; }
.sh-toggle-body[hidden] { display: none; }

/* Opciones (envío y pago) */
.sh-opts { display: grid; gap: 10px; }
.sh-opt { position: relative; display: block; cursor: pointer; }
.sh-opt > input { position: absolute; opacity: 0; pointer-events: none; }
.sh-opt-in { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s, background .2s, box-shadow .2s; }
.sh-opt-in::before { content: ""; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); box-shadow: inset 0 0 0 4px var(--surface); transition: background .2s, border-color .2s; }
.sh-opt:hover .sh-opt-in { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.sh-opt > input:checked + .sh-opt-in { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.sh-opt > input:checked + .sh-opt-in::before { background: var(--accent); border-color: var(--accent); }
.sh-opt > input:focus-visible + .sh-opt-in { outline: 2px solid var(--accent); outline-offset: 2px; }
.sh-opt-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sh-opt-txt strong { font-size: 15.5px; }
.sh-opt-txt span { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.sh-opt-price { font-weight: 700; white-space: nowrap; }
.sh-opt-price.is-free { color: var(--ok); }
.sh-opt-ico { display: flex; gap: 6px; align-items: center; color: var(--muted); }
.sh-opt-ico .sb-ico { width: 22px; height: 22px; }
.sh-pay-logos { display: inline-flex; gap: 6px; margin-left: 6px; vertical-align: middle; }
.sh-pay-logos span { font: 700 10.5px/1 var(--ff-body); letter-spacing: .04em; padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-2); background: var(--surface); }
.sh-submit { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.sh-submit .sb-btn { width: 100%; min-height: 58px; font-size: 17px; }
.sh-secure { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--muted); }
.sh-secure .sb-ico { width: 16px; height: 16px; }

/* Acceso y registro */
.sh-auth { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: clamp(32px, 6vw, 90px); align-items: center; }
.sh-auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 3.4vw, 40px); }
.sh-auth-card h1 { font-size: clamp(30px, 3.4vw, 40px); margin: 0 0 8px; }
.sh-auth-card .sb-form { margin-top: 22px; }
.sh-auth-card .sb-btn { width: 100%; }
.sh-auth-alt { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); text-align: center; }
.sh-auth-side { display: flex; flex-direction: column; gap: 22px; }
.sh-auth-side h2 { font-size: clamp(28px, 3vw, 40px); margin: 0; }
.sh-auth-img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-2); }
.sh-auth-img img { width: 100%; height: 100%; object-fit: cover; }
.sh-pass { position: relative; }
.sh-pass input { padding-right: 52px; }
.sh-pass button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 50%; }
.sh-pass button:hover { color: var(--ink); background: var(--bg-2); }
.sh-pass button .sb-ico { width: 19px; height: 19px; }
.sh-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }

/* Cuenta del cliente */
.sh-account { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.sh-acc-nav { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 4px; }
.sh-acc-hello { padding: 0 14px 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.sh-acc-hello strong { display: block; font: var(--fw-display, 600) 22px/1.2 var(--ff-display); }
.sh-acc-hello span { font-size: 13px; color: var(--muted); word-break: break-all; }
.sh-acc-nav a, .sh-acc-nav button { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius); font: 600 15px var(--ff-body); color: var(--ink-2); border: 0; background: none; cursor: pointer; text-align: left; width: 100%; }
.sh-acc-nav a:hover, .sh-acc-nav button:hover { background: var(--bg-2); color: var(--ink); }
.sh-acc-nav a.is-on { background: var(--bg-2); color: var(--ink); }
.sh-acc-nav .sb-ico { width: 19px; height: 19px; }
.sh-acc-nav form { margin: 0; }

/* Pedidos */
.sh-orders { display: flex; flex-direction: column; gap: 14px; }
.sh-order { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
.sh-order:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.sh-order-imgs { display: flex; }
.sh-order-imgs span { width: 54px; height: 54px; border-radius: var(--radius-img); overflow: hidden; background: var(--bg-2); border: 2px solid var(--surface); }
.sh-order-imgs span + span { margin-left: -16px; }
.sh-order-imgs img { width: 100%; height: 100%; object-fit: cover; }
.sh-order-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sh-order-main strong { font-size: 16px; }
.sh-order-main span { font-size: 13.5px; color: var(--muted); }
.sh-order-side { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.sh-order-side strong { font-size: 17px; }
.sh-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font: 700 12px/1 var(--ff-body); letter-spacing: .02em; white-space: nowrap; }
.sh-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sh-badge-wait { background: color-mix(in srgb, #d4880f 15%, var(--surface)); color: #a1660a; }
.sh-badge-proc { background: color-mix(in srgb, #2f6fbf 13%, var(--surface)); color: #2f6fbf; }
.sh-badge-ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); }
.sh-badge-err { background: color-mix(in srgb, #c0392b 12%, var(--surface)); color: #c0392b; }
.tema-showroom .sh-badge-wait { color: #f0b04a; }
.tema-showroom .sh-badge-proc { color: #7fb0ee; }

/* Seguimiento */
.sh-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 4px 0 6px; list-style: none; padding: 0; }
.sh-track li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.sh-track li::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.sh-track li:first-child::before { display: none; }
.sh-track b { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); }
.sh-track b .sb-ico { width: 16px; height: 16px; }
.sh-track small { font-weight: 500; font-size: 12px; }
.sh-track .is-done { color: var(--ink); }
.sh-track .is-done::before { background: var(--accent); }
.sh-track .is-done b { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.sh-kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; font-size: 14.5px; margin: 0; }
.sh-kv dt { color: var(--muted); }
.sh-kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.sh-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sh-pay-box { display: flex; flex-direction: column; gap: 14px; }
.sh-pay-box .sh-kv dd { font-family: ui-monospace, Consolas, monospace; font-size: 15px; }
.sh-copy { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 6px; font: 600 12px var(--ff-body); padding: 3px 8px; margin-left: 8px; cursor: pointer; }
.sh-copy:hover { color: var(--accent); border-color: var(--accent); }

/* Opiniones */
.sh-stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.sh-stars input { position: absolute; opacity: 0; pointer-events: none; }
.sh-stars label { cursor: pointer; color: var(--line); font-size: 26px; line-height: 1; transition: color .15s; }
.sh-stars label:hover, .sh-stars label:hover ~ label, .sh-stars input:checked ~ label { color: #e2a52a; }
.sh-review { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; margin-top: 12px; border-top: 1px dashed var(--line); }
.sh-review textarea { min-height: 80px; }
.sh-review-done { color: #e2a52a; letter-spacing: 2px; }

/* Confirmación */
.sh-done { text-align: center; max-width: 640px; margin: 0 auto 30px; }
.sh-done-ico { width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); }
.sh-done-ico.is-wait { background: color-mix(in srgb, #d4880f 15%, var(--surface)); color: #c07a0c; }
.sh-done-ico .sb-ico { width: 36px; height: 36px; }
.sh-done h1 { font-size: clamp(32px, 4.6vw, 52px); margin: 0 0 10px; }
.sh-done p { color: var(--ink-2); font-size: 17px; margin: 0; }
.sh-ref { display: inline-block; margin-top: 16px; padding: 8px 16px; border-radius: 99px; background: var(--bg-2); font-weight: 700; letter-spacing: .04em; }

/* Vacío */
.sh-empty { text-align: center; padding: clamp(40px, 7vw, 80px) 20px; max-width: 560px; margin: 0 auto; }
.sh-empty-ico { width: 84px; height: 84px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--accent); }
.sh-empty-ico .sb-ico { width: 38px; height: 38px; }
.sh-empty h1, .sh-empty h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 0 0 10px; }
.sh-empty p { color: var(--ink-2); margin: 0 0 24px; }
.sh-empty .sb-ctas, .sh-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 1020px) {
  .sh-grid { grid-template-columns: 1fr; }
  .sh-aside { position: static; }
  .sh-auth { grid-template-columns: 1fr; }
  .sh-auth-side { display: none; }
  .sh-auth-card { max-width: 520px; margin: 0 auto; width: 100%; }
  .sh-account { grid-template-columns: 1fr; }
  .sh-acc-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .sh-acc-hello { width: 100%; padding: 0 0 12px; }
  .sh-acc-nav a, .sh-acc-nav button { width: auto; padding: 9px 14px; background: var(--bg-2); font-size: 14px; }
}
@media (max-width: 640px) {
  .sh-line { grid-template-columns: 78px minmax(0, 1fr); gap: 14px; }
  .sh-line-img { width: 78px; }
  .sh-line-total { grid-column: 2; text-align: left; }
  .sh-form-grid .sb-field, .sh-form-grid .sb-field.c-2, .sh-form-grid .sb-field.c-4 { grid-column: 1 / -1; }
  .sh-form-grid .sb-field.c-half { grid-column: span 3; }
  .sh-order { grid-template-columns: minmax(0, 1fr) auto; }
  .sh-order-imgs { display: none; }
  .sh-cols { grid-template-columns: 1fr; }
  .sh-kv { grid-template-columns: 1fr; gap: 2px; }
  .sh-kv dd { margin-bottom: 8px; }
  .sh-steps { font-size: 0; gap: 6px; }
  .sh-steps .is-on { font-size: 14px; }
}
