/* Distrito ED · tienda pública: catálogo y página del carrito */
:root {
	--bg: #f6f6f4; --panel: #fff; --ink: #15161a; --muted: #6b6f76; --line: #e6e6e2;
	--acc: #e63946; --acc-txt: #fff; --r: 14px; --sombra: 0 10px 30px rgba(20, 22, 26, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.01em; }

/* ── Cabecera ── */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
	display: grid; grid-template-columns: auto 1fr; grid-template-areas: "logo buscar" "cats cats"; align-items: center; gap: 10px 24px; padding: 12px 24px 0; }
.logo { grid-area: logo; font-weight: 800; font-size: 1.5em; letter-spacing: -.03em; }
.logo span { color: var(--acc); }
.buscar { grid-area: buscar; position: relative; max-width: 520px; justify-self: end; width: 100%; }
.buscar input { width: 100%; padding: 11px 40px 11px 16px; border: 1px solid var(--line); border-radius: 999px; background: #f1f1ee; font-size: .95em; outline: none; transition: .15s; }
.buscar input:focus { background: #fff; border-color: var(--ink); }
.buscar input::-webkit-search-cancel-button { -webkit-appearance: none; }
.buscar button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; background: #e2e2dd; color: var(--muted); font-size: .85em; }
.cats { grid-area: cats; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 0 10px; -webkit-overflow-scrolling: touch; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; background: #f1f1ee; color: var(--muted); font-weight: 600; font-size: .9em; transition: .15s; }
.cat:hover { color: var(--ink); }
.cat.activo { background: var(--ink); color: #fff; }

main { max-width: 1240px; margin: 0 auto; padding: 24px; }

/* ── Hero ── */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: center; background: var(--ink); color: #fff; border-radius: 24px; padding: 48px; margin-bottom: 36px; overflow: hidden; position: relative; min-height: 340px; }
.hero::after { content: ''; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(230,57,70,.55), transparent 70%); pointer-events: none; }
.kicker { margin: 0 0 10px; color: var(--acc); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .78em; }
.hero h1 { font-size: clamp(1.9em, 4vw, 3em); font-weight: 800; }
.hero .sub { color: #c9ccd2; margin: 14px 0 24px; font-size: 1.05em; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--acc); color: var(--acc-txt); font-weight: 700; transition: .15s; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.sec { background: var(--ink); color: #fff; }
.hero-img { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-img img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,.35); transition: transform .3s; cursor: pointer; }
.hero-img img:hover { transform: translateY(-4px) rotate(-1deg); }
.hero-img img:nth-child(2) { margin-top: 36px; }

/* ── Catálogo ── */
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.cat-head h2 { font-size: 1.5em; font-weight: 800; }
.meta { color: var(--muted); margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.card { background: var(--panel); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); cursor: pointer; transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; text-align: left; padding: 0; }
.card:hover { transform: translateY(-4px); box-shadow: var(--sombra); }
.card-img { position: relative; aspect-ratio: 1; background: #f1f1ee; overflow: hidden; }
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-img .sin { position: absolute; inset: 0; display: grid; place-items: center; color: #b5b8be; font-size: 2.6em; }
.tag { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 999px; font-size: .7em; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--acc); color: #fff; }
.tag.agotado { background: #fff; color: var(--muted); border: 1px solid var(--line); }
.card-body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.card .marca { color: var(--muted); font-size: .78em; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.card h3 { font-size: 1em; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.3em; }
.card .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.chip { font-size: .74em; padding: 2px 8px; border-radius: 999px; background: #f1f1ee; color: var(--muted); }
.card .precio { margin-top: 6px; font-weight: 800; font-size: 1.15em; }
.card.agotado .card-img img { filter: grayscale(.6); opacity: .75; }
.skeleton { background: linear-gradient(90deg, #ececea 25%, #f6f6f4 50%, #ececea 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); aspect-ratio: .8; }
@keyframes sk { to { background-position: -200% 0; } }
.vacio { text-align: center; padding: 60px 20px; color: var(--muted); }
.paginacion { display: flex; justify-content: center; gap: 6px; margin: 32px 0 8px; flex-wrap: wrap; }
.paginacion button { min-width: 40px; height: 40px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 600; }
.paginacion button.activo { background: var(--ink); color: #fff; border-color: var(--ink); }
.paginacion button:disabled { opacity: .4; cursor: default; }

/* ── Pie ── */
.pie { max-width: 1240px; margin: 40px auto 0; padding: 28px 24px 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; color: var(--muted); }
.pie p { margin: 4px 0 0; }
.pie .lema { font-weight: 600; color: var(--ink); font-size: 1.05em; }
.fino { font-size: .85em; }

/* ── Modal de detalle ── */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal-fondo { position: absolute; inset: 0; background: rgba(21,22,26,.6); backdrop-filter: blur(4px); }
.modal-caja { position: relative; background: #fff; border-radius: 22px; max-width: 1000px; width: 100%; max-height: calc(100vh - 32px); overflow: auto; display: grid; grid-template-columns: 1.05fr 1fr; animation: pop .25s ease; }
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0 } to { transform: none; opacity: 1 } }
.cerrar { position: absolute; top: 12px; right: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15); font-size: 1em; }
.m-galeria { background: #f1f1ee; padding: 18px; display: grid; gap: 10px; align-content: start; }
.m-principal { aspect-ratio: 1; border-radius: 16px; overflow-x: auto; overflow-y: hidden; background: #fff; display: flex; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.m-principal::-webkit-scrollbar { display: none; }
.m-principal img { cursor: zoom-in; }

/* ── Visor de fotos ── */
.visor { position: fixed; inset: 0; z-index: 70; background: #0d0d0f; }
.visor-tira { position: absolute; inset: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; touch-action: pan-x; }
.visor-tira::-webkit-scrollbar { display: none; }
.visor.zoom .visor-tira { overflow: hidden; touch-action: none; }
.visor-foto { flex: 0 0 100%; height: 100%; overflow: hidden; scroll-snap-align: center; scroll-snap-stop: always; cursor: zoom-in; }
.visor.zoom .visor-foto { cursor: grab; }
.visor-foto img { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.visor.anim .visor-foto img { transition: transform .25s ease; }
.visor-btn { position: absolute; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 1.3em; display: grid; place-items: center; cursor: pointer; }
.visor-btn:disabled { opacity: .3; cursor: default; }
.visor-cerrar { top: max(12px, env(safe-area-inset-top)); right: 12px; }
.visor-ant, .visor-sig { top: 50%; transform: translateY(-50%); }
.visor-ant { left: 12px; } .visor-sig { right: 12px; }
.visor.zoom .visor-ant, .visor.zoom .visor-sig { display: none; }
.visor-n { position: absolute; left: 0; right: 0; bottom: max(16px, env(safe-area-inset-bottom)); margin: 0; text-align: center; color: #fff; font-weight: 600; font-size: .9em; opacity: .8; pointer-events: none; }
@media (hover: none) { .visor-ant, .visor-sig { display: none; } }
.m-principal img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; scroll-snap-stop: always; }
.m-miniaturas { display: flex; gap: 8px; flex-wrap: wrap; }
.m-miniaturas img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 2px solid transparent; cursor: pointer; opacity: .75; transition: .15s; }
.m-miniaturas img.activo, .m-miniaturas img:hover { border-color: var(--ink); opacity: 1; }
.m-info { padding: 36px 32px 28px; display: grid; gap: 8px; align-content: start; }
.m-cat { margin: 0; color: var(--acc); font-weight: 700; font-size: .78em; text-transform: uppercase; letter-spacing: .1em; }
.m-info h2 { font-size: 1.6em; font-weight: 800; }
.m-marca { margin: 0; color: var(--muted); font-weight: 600; }
.m-precio { margin: 10px 0 0; font-size: 1.9em; font-weight: 800; }
.m-disp { margin: 0; font-weight: 600; font-size: .9em; }
.m-disp.si { color: #1a7f37; } .m-disp.no { color: var(--muted); }
.m-atr { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 14px 0 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.m-atr div { display: grid; gap: 2px; }
.m-atr dt { color: var(--muted); font-size: .74em; text-transform: uppercase; letter-spacing: .06em; }
.m-atr dd { margin: 0; font-weight: 600; text-transform: capitalize; }
.m-desc { margin: 6px 0 0; color: #3b3f46; white-space: pre-line; }
.m-rel h3 { font-size: .85em; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 18px 0 10px; }
.m-rel .rel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.m-rel .rel { border-radius: 10px; overflow: hidden; background: #f1f1ee; aspect-ratio: 1; position: relative; cursor: pointer; }
.m-rel .rel img { width: 100%; height: 100%; object-fit: cover; }
.m-rel .rel span { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: .7em; font-weight: 700; background: rgba(255,255,255,.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Responsive ── */
@media (max-width: 900px) {
	.hero { grid-template-columns: 1fr; padding: 32px 24px; min-height: 0; }
	.hero-img { display: none; }
	.modal-caja { grid-template-columns: 1fr; }
	.m-info { padding: 24px 20px; }
}
@media (max-width: 640px) {
	.top { grid-template-columns: 1fr; grid-template-areas: "logo" "buscar" "cats"; padding: 10px 14px 0; gap: 8px; }
	.buscar { max-width: none; }
	main { padding: 14px; }
	.hero { border-radius: 18px; margin-bottom: 22px; }
	.grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.card-body { padding: 10px; }
	.card .precio { font-size: 1.05em; }
	.modal { padding: 0; align-items: end; }
	.modal-caja { border-radius: 22px 22px 0 0; max-height: 94vh; }
}

/* ── Carrito y compra ── */
.top { grid-template-columns: auto 1fr auto; grid-template-areas: "logo buscar carrito" "cats cats cats"; }
.carrito-btn { grid-area: carrito; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; white-space: nowrap; }
.carrito-btn b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--acc); display: inline-grid; place-items: center; font-size: .8em; }
.m-compra { display: grid; gap: 10px; margin-top: 10px; }
.m-etq { margin: 0; color: var(--muted); font-size: .74em; text-transform: uppercase; letter-spacing: .06em; }
.tallas { display: flex; flex-wrap: wrap; gap: 6px; }
.talla { min-width: 52px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; }
.talla:hover:not(:disabled) { border-color: var(--ink); }
.talla.activo { background: var(--ink); color: #fff; border-color: var(--ink); }
.talla:disabled { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.m-fila { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.m-cant { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: .9em; }
.m-cant select, .c-form input, .c-form select, .c-cupon input, .c-item select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; color: var(--ink); }
.m-msg { margin: 0; min-height: 1.2em; font-weight: 600; font-size: .9em; }
.m-msg.ok { color: #1a7f37; } .m-msg.err { color: var(--acc); }
.m-msg button, .m-msg a { color: var(--ink); text-decoration: underline; font-weight: 700; }

.c-form input, .c-form select { width: 100%; }
.c-form input[readonly] { background: #efefec; color: var(--muted); }
.c-link { justify-self: start; font-size: .85em; color: var(--muted); text-decoration: underline; }
#c-cp-msg:empty { display: none; }
.c-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.c-item img, .c-item .sin { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #f1f1ee; }
.c-item .n { font-weight: 600; font-size: .92em; line-height: 1.25; }
.c-item small { color: var(--muted); display: block; }
.c-item .d { display: grid; justify-items: end; gap: 4px; }
.c-item .x { color: var(--muted); font-size: .8em; text-decoration: underline; }
.c-vacio { color: var(--muted); padding: 20px 0; }
.c-cupon { display: flex; gap: 8px; }
.c-cupon input { flex: 1; text-transform: uppercase; min-width: 0; }
.c-cupon .btn { padding: 10px 16px; }
.c-totales { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 4px 0 0; }
.c-totales dt { color: var(--muted); }
.c-totales dd { margin: 0; text-align: right; font-weight: 600; }
.c-totales .desc { color: #1a7f37; }
.c-totales .tot { font-size: 1.25em; font-weight: 800; color: var(--ink); padding-top: 6px; border-top: 1px solid var(--line); }
.c-entrega { display: grid; gap: 8px; }
.c-entrega label { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.c-entrega input { width: auto; flex: none; }
.c-entrega label:has(input:checked) { border-color: var(--ink); }
.c-entrega small { display: block; color: var(--muted); font-size: .85em; }
.c-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-pagar { width: 100%; padding: 15px; font-size: 1.05em; }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }

.p-folio { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; color: var(--ink); }

@media (max-width: 640px) {
	.top { grid-template-columns: 1fr auto; grid-template-areas: "logo carrito" "buscar buscar" "cats cats"; }
	.carrito-btn { padding: 8px 12px; }
}

/* ── Página del carrito (carrito/) ── */
.top.top-simple { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; }
.seguir { color: var(--muted); font-weight: 600; }
.seguir:hover { color: var(--ink); }
.checkout { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: "titulo titulo" "form lado"; gap: 20px 28px; align-items: start; }
.ck-titulo { grid-area: titulo; font-size: 1.8em; font-weight: 800; }
.ck-form { grid-area: form; display: grid; gap: 16px; }
.ck-bloque { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 10px; align-content: start; }
.ck-bloque h2 { font-size: .8em; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.ck-bloque h2 small { text-transform: none; letter-spacing: 0; font-weight: 500; margin-left: 6px; }
.ck-lado { grid-area: lado; position: sticky; top: 20px; display: grid; gap: 14px; }
.ck-pagar { display: grid; gap: 10px; }
.ck-vacio { max-width: 520px; margin: 40px auto; text-align: center; display: grid; gap: 14px; justify-items: center; }
.ck-vacio h1 { font-size: 1.8em; font-weight: 800; }
.ck-vacio p { margin: 0; color: var(--muted); }
@media (max-width: 900px) {
	.checkout { grid-template-columns: 1fr; grid-template-areas: "titulo" "resumen" "form" "pagar"; }
	.ck-lado { display: contents; }
	.ck-resumen { grid-area: resumen; }
	.ck-pagar { grid-area: pagar; }
}
/* ── Página del pedido (pedido/): franja de estado, artículos a lo ancho y columna de resumen ── */
.pd { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "estado estado" "articulos lado"; gap: 18px; align-items: start; }
.pd-estado { grid-area: estado; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 24px; display: flex; align-items: center; gap: 18px; }
.pd-txt { flex: 1; min-width: 0; display: grid; gap: 4px; }
.pd-txt h1 { font-size: 1.4em; font-weight: 800; }
.pd-txt p { margin: 0; color: #3b3f46; }
#pd-msg:empty { display: none; }
.pd-icono { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.pd-icono svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pd-icono.verde { background: #e3f4e8; color: #1a7f37; }
.pd-icono.ambar { background: #fdf0d9; color: #b45309; }
.pd-icono.gris { background: #efefec; color: var(--muted); }
.pd-icono.girando svg { animation: girar 1.4s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.pd-acciones { flex: none; display: flex; gap: 8px; flex-wrap: wrap; }
.pd-bloque { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; display: grid; gap: 10px; }
.pd-bloque h2 { font-size: .8em; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pd-bloque h2 small { text-transform: none; letter-spacing: 0; font-weight: 500; margin-left: 6px; }
.pd-bloque p { margin: 0; line-height: 1.55; }
.pd-nota { color: var(--muted); font-size: .88em; }
.pd-articulos { grid-area: articulos; }
.pd-lista { list-style: none; margin: 0; padding: 0; }
.pd-lista li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.pd-lista li:first-child { border-top: 0; padding-top: 0; }
.pd-lista img, .pd-lista .sin { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #f1f1ee; }
.pd-art { display: grid; gap: 2px; min-width: 0; }
.pd-art b { font-weight: 600; line-height: 1.3; }
.pd-art small { color: var(--muted); }
.pd-imp { white-space: nowrap; }
.pd-lado { grid-area: lado; display: grid; gap: 18px; }
.pd-datos { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; }
.pd-datos dt { color: var(--muted); }
.pd-datos dd { margin: 0; text-align: right; font-weight: 600; }
@media (max-width: 860px) {
	.pd { grid-template-columns: 1fr; grid-template-areas: "estado" "resumen" "articulos" "detalles" "envio"; }
	.pd-lado { display: contents; }
	.pd-resumen { grid-area: resumen; }
	.pd-detalles { grid-area: detalles; }
	.pd-envio { grid-area: envio; }
	.pd-estado { flex-wrap: wrap; }
	.pd-acciones { width: 100%; }
	.pd-lista li { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; }
	.pd-lista img, .pd-lista .sin { width: 44px; height: 44px; border-radius: 8px; }
	.pd-art b { font-size: .92em; }
	.pd-art small { font-size: .82em; }
}
@media (max-width: 640px) {
	.pd-estado { padding: 18px; gap: 14px; }
	.pd-txt h1 { font-size: 1.2em; }
	.pd-acciones .btn { flex: 1; text-align: center; }
	.top.top-simple { padding: 12px 14px; }
	.ck-titulo { font-size: 1.5em; }
	.ck-bloque { padding: 16px; }
	.c-dos { grid-template-columns: 1fr; }
}

/* ── Mayoreo por link ── */
.my-kicker { font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: .8em; color: var(--acc); }
.my { padding-bottom: 110px; }
.my-cab { display: grid; gap: 10px; margin-bottom: 20px; }
.my-cab h1 { font-size: 2em; font-weight: 800; }
.my-reglas { display: flex; flex-wrap: wrap; gap: 8px; }
.my-reglas span { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: .88em; font-weight: 600; }
.my-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.my-art { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; grid-template-columns: 96px 1fr; gap: 6px 14px; align-content: start; align-items: center; }
.my-foto { width: 96px; height: 96px; border-radius: 10px; background: #f1f1ee; overflow: hidden; }
.my-foto img { width: 100%; height: 100%; object-fit: cover; }
.my-info { display: grid; gap: 6px; min-width: 0; }
.my-info h2 { font-size: 1em; font-weight: 700; line-height: 1.25; }
.my-vars { grid-column: 1 / -1; display: grid; gap: 6px; margin-top: 4px; }
.my-var { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding-top: 6px; border-top: 1px solid var(--line); }
.my-etq { font-weight: 600; font-size: .92em; }
.my-etq small { display: block; color: var(--muted); font-weight: 500; font-size: .85em; }
.my-precio { text-align: right; font-weight: 800; }
.my-precio s { display: block; color: var(--muted); font-weight: 500; font-size: .8em; }
.my-cant { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.my-cant button { width: 32px; height: 34px; font-size: 1.15em; font-weight: 700; }
.my-cant input { width: 44px; height: 34px; border: 0; text-align: center; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.my-cant input::-webkit-outer-spin-button, .my-cant input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.my-barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
	display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px max(24px, calc((100vw - 1240px) / 2 + 24px)); }
.my-barra-txt { display: grid; }
.my-barra-txt b { font-size: 1.1em; }
.my-barra-txt small { color: var(--acc); font-weight: 600; }
.btn.apagado { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.c-item input[type=number] { width: 72px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; text-align: center; }
.ck-cobro { white-space: pre-line; background: #f1f1ee; border-radius: 10px; padding: 12px 14px; font-weight: 600; }
@media (max-width: 640px) {
	.my-grid { grid-template-columns: 1fr; }
	.my-art { grid-template-columns: 72px 1fr; padding: 12px; }
	.my-foto { width: 72px; height: 72px; }
	.my-cab h1 { font-size: 1.5em; }
	.my-barra { padding: 10px 14px; }
}
.c-totales .falta { color: var(--acc); font-weight: 600; }

/* Pantalla táctil: objetivos de 44 px; 16 px en campos evita el zoom de iOS */
button, a, label, select, input { touch-action: manipulation; }
@media (pointer: coarse) {
	input, select, textarea { font-size: 16px !important; }
	.logo { display: inline-flex; align-items: center; gap: .25em; min-height: 44px; }
	.cat, .carrito-btn { min-height: 44px; display: inline-flex; align-items: center; }
	.seguir { display: inline-flex; align-items: center; min-height: 44px; }
	.cerrar { width: 44px; height: 44px; }
}

/* ── Revisión como cliente (2026-11): campos con nombre visible, avisos donde se ven, objetivos táctiles ── */
.checkout > *, .ck-form, .ck-bloque, .ck-lado, .c-item > *, .c-dos > *, .c-cupon { min-width: 0; }
.c-item .n { overflow-wrap: anywhere; }
.campo { display: grid; gap: 4px; min-width: 0; }
.campo > span { font-size: .82em; font-weight: 600; color: #54585f; }
.campo > span small { font-weight: 500; }
.campo input, .campo select { width: 100%; min-width: 0; }
.campo.mal input, .campo.mal select, input.mal, select.mal { border-color: #b3111d !important; background: #fff6f6; }
.campo-error { margin: 0; color: #b3111d; font-size: .88em; font-weight: 600; }
.ck-aviso { grid-column: 1 / -1; margin: 0; padding: 12px 14px; border-radius: 12px; background: #fff7e0; border: 1px solid #f0d58a; color: #5a4300; font-weight: 600; font-size: .95em; white-space: pre-line; text-align: left; }
.ck-aviso:focus { outline: 2px solid #5a4300; outline-offset: 2px; }
.franja { margin: 0; padding: 10px 24px; background: #fff7e0; border-bottom: 1px solid #f0d58a; color: #5a4300; font-weight: 600; text-align: center; }
.m-pausa { margin: 0; padding: 12px 14px; border-radius: 12px; background: #f1f1ee; color: var(--ink); font-weight: 600; }
/* El rojo de marca se queda en el logotipo; los botones usan uno más oscuro (blanco encima con contraste 4.5:1 o más). */
.btn { background: #c1121f; }
.m-msg.err, .c-totales .falta { color: #b3111d; }
.btn:focus-visible, .cat:focus-visible, .talla:focus-visible, .c-link:focus-visible, a:focus-visible { outline: 3px solid #1b6ef3; outline-offset: 2px; }
.c-item .x, .c-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.c-item select { min-height: 44px; }
.my-cant button { width: 44px; height: 44px; }
.my-cant input { width: 52px; height: 44px; }
.my-condiciones { margin: 8px 0 0; color: var(--muted); font-size: .92em; }
.pie-ligas { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0; }
.pie-ligas a { text-decoration: underline; display: inline-flex; align-items: center; min-height: 32px; }
.pie .fino a { text-decoration: underline; }
#c-legal a, .pd-ayuda a { text-decoration: underline; font-weight: 600; }
.pd-ayuda { margin: 0; color: var(--muted); font-size: .92em; }
.info { max-width: 760px; margin: 0 auto; padding: 24px; display: grid; gap: 18px; }
.info h1 { font-size: 1.7em; font-weight: 800; }
.info nav { display: flex; flex-wrap: wrap; gap: 8px; }
.info nav a { padding: 8px 14px; border-radius: 999px; background: #f1f1ee; color: var(--muted); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.info nav a.activo { background: var(--ink); color: #fff; }
.info article { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.info article h2 { font-size: 1.2em; margin-bottom: 10px; }
.info article p { margin: 0 0 12px; white-space: pre-line; overflow-wrap: anywhere; }
.info article p:last-child { margin-bottom: 0; }
@media (pointer: coarse) {
	.pie-ligas a { min-height: 44px; }
	.talla { min-height: 44px; }
}

/* ── Diseños de temporada: html[data-diseno="clave"] (catálogo en backend/src/Services/Disenos.php) ── */
.festivo { display: none; margin: 0; padding: 8px 16px; text-align: center; font-weight: 700; font-size: .9em; letter-spacing: .02em; }
[data-diseno] .festivo { display: block; }
.festivo span::before { content: var(--festivo, ''); }
/* Los textos de la portada se cambian con JS: mientras llega, no se enseñan los del diseño normal. */
[data-diseno] .hero-txt:not([data-listo]) > :not(.btn) { visibility: hidden; }
/* Nieve sobre toda la página: no estorba los toques y pasa por debajo del encabezado y de la ficha del artículo. */
.nieve { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 15; contain: strict; }
.nieve i { position: absolute; top: -30px; background: center / contain no-repeat; animation: nevar linear infinite; will-change: transform; }
.nieve i.copo { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M12 1.5v21M12 5.2l-2.6-2.4M12 5.2l2.6-2.4M12 18.8l-2.6 2.4M12 18.8l2.6 2.4'/%3E%3Cg transform='rotate(60 12 12)'%3E%3Cpath d='M12 1.5v21M12 5.2l-2.6-2.4M12 5.2l2.6-2.4M12 18.8l-2.6 2.4M12 18.8l2.6 2.4'/%3E%3C/g%3E%3Cg transform='rotate(120 12 12)'%3E%3Cpath d='M12 1.5v21M12 5.2l-2.6-2.4M12 5.2l2.6-2.4M12 18.8l-2.6 2.4M12 18.8l2.6 2.4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); filter: drop-shadow(0 0 1.5px rgba(25, 85, 150, .95)) drop-shadow(0 0 3px rgba(25, 85, 150, .35)); }
.nieve i.bolita { border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px rgba(60, 120, 185, .7), 0 0 6px rgba(60, 120, 185, .45); }
@keyframes nevar {
	0% { transform: translate3d(0, 0, 0) rotate(0); }
	50% { transform: translate3d(var(--dx, 20px), 55vh, 0) rotate(180deg); }
	100% { transform: translate3d(calc(var(--dx, 20px) * -.4), 112vh, 0) rotate(360deg); }
}
@keyframes titilar { 0%, 45% { opacity: 1; } 55%, 100% { opacity: .25; } }
@keyframes titilar-suave { from { opacity: 1; } to { opacity: .3; } }
@keyframes nevar-suave { to { transform: translate3d(0, 112vh, 0); } }
/* Con animaciones reducidas en el dispositivo la nieve cae despacio, recta y sin girar, y las luces se encienden y apagan suave, sin destello. */
@media (prefers-reduced-motion: reduce) {
	.nieve i { animation-name: nevar-suave; animation-duration: 30s !important; }
	[data-diseno] .top::before, [data-diseno] .top::after { animation: titilar-suave 3.2s ease-in-out infinite alternate !important; }
	[data-diseno] .top::after { animation-delay: -3.2s !important; }
}

/* Navidad: verde pino, rojo y dorado; serie de luces, gorro en el logo, nieve en la portada */
[data-diseno="navidad"] { --acc: #c8102e; --pino: #0b3d2e; --oro: #e8c46a; }
[data-diseno="navidad"] body { background: var(--bg) radial-gradient(circle at 50% 0, #eef4f1, transparent 60%) no-repeat; }
[data-diseno="navidad"] .festivo { color: #fff; background: var(--pino) radial-gradient(circle, rgba(255,255,255,.16) 1.5px, transparent 2px) 0 0 / 26px 26px; }
[data-diseno="navidad"] .festivo::before, [data-diseno="navidad"] .festivo::after { content: ''; display: inline-block; width: 1em; height: 1em; margin: 0 .7em; vertical-align: -.15em;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23e8c46a' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M12 1.5v21M12 5.2l-2.6-2.4M12 5.2l2.6-2.4M12 18.8l-2.6 2.4M12 18.8l2.6 2.4'/%3E%3Cg transform='rotate(60 12 12)'%3E%3Cpath d='M12 1.5v21M12 5.2l-2.6-2.4M12 5.2l2.6-2.4M12 18.8l-2.6 2.4M12 18.8l2.6 2.4'/%3E%3C/g%3E%3Cg transform='rotate(120 12 12)'%3E%3Cpath d='M12 1.5v21M12 5.2l-2.6-2.4M12 5.2l2.6-2.4M12 18.8l-2.6 2.4M12 18.8l2.6 2.4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }
[data-diseno="navidad"] .top { border-bottom-color: transparent; box-shadow: 0 1px 0 var(--line); }
[data-diseno="navidad"] .top::before, [data-diseno="navidad"] .top::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 26px; pointer-events: none;
	background: left top / 240px 26px repeat-x; animation: titilar 1.6s steps(1) infinite; }
[data-diseno="navidad"] .top::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 26'%3E%3Cpath d='M0 3 Q30 13 60 3 T120 3 T180 3 T240 3' fill='none' stroke='%231f3b2f' stroke-width='1.6'/%3E%3Crect x='28' y='8' width='5' height='4' rx='1' fill='%232b2b2b'/%3E%3Cellipse cx='30.5' cy='17' rx='4.6' ry='6.4' fill='%23e0222f'/%3E%3Cellipse cx='29.0' cy='15' rx='1.3' ry='2' fill='%23fff' opacity='.55'/%3E%3Crect x='148' y='8' width='5' height='4' rx='1' fill='%232b2b2b'/%3E%3Cellipse cx='150.5' cy='17' rx='4.6' ry='6.4' fill='%23f2b632'/%3E%3Cellipse cx='149.0' cy='15' rx='1.3' ry='2' fill='%23fff' opacity='.55'/%3E%3C/svg%3E"); }
[data-diseno="navidad"] .top::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 26'%3E%3Crect x='88' y='8' width='5' height='4' rx='1' fill='%232b2b2b'/%3E%3Cellipse cx='90.5' cy='17' rx='4.6' ry='6.4' fill='%231f9d55'/%3E%3Cellipse cx='89.0' cy='15' rx='1.3' ry='2' fill='%23fff' opacity='.55'/%3E%3Crect x='208' y='8' width='5' height='4' rx='1' fill='%232b2b2b'/%3E%3Cellipse cx='210.5' cy='17' rx='4.6' ry='6.4' fill='%232f7fe0'/%3E%3Cellipse cx='209.0' cy='15' rx='1.3' ry='2' fill='%23fff' opacity='.55'/%3E%3C/svg%3E"); animation-delay: -.8s; }
[data-diseno="navidad"] .top .logo { position: relative; }
[data-diseno="navidad"] .top .logo::before { content: ''; position: absolute; left: -11px; top: -9px; width: 25px; height: 21px; transform: rotate(-16deg);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 38'%3E%3Cpath d='M6 30C8 14 20 5 33 9c7 2 9 9 7 15l-5-6c-3 4-8 9-12 12z' fill='%23d3162f'/%3E%3Crect x='3' y='27' width='27' height='8' rx='4' fill='%23fff' stroke='%23e3e6ea'/%3E%3Ccircle cx='40' cy='25' r='4.5' fill='%23fff' stroke='%23e3e6ea'/%3E%3C/svg%3E") center / contain no-repeat; }
[data-diseno="navidad"] main { padding-top: 40px; }
[data-diseno="navidad"] .hero { background: linear-gradient(135deg, #0f4a37, #062a1f); }
[data-diseno="navidad"] .hero::before { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 34px; pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V22c40-14 80-14 120-4s80 12 120 2 80-18 120-10 80 16 120 8 80-16 120-6v28z' fill='%23fff'/%3E%3C/svg%3E") left bottom / 600px 34px repeat-x; }
[data-diseno="navidad"] .hero::after { background: radial-gradient(circle, rgba(232,196,106,.45), transparent 70%); }
[data-diseno="navidad"] .hero-txt { position: relative; z-index: 1; }
[data-diseno="navidad"] .kicker { color: var(--oro); }
[data-diseno="navidad"] .cat.activo, [data-diseno="navidad"] .paginacion button.activo { background: var(--pino); border-color: var(--pino); }
[data-diseno="navidad"] .btn.sec { background: var(--pino); }
[data-diseno="navidad"] .tag:not(.agotado) { background: var(--pino); box-shadow: 0 0 0 2px var(--oro) inset; }
[data-diseno="navidad"] .pie { border-top: 3px solid var(--pino); }

/* ── Boletín de noticias: caja antes del pie y ventana de invitación ── */
.bol-caja { max-width: 1240px; margin: 40px auto 0; padding: 26px 28px; border-radius: 20px; background: var(--ink); color: #fff; display: grid; grid-template-columns: 1fr minmax(280px, 440px); gap: 16px 32px; align-items: center; }
.bol-caja + .pie { margin-top: 28px; }
.bol-caja h2 { font-size: 1.35em; font-weight: 800; }
.bol-caja p { margin: 6px 0 0; color: #c9ccd2; }
.bol-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.bol-form input { grid-column: 1; min-width: 0; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-size: 16px; outline: none; }
.bol-form input[name="nombre"] { grid-column: 1 / -1; }
.bol-form input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(230, 57, 70, .2); }
.bol-form .btn { grid-column: 2; white-space: nowrap; }
.bol-form .btn:disabled { opacity: .6; cursor: default; transform: none; }
.bol-form .bol-msg, .bol-form .bol-legal { grid-column: 1 / -1; margin: 0; font-size: .85em; }
.bol-msg:empty { display: none; }
.bol-msg.mal { color: #ff8f98; font-weight: 600; }
.bol-msg.bien { font-size: 1.05em; font-weight: 700; color: #fff; }
.bol-legal { color: #9a9ea6; }
.bol-legal a { text-decoration: underline; }
.bol-pop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.bol-pop-fondo { position: absolute; inset: 0; background: rgba(15, 16, 20, .6); backdrop-filter: blur(3px); animation: bol-fondo .25s ease-out; }
.bol-pop-caja { position: relative; width: min(440px, 100%); max-height: 100%; overflow: auto; background: var(--panel); border-radius: 22px; padding: 34px 26px 20px; text-align: center; box-shadow: 0 30px 70px rgba(0, 0, 0, .35); animation: bol-entra .3s ease-out; }
.bol-pop-caja h2 { font-size: 1.45em; font-weight: 800; }
.bol-pct { margin: 0 auto 10px; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: var(--acc); color: #fff; font-weight: 800; font-size: 1.9em; letter-spacing: -.03em; }
.bol-texto { margin: 10px 0 0; color: var(--muted); }
.bol-pop .bol-form { grid-template-columns: 1fr; margin-top: 18px; text-align: left; }
.bol-pop .bol-form input, .bol-pop .bol-form .btn { grid-column: 1; }
.bol-pop .bol-form .btn { padding: 14px 22px; text-align: center; }
.bol-pop .bol-msg.mal { color: #c1121f; }
.bol-pop .bol-msg.bien { color: var(--ink); text-align: center; padding: 8px 0; }
.bol-pop .bol-legal { color: var(--muted); text-align: center; }
.bol-no { display: block; margin: 12px auto 0; padding: 8px 14px; min-height: 44px; color: var(--muted); text-decoration: underline; font-size: .9em; }
@keyframes bol-fondo { from { opacity: 0; } }
@keyframes bol-entra { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .bol-pop-fondo, .bol-pop-caja { animation: none; } }
@media (max-width: 1288px) { .bol-caja { margin-left: 24px; margin-right: 24px; } }
@media (max-width: 760px) {
	.bol-caja { grid-template-columns: 1fr; margin-left: 14px; margin-right: 14px; padding: 22px 18px; }
	.bol-form { grid-template-columns: 1fr; }
	.bol-form input, .bol-form .btn { grid-column: 1; }
	.bol-form .btn { text-align: center; }
}
[data-diseno="navidad"] .bol-caja { background: linear-gradient(135deg, #0f4a37, #062a1f); }
[data-diseno="navidad"] .bol-pct { background: var(--pino); box-shadow: 0 0 0 4px var(--oro) inset; }

/* iconos de linea (comun.js::icono y SVG pegados en el HTML) */
.ico { width: 1.2em; height: 1.2em; flex: none; display: inline-block; vertical-align: -0.22em; }
.card-img .sin .ico { width: 1em; height: 1em; stroke-width: 1.3; }

/* Mayoreo: cómo pedir, buscador de la lista y foto que se amplía */
.my-como { margin: 0; color: var(--ink); }
.my-buscar { width: 100%; max-width: 420px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font: inherit; font-size: 16px; outline: none; }
.my-buscar:focus { border-color: var(--ink); }
.my-foto button { display: block; width: 100%; height: 100%; padding: 0; cursor: zoom-in; }

/* Carrito: aviso del apartado temporal de las piezas */
.c-apartado { margin: 0 0 12px; padding: 9px 12px; border-radius: 10px; background: #eef7f0; border: 1px solid #cfe6d5; color: #1c5d33; font-size: .9em; font-weight: 600; font-variant-numeric: tabular-nums; }
.c-apartado.vencido { background: #fff7e0; border-color: #f0d58a; color: #5a4300; }
.c-apartado button { margin-left: 6px; color: inherit; text-decoration: underline; font-weight: 700; min-height: 32px; }
