/* Zona privada (cuenta, inscripción, cuotas) y tienda. Usa los tokens de tokens.css; esquinas rectas, rojo para acción, dorado solo en filetes. */

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.req { color: var(--red); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.link-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--red); font: 600 .8125rem var(--font); text-decoration: underline; cursor: pointer; }

/* Campo de contraseña con botón para verla */
.pw { position: relative; display: block; }
.pw > input { padding-right: 3.25rem; }
.pw-toggle { position: absolute; top: 0; right: 0; bottom: 0; width: 3rem; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.pw-toggle:hover { color: var(--ink); }
.pw-toggle:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; color: var(--ink); }

/* Formularios */
.field label > span { display: block; margin-bottom: .375rem; font: 700 .75rem/1.3 var(--font); letter-spacing: .08em; text-transform: uppercase; }
.field .help, .field .err { display: block; margin-top: .3rem; font-size: var(--fs-small); }
.field .help { color: var(--muted); }
.field .err { color: var(--red-deep); font-weight: 600; }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--red); border-width: 2px; }
.field select { appearance: auto; }
.check { display: flex; gap: .65rem; align-items: flex-start; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: .1rem; accent-color: var(--red); flex: none; }
.form-msg--success { border-left-color: #1d7a3e; }
.form-msg--error { border-left-color: var(--red); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s3); }
@media (max-width: 699px) { .grid-2 { grid-template-columns: 1fr; } }
fieldset { min-width: 0; margin: 0 0 var(--s3); }
legend { padding: 0; font: 800 1.125rem/1.2 var(--font); font-stretch: 80%; text-transform: uppercase; letter-spacing: .02em; }
legend small { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }

/* Acceso */
.auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); align-items: start; }
.auth-card { padding: var(--s4); background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--red); }
.auth-card--wide { max-width: 40rem; }
.auth-card--alt { background: var(--paper-2); border-top-color: var(--gold); }
.auth-card h2 { margin-bottom: var(--s2); }
.auth-card .btn { margin-top: var(--s1); }
.auth-alt { margin: var(--s2) 0 0; font-size: var(--fs-small); }
@media (max-width: 799px) { .auth-grid { grid-template-columns: 1fr; } .auth-card { padding: var(--s3); } }

