/* Tienda pública: componentes propios de la plataforma sobre el template activo (/tema/…/css/styles.css).
   Usa las variables del template (--navy, --orange, --teal, --cream…) con valores de respaldo. */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sandbox-bar { background: var(--orange, #FF7A2F); color: var(--navy, #0B3D6E); text-align: center; font-weight: 800; font-size: 13px; padding: 6px 16px; }
.preview-bar { background: var(--navy, #0B3D6E); color: var(--cream, #FFF4E6); font-size: 13px; padding: 8px 16px; display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }
.preview-bar form { margin: 0; }
.preview-bar button { background: none; border: 1px solid currentColor; color: inherit; border-radius: 8px; padding: 2px 10px; font-weight: 700; }
.preview-banner { border: 2px dashed var(--teal, #00A896); background: var(--white, #fff); border-radius: 14px; padding: 14px 18px; margin: 0 0 24px; font-size: 14px; }
.preview-banner strong { display: block; font-size: 16px; }

/* Mensajes del servidor */
.flashes { display: grid; gap: 10px; margin-top: 20px; }
.flash { padding: 12px 16px; border-radius: 12px; background: var(--white, #fff); border: 1px solid var(--line, #D4DEE4); border-left: 4px solid var(--teal, #00A896); font-weight: 700; font-size: 15px; }
.flash.error { border-left-color: var(--error, #B42318); color: var(--error, #B42318); }
.flash.warn { border-left-color: var(--orange, #FF7A2F); }
.flash a { color: inherit; }

/* Navegación de cuenta en el encabezado */
.navigation .nav-account { font-weight: 800; }
.navigation form { margin: 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-weight: 800; color: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; min-height: 44px; }

/* Logos de comercio (imagen propia o iniciales cuando no tiene) */
img.store-logo { object-fit: contain; background: var(--white, #fff); border: 1px solid var(--line, #D4DEE4); padding: 6px; }
img.seller-dot { object-fit: contain; background: var(--white, #fff); border: 1px solid var(--line, #D4DEE4); }
.store-banner img.store-logo { border: 0; }

/* Tarjetas y ficha */
.art-empty { display: grid; place-items: center; width: 100%; aspect-ratio: 1.5; color: var(--muted, #526677); font-size: 13px; font-weight: 700; }
.product-art .badge.mode { left: auto; right: 12px; background: var(--cream, #FFF4E6); }
.product-art .badge.neutral { color: var(--navy, #0B3D6E); }
.badge.sold { background: var(--navy, #0B3D6E); color: var(--cream, #FFF4E6); }
.price-note { font-size: 12px; color: var(--muted, #526677); margin: -10px 0 14px; }
.detail-media { min-width: 0; }
.detail-photo .art-empty { aspect-ratio: 1.2; }
.product-thumbs { list-style: none; padding: 0; margin: 12px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.product-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; background: none; }
.product-thumbs button[aria-pressed=true] { border-color: var(--navy, #0B3D6E); }
.product-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.buy-panel { background: var(--white, #fff); border: 1px solid var(--line, #D4DEE4); border-radius: var(--radius, 18px); padding: 22px; margin: 20px 0; }
.buy-panel .price { margin: 0 0 6px; }
.buy-panel .btn { width: 100%; }
.buy-panel fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.buy-panel legend { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.radio-label { display: flex; gap: 10px; align-items: center; font-weight: 600; margin: 6px 0; }
.radio-label input { width: 18px; height: 18px; min-height: 18px; accent-color: var(--navy, #0B3D6E); }
.auction-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.auction-head p { margin: 0; }
.countdown { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.prose { white-space: pre-line; overflow-wrap: anywhere; }
.ok-text { color: #136B4A; font-weight: 800; }
.warn-text { color: #8F3D0B; font-weight: 800; }
.hint { display: block; font-size: 12px; font-weight: 400; color: var(--muted, #526677); margin-top: 6px; }
details summary { cursor: pointer; font-weight: 700; }
.timeline { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.timeline li { border-left: 2px solid var(--line, #D4DEE4); padding-left: 12px; font-size: 14px; }
.contact-section textarea { margin-bottom: 4px; }
.contact-section .btn { margin-top: 8px; }

/* Paginación */
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 28px; flex-wrap: wrap; }
.pager .muted { font-size: 14px; }

/* Cuentas, compras y formularios de la plataforma */
.page-block { padding: 40px 0 8px; }
.page-title { font-size: clamp(2rem, 3.4vw, 2.8rem); margin-bottom: 24px; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.bar h1 { margin: 0; }
.stack { display: grid; gap: 16px; }
.stack-tight { display: grid; gap: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { background: var(--white, #fff); border: 1px solid var(--line, #D4DEE4); border-radius: var(--radius, 18px); padding: 24px; }
.panel h2, .account-block h2 { font-size: 22px; margin-bottom: 12px; }
.callout { background: var(--cream, #FFF4E6); border-radius: 12px; padding: 16px; }
.plain { border: 0; padding: 0; margin: 0; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.check input { width: 18px; height: 18px; min-height: 18px; accent-color: var(--navy, #0B3D6E); }
.stack label:not(.check):not(.radio-label), .login-box label { display: grid; gap: 6px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn.danger { background: var(--white, #fff); color: var(--error, #B42318); border-color: var(--error, #B42318); }
.auth { display: grid; place-items: center; padding: 40px 0; }
.login-box { width: min(100%, 460px); background: var(--white, #fff); border: 1px solid var(--line, #D4DEE4); border-radius: var(--radius-lg, 28px); padding: 32px; display: grid; gap: 16px; }
.login-box h1 { font-size: 34px; margin: 0; }
.login-box p { margin: 0; }
.account-block { margin-bottom: 32px; }
.table-wrap { overflow-x: auto; background: var(--white, #fff); border: 1px solid var(--line, #D4DEE4); border-radius: 14px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th, table.grid td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line, #D4DEE4); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted, #526677); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.status-pill { display: inline-flex; padding: 3px 10px; border-radius: 999px; background: var(--gray, #E5EAF0); font-weight: 800; font-size: 12px; }
.status-pill.pending { background: var(--orange, #FF7A2F); color: var(--navy, #0B3D6E); }
.status-pill.connected { background: var(--teal-soft, #CCEEE9); color: var(--navy, #0B3D6E); }
.order-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.order-item { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.order-item .thumb, .order-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted, #526677); font-size: 14px; }
.facts dd { margin: 0; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-card .btn[type=submit] { width: 100%; }
[aria-busy=true] { opacity: .7; cursor: progress; }

@media (max-width: 820px) {
  .order-layout, .two { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .login-box, .panel { padding: 20px; }
  .auction-head { flex-direction: column; }
}