/* Cuenta */
.account-nav { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; margin-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.account-nav a, .account-nav button { padding: .8rem 1rem; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--text); font: 700 .8125rem var(--font); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; text-decoration: none; }
.account-nav a:hover, .account-nav button:hover { color: var(--red); }
.account-nav a[aria-current="page"] { border-bottom-color: var(--red); color: var(--red); }
.account-nav form { margin-left: auto; }
.alert-band { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s3); padding: var(--s2) var(--s3); background: var(--ink); color: var(--on-ink); border-left: 4px solid var(--gold); }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s3); }
.card { margin-bottom: var(--s3); padding: var(--s3); background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--ink); }
.account-grid .card, .card-grid .card { margin-bottom: 0; }
.card--wide { grid-column: 1 / -1; }
.card > header { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s2); }
.card > header h2, .card > header h3 { margin: 0; font-size: 1.25rem; }
.card > header h2 small { font-size: .875rem; font-weight: 500; color: var(--muted); }
.rows { margin: 0; padding: 0; list-style: none; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: .7rem 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows small { display: block; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .35rem var(--s2); margin: 0 0 var(--s2); font-size: .9375rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: var(--s1); margin: var(--s2) 0 0; }
.card-actions form { margin: 0; }
@media (max-width: 799px) { .account-grid { grid-template-columns: 1fr; } .account-nav form { margin-left: 0; } }

/* Estados */
.pill { display: inline-block; padding: .2rem .55rem; font: 700 .75rem/1.3 var(--font); letter-spacing: .06em; text-transform: uppercase; background: var(--paper-2); color: var(--text); border: 1px solid var(--line); }
.pill--ok { background: #e6f4ea; color: #14632f; border-color: #b5dcc2; }
.pill--gold { background: #fbf3d9; color: #6b5210; border-color: #e5d28f; }
.pill--red { background: #fde8e8; color: #9b1c1c; border-color: #f2b4b4; }
.pill--info { background: #e7eefb; color: #1e4a99; border-color: #b9ccef; }
.dot { display: inline-block; width: 10px; height: 10px; margin-right: .4rem; border-radius: 50%; background: #9a9aa4; vertical-align: baseline; }
.dot--ok { background: #1d9c4a; } .dot--gold { background: #e0a800; } .dot--red { background: var(--red); }

/* Tablas */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.tbl th, .tbl td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tbl th { font: 700 .75rem var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.is-due td { background: #fff8e6; }
.tbl tr.total td { border-bottom: 0; font-size: 1.0625rem; }
.tbl input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--red); }
.pay-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--line); }

/* Inscripción */
.plan-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); margin-bottom: var(--s2); }
.plan { display: flex; gap: .75rem; align-items: flex-start; padding: var(--s2); border: 2px solid var(--line); cursor: pointer; background: var(--paper); }
.plan:has(input:checked) { border-color: var(--red); background: #fff5f5; }
.plan input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--red); }
.plan small { display: block; margin-top: .2rem; color: var(--muted); }
.plan-summary { padding: var(--s2); background: var(--paper-2); border-left: 4px solid var(--gold); font-weight: 600; }
@media (max-width: 699px) { .plan-choice { grid-template-columns: 1fr; } }

/* ===================== Tienda ===================== */
.shop-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s3); padding-bottom: var(--s2); border-bottom: 1px solid var(--line); font-size: var(--fs-small); color: var(--muted); }
.shop-bar form { margin: 0; }
.shop-bar select { min-height: var(--tap); padding: 0 var(--s2); border: 1px solid #8c8c94; background: var(--paper); color: var(--text); font: inherit; font-weight: 600; border-radius: 0; cursor: pointer; }
.shop-bar select:focus-visible { outline: 3px solid var(--gold); }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.product { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); transition: box-shadow .25s, transform .25s, border-color .25s; }
.product::before { content: ''; position: absolute; z-index: 2; inset: -1px -1px auto -1px; height: 3px; background: var(--red); }
.product:hover, .product:focus-within { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #c4c4cb; }
.product-img { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: radial-gradient(circle at 50% 38%, #fff 0%, var(--paper-2) 78%); }
.product-img img { position: absolute; inset: 9%; width: 82%; height: 82%; object-fit: contain; transition: transform .45s cubic-bezier(.2, .7, .2, 1), opacity .35s ease; }
.product-img:not(:has(img))::before { content: ''; position: absolute; inset: 26%; background: url(../img/escut.png) center / contain no-repeat; opacity: .2; }  /* producto sin foto: escudo tenue */
.product-img .is-alt { opacity: 0; }
@media (hover: hover) {
  .product:hover .product-img img:first-child { transform: scale(1.05); }
  .product:hover .product-img.has-alt img:first-child { opacity: 0; }
  .product:hover .product-img .is-alt { opacity: 1; transform: scale(1.05); }
}
.product-dots { position: absolute; left: 0; right: 0; bottom: .7rem; z-index: 1; display: flex; justify-content: center; gap: .3rem; pointer-events: none; }
.product-dots i { width: 7px; height: 7px; border-radius: 50%; background: #b9b9c1; }
.product-dots i:first-child { background: var(--red); }
.product-info { display: flex; flex: 1; flex-direction: column; gap: .4rem; padding: var(--s2) var(--s2) 0; }
.product h2 { margin: 0; font-size: 1.0625rem; line-height: 1.2; font-stretch: 80%; text-transform: uppercase; }
.product h2 a { color: inherit; text-decoration: none; }
.product h2 a:hover { color: var(--red); }
.product .price { color: var(--red); font-size: 1.375rem; font-weight: 800; line-height: 1; }
.product form { display: contents; }
.product .btn { margin: var(--s2); }

/* Ficha de producto */
.product-page { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.pgal { position: sticky; top: calc(var(--header-h) + var(--s2)); min-width: 0; }
.pgal-stage { position: relative; aspect-ratio: 1; overflow: hidden; background: radial-gradient(circle at 50% 38%, #fff 0%, var(--paper-2) 78%); border-top: 3px solid var(--red); cursor: zoom-in; touch-action: pan-y; }
.pgal-stage img { position: absolute; inset: 7%; width: 86%; height: 86%; object-fit: contain; transition: opacity .22s ease, transform .4s cubic-bezier(.2, .7, .2, 1); user-select: none; -webkit-user-drag: none; }
.pgal-stage:hover img { transform: scale(1.03); }
.pgal-stage img.is-fading { opacity: 0; }
.pgal-stage:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.pgal-nav { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .94); color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .2); cursor: pointer; transition: background-color .15s, color .15s, transform .15s; }
.pgal-nav:hover { background: var(--red); color: #fff; }
.pgal-nav:active { transform: scale(.94); }
.pgal-nav svg { width: 14px; height: 14px; fill: currentColor; }
.pgal-prev { left: .75rem; }
.pgal-prev svg { transform: rotate(180deg); }
.pgal-next { right: .75rem; }
.pgal-count { position: absolute; left: .75rem; top: .75rem; z-index: 2; padding: .25rem .6rem; background: var(--ink); color: var(--on-ink); font: 700 .75rem/1.4 var(--font); letter-spacing: .08em; }
.pgal-thumbs { display: flex; gap: .6rem; margin: .75rem 0 0; padding: 0 0 .25rem; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; }
.pgal-thumbs li { flex: none; scroll-snap-align: start; }
.pgal-thumbs button, .pgal-thumbs a { display: block; width: 78px; aspect-ratio: 1; padding: 0; border: 2px solid var(--line); background: radial-gradient(circle at 50% 38%, #fff 0%, var(--paper-2) 80%); cursor: pointer; opacity: .75; transition: border-color .15s, opacity .15s; }
.pgal-thumbs img { display: block; width: 100%; height: 100%; padding: 6px; object-fit: contain; }
.pgal-thumbs button:hover, .pgal-thumbs a:hover { opacity: 1; border-color: #9a9aa4; }
.pgal-thumbs [aria-current="true"] { opacity: 1; border-color: var(--red); }
.pgal-thumbs button:focus-visible, .pgal-thumbs a:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }

/* Visor ampliado */
.lb { position: fixed; inset: 0; z-index: calc(var(--z-modal) + 5); display: grid; place-items: center; background: rgba(12, 12, 12, .94); }
.lb[hidden] { display: none; }
.lb-frame { display: grid; place-items: center; max-width: min(92vw, 1100px); max-height: 82dvh; padding: clamp(.5rem, 2vmin, 1.25rem); background: #fff; }
.lb-frame img { width: min(88vw, 720px); height: min(74dvh, 720px); object-fit: contain; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; transition: background-color .15s; }
.lb-btn:hover { background: var(--red); }
.lb-btn svg { width: 16px; height: 16px; fill: currentColor; }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev, .lb-next { top: 50%; margin-top: -24px; }
.lb-prev { left: 1rem; }
.lb-prev svg { transform: rotate(180deg); }
.lb-next { right: 1rem; }
.lb-count { position: absolute; bottom: 1rem; left: 0; right: 0; text-align: center; color: #d8d8de; font: 700 .8125rem var(--font); letter-spacing: .1em; }

.product-buy .price { margin: 0 0 var(--s2); color: var(--red); font-size: 2.5rem; font-weight: 900; line-height: 1; }
.product-buy .prose { margin: 0 0 var(--s3); color: var(--muted); font-size: 1.0625rem; line-height: 1.65; }
.sizes { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--s3); border: 0; padding: 0; }
.sizes legend { width: 100%; margin-bottom: .5rem; font: 700 .75rem var(--font); letter-spacing: .08em; text-transform: uppercase; }
.size { position: relative; }
.size input { position: absolute; opacity: 0; }
.size span { display: grid; place-items: center; min-width: 52px; height: 52px; padding: 0 .6rem; border: 2px solid var(--line); background: var(--paper); font-weight: 700; cursor: pointer; transition: border-color .15s, background-color .15s, color .15s; }
.size:hover span { border-color: var(--ink); }
.size input:checked + span { border-color: var(--red); background: var(--red); color: #fff; }
.size input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid #8c8c94; background: var(--paper); }
.field > .stepper { display: inline-flex; margin-bottom: 0; }  /* base.css fija .field > span en bloque y deshacía el flex: los botones − y + quedaban a 22 px */
.stepper button { width: 44px; border: 0; background: var(--paper-2); color: var(--ink); font: 700 1.25rem/1 var(--font); cursor: pointer; transition: background-color .15s, color .15s; }
.stepper button:hover { background: var(--ink); color: #fff; }
.stepper input { width: 52px; min-height: 44px; padding: 0; border: 0; border-inline: 1px solid var(--line); text-align: center; font: 700 1rem var(--font); -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.product-buy .stepper { margin-bottom: var(--s3); }
.product-buy .field:has(.stepper) { margin-bottom: 0; }
.product-buy form > .btn { width: 100%; min-height: 56px; font-size: .875rem; }
.assure { display: grid; gap: .55rem; margin: var(--s3) 0 0; padding: var(--s2) 0 0; border-top: 1px solid var(--line); list-style: none; font-size: var(--fs-small); color: var(--muted); }
.assure li { display: flex; gap: .55rem; align-items: baseline; }
.assure li::before { content: ''; flex: none; width: 8px; height: 8px; margin-top: .3rem; background: var(--gold); transform: rotate(45deg); }

/* Cistella y checkout */
.cart-page { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s4); align-items: start; }
.cart-lines { display: grid; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.cart-line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: var(--s2); background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--ink); transition: border-color .2s, box-shadow .2s; }
.cart-line:hover { border-left-color: var(--red); box-shadow: 0 6px 18px rgba(18, 18, 18, .08); }
.cart-line.is-off { opacity: .5; }
.cart-thumb { display: block; aspect-ratio: 1; background: radial-gradient(circle at 50% 38%, #fff 0%, var(--paper-2) 80%); }
.cart-thumb img { width: 100%; height: 100%; padding: 8px; object-fit: contain; }
.cart-info { min-width: 0; }
.cart-info strong { display: block; font-size: 1.0625rem; line-height: 1.2; font-stretch: 80%; text-transform: uppercase; }
.cart-info small { display: block; margin-top: .15rem; color: var(--muted); }
.cart-sum { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; font-size: 1.125rem; font-weight: 800; white-space: nowrap; }
.cart-sum form { margin: 0; }
.cart-sum .link-btn { font-size: .75rem; font-weight: 600; color: var(--muted); text-decoration: underline; }
.cart-sum .link-btn:hover { color: var(--red); }
.qty { display: flex; gap: .6rem; align-items: center; margin: .6rem 0 0; }
.qty .stepper button { width: 44px; }
.qty .stepper input { width: 44px; min-height: 44px; }
.qty > input { width: 64px; min-height: 44px; padding: 0 .4rem; border: 1px solid #8c8c94; font: inherit; }
.js .qty .link-btn { display: none; }
.cart-lines--mini { gap: 0; }
.cart-lines--mini li { display: flex; justify-content: space-between; gap: var(--s2); padding: .55rem 0; border-bottom: 1px solid var(--line); }
.cart-summary { position: sticky; top: calc(var(--header-h) + var(--s2)); padding-top: 0; border-top: 0; }
.cart-summary > h2 { margin: 0 calc(-1 * var(--s3)) var(--s2); padding: var(--s2) var(--s3); background: var(--ink); color: var(--on-ink); border-top: 3px solid var(--red); font-size: 1.0625rem; letter-spacing: .04em; text-transform: uppercase; }
.cart-summary .btn { width: 100%; margin-top: var(--s1); }
.cart-total { display: flex; justify-content: space-between; gap: var(--s2); margin: .5rem 0; }
.cart-total--big { margin-top: var(--s2); padding-top: .75rem; border-top: 2px solid var(--ink); font-size: 1.375rem; }
.cart-total--big strong { color: var(--red); }
.cart-empty { display: grid; justify-items: center; gap: var(--s2); padding: var(--s6) var(--s3); background: var(--paper-2); border: 1px dashed #b4b4bc; text-align: center; }
.cart-empty p { margin: 0; font-size: var(--fs-lede); font-weight: 700; }
.cart-empty-ico { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line); color: var(--muted); }
.cart-empty-ico svg { width: 34px; height: 34px; fill: currentColor; }
.plan { transition: border-color .15s, background-color .15s, box-shadow .15s; }
.plan:hover { border-color: #9a9aa4; }

/* Cesta lateral */
.drawer-scrim { position: fixed; inset: 0; z-index: calc(var(--z-modal) - 1); background: rgba(18, 18, 18, .55); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--z-modal); display: flex; flex-direction: column; width: min(440px, 100vw); background: var(--paper); box-shadow: var(--shadow); }
.drawer[hidden], .drawer-scrim[hidden] { display: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: var(--s2) var(--s3); background: var(--ink); color: var(--on-ink); border-top: 4px solid var(--red); }
.drawer-head h2 { margin: 0; font-size: 1.125rem; text-transform: uppercase; letter-spacing: .04em; }
.drawer-head .tool { color: var(--on-ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--s2) var(--s3) var(--s3); }
.drawer-foot { position: sticky; bottom: calc(-1 * var(--s3)); margin: var(--s2) calc(-1 * var(--s3)) calc(-1 * var(--s3)); padding: var(--s2) var(--s3) var(--s3); background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -8px 18px rgba(18, 18, 18, .06); }
.drawer-foot .btn { width: 100%; margin-top: var(--s1); }
.drawer .cart-lines { gap: 0; }
.drawer .cart-line { grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--s2); padding: var(--s2) 0; background: none; border: 0; border-bottom: 1px solid var(--line); }
.drawer .cart-line:hover { box-shadow: none; }
.drawer .cart-info strong { font-size: .9375rem; }
.drawer .cart-sum { font-size: 1rem; }
.cart-empty-msg { padding: var(--s3) 0; font-weight: 700; }

@media (max-width: 1099px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) {
  .cart-page { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}
@media (max-width: 799px) {
  .product-page { grid-template-columns: 1fr; gap: var(--s3); }
  .pgal { position: static; }
  .pgal-thumbs button, .pgal-thumbs a { width: 64px; }
  .product-buy .price { font-size: 2rem; }
}
@media (max-width: 599px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
  .product-info { padding: var(--s1) var(--s1) 0; }
  .product .btn { margin: var(--s1); min-height: 44px; padding: 0 var(--s1); font-size: .75rem; }
  .product .price { font-size: 1.125rem; }
  .cart-line { grid-template-columns: 72px minmax(0, 1fr); }
  .cart-sum { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; padding-top: var(--s1); border-top: 1px solid var(--line); }
  .lb-prev, .lb-next { top: auto; bottom: 1rem; margin-top: 0; }
  .lb-count { bottom: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .product, .product-img img, .pgal-stage img { transition: none; }
  .product:hover { transform: none; }
}

/* El selector de cantidad dentro de .field no debe heredar el 100 % de ancho de los campos de formulario */
.field .stepper input { width: 52px; min-height: 44px; padding: 0; border: 0; border-inline: 1px solid var(--line); }
.qty .field .stepper input, .qty .stepper input { width: 44px; min-height: 44px; }

/* Estoc */
.stock-tag { position: absolute; left: 0; top: 14px; z-index: 2; padding: .3rem .7rem .3rem .6rem; font: 800 .75rem/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; }
.stock-tag--out { background: var(--ink); color: var(--on-ink); }
.stock-tag--low { background: var(--gold); color: var(--on-gold); }
/* Agotado: foto en color y algo atenuada. La segunda foto (la del cambio al pasar el ratón) se queda oculta; antes esta regla la dejaba visible
   al 50 % encima de la primera y se veían dos prendas superpuestas. */
.product.is-out .product-img img:first-child { opacity: .72; }
.product.is-out .product-img .is-alt, .product.is-out:hover .product-img .is-alt { opacity: 0; transform: none; }
.product.is-out:hover .product-img img:first-child { opacity: .72; transform: none; }
.product.is-out .product-dots { display: none; }
.product.is-out:hover { transform: none; box-shadow: none; }
.btn--off { background: var(--paper-2); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.btn--off:hover { background: var(--paper-2); color: var(--muted); }
.stock { display: flex; align-items: center; gap: .5rem; margin: 0 0 var(--s2); font-size: var(--fs-small); font-weight: 700; }
.stock::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #9a9aa4; }
.stock--ok { color: #14632f; } .stock--ok::before { background: #1d9c4a; }
.stock--low { color: #8a5a00; } .stock--low::before { background: #e0a800; }
.stock--out { color: var(--red-deep); } .stock--out::before { background: var(--red); }
.size.is-out span { color: #a3a3ab; background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(18, 18, 18, .07) 7px 8px); text-decoration: line-through; cursor: not-allowed; border-style: dashed; }
.size.is-out:hover span { border-color: var(--line); }
.stock-warn { color: var(--red-deep) !important; font-weight: 700; }
.product-buy .btn:disabled { background: var(--paper-2); border-color: var(--line); color: var(--muted); }

/* Packs: etiqueta, preu antic, estalvi i les peces que inclouen (cada una amb la seva talla) */
.stock-tag--pack { background: var(--red); color: #fff; }
.price-was { margin-left: .35em; color: var(--muted); font-size: .62em; font-weight: 600; text-decoration: line-through; }
.pack-save { display: inline-block; margin: 0; color: #14632f; font-size: var(--fs-small); font-weight: 800; }
.product-info .pack-save { margin-top: -.1rem; }
.product-buy > .pack-save { margin: calc(var(--s1) * -1) 0 var(--s3); padding: .35rem .7rem; background: #e6f4ea; border-left: 4px solid #1d9c4a; }
.pack-title { margin: 0 0 var(--s2); font: 800 .75rem var(--font); letter-spacing: .08em; text-transform: uppercase; }
.pack-parts { display: grid; gap: var(--s2); margin: 0 0 var(--s3); padding: 0; list-style: none; }
.pack-part { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--s2); align-items: start; padding: var(--s2); background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--ink); }
.pack-thumb { display: block; aspect-ratio: 1; background: radial-gradient(circle at 50% 38%, #fff 0%, var(--paper-2) 80%); }
.pack-thumb img { width: 100%; height: 100%; padding: 6px; object-fit: contain; }
.pack-info { min-width: 0; }
.pack-info strong { display: block; margin-bottom: .45rem; font-size: 1rem; line-height: 1.2; font-stretch: 80%; text-transform: uppercase; }
.pack-info .stock { margin: 0; }
.sizes--part { margin: 0; }
.sizes--part legend { margin-bottom: .35rem; }
.sizes--part .size span { min-width: 44px; height: 44px; }
.cart-info small.cart-parts { color: var(--ink); font-size: var(--fs-small); line-height: 1.35; }
.cart-lines--mini small.cart-parts { display: block; margin-top: .1rem; color: var(--muted); }
.tbl tr.is-sub td { color: var(--muted); font-size: .9375rem; }

/* Botiga dividida en seccions: packs i productes solts */
.shop-jump { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 var(--s4); }
.shop-jump a { display: inline-flex; align-items: center; gap: .5rem; min-height: var(--tap); padding: 0 var(--s2); border: 2px solid var(--ink); font: 800 .8125rem var(--font); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--ink); transition: background-color .15s, color .15s; }
.shop-jump a:hover { background: var(--ink); color: #fff; }
.shop-jump a b { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .35rem; background: var(--red); color: #fff; font-size: .75rem; }
.shop-group + .shop-group { margin-top: var(--s5); }
.shop-group { scroll-margin-top: calc(var(--header-h) + var(--s2)); }
.shop-group-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem var(--s3); margin: 0 0 var(--s3); padding-left: var(--s2); border-left: 5px solid var(--red); }
.shop-group-head h2 { margin: 0; font-size: 1.75rem; line-height: 1.1; font-stretch: 76%; text-transform: uppercase; }
.shop-group-head h2 span { margin-left: .35rem; color: var(--muted); font-size: .55em; font-weight: 700; vertical-align: middle; }
.shop-group-head p { margin: 0; color: var(--muted); font-size: var(--fs-small); }

/* Pagament per transferència: dades que la família copia al banc */
.bank-data { display: grid; gap: var(--s2); margin: 0 0 var(--s3); }
.bank-data div { display: grid; gap: .15rem; padding: var(--s2); background: var(--paper); border-left: 4px solid var(--ink); }
.bank-data .is-key { border-left-color: var(--red); }
.bank-data dt { color: var(--muted); font: 800 .75rem var(--font); letter-spacing: .08em; text-transform: uppercase; }
.bank-data dd { margin: 0; font-size: 1.25rem; font-weight: 800; overflow-wrap: anywhere; user-select: all; }
.proof-form input[type="file"] { max-width: 100%; font-size: var(--fs-small); }
