/* Prendia — componentes interactivos: Probador, estantes, selección, clima, planificador. */

/* ===== Probador (mezclar y combinar deslizando) ===== */
.stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 4px -16px 0; }
.reel-row { min-width: 0; }
.reel-row { position: relative; }
.row-head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; margin-bottom: 2px; }
.row-head .label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.lock { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.lock svg { width: 18px; height: 18px; }
.lock.on { background: var(--accent-soft); color: var(--accent); }
.reel {
  --w: min(30vw, 124px);
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 6px calc(50% - var(--w) / 2) 10px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.reel::-webkit-scrollbar { display: none; }
.reel-item {
  flex: 0 0 var(--w); aspect-ratio: 1; scroll-snap-align: center; border-radius: 18px; background: var(--tile);
  border: 1px solid var(--line); display: grid; place-items: center; position: relative; padding: 0; cursor: pointer;
  transform: scale(.82); opacity: .55; transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .2s, box-shadow .2s;
}
.reel-item img { width: 100%; height: 100%; object-fit: contain; padding: 10%; pointer-events: none; }
.reel-item.sel { transform: scale(1); opacity: 1; box-shadow: var(--shadow); border-color: var(--ink); }
.reel-item.none { border-style: dashed; color: var(--muted); font-size: 13px; text-align: center; padding: 8px; }
.reel-item.add { border-style: dashed; color: var(--accent); text-decoration: none; text-align: center; font-size: 13px; padding: 8px; }
.reel-item .nm { position: absolute; left: 6px; right: 6px; bottom: 5px; font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fit-bar {
  position: sticky; bottom: calc(var(--tab-h) + 8px); z-index: 12; margin-top: 12px; padding: 10px 12px;
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); display: grid; gap: 10px;
}
.fit-bar .btn { padding: 0 8px; gap: 6px; min-width: 0; font-size: 14px; white-space: nowrap; }
.today .btn { padding: 0 10px; white-space: nowrap; font-size: 13px; }
.fit-mini { display: flex; align-items: center; gap: 10px; }
.fit-mini .mini { width: 64px; height: 64px; flex: none; }
.meter { display: flex; gap: 4px; margin-bottom: 4px; }
.meter i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); transition: background .25s; }
.meter.l1 i:nth-child(-n+1) { background: var(--warn); }
.meter.l2 i:nth-child(-n+2) { background: #c9a227; }
.meter.l3 i { background: var(--ok); }
.meter.l0 i:nth-child(1) { background: var(--danger); }
.fit-tools { display: flex; gap: 8px; align-items: center; margin: 10px 0 4px; flex-wrap: wrap; }
.shuffle-anim { animation: shake .45s ease; }
@keyframes shake { 20% { transform: rotate(-4deg); } 60% { transform: rotate(4deg); } }

/* ===== Clóset: estantes, selección, colores ===== */
.shelf { margin: 0 -16px 20px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 16px 8px; }
.shelf-rail { display: flex; gap: 10px; overflow-x: auto; padding: 2px 16px 12px; scroll-snap-type: x proximity; scrollbar-width: none; position: relative; }
.shelf-rail::-webkit-scrollbar { display: none; }
.shelf-rail .g-tile { flex: 0 0 31%; scroll-snap-align: start; }
.shelf::after { content: ''; display: block; height: 7px; margin: -2px 16px 0; border-radius: 4px; background: linear-gradient(var(--line), color-mix(in srgb, var(--line) 40%, transparent)); }
.color-strip { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px; scrollbar-width: none; }
.color-strip::-webkit-scrollbar { display: none; }
.swatch { flex: none; display: grid; justify-items: center; gap: 4px; background: none; border: 0; cursor: pointer; font-size: 11px; color: var(--muted); }
.swatch b { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; font-size: 12px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); transition: transform .15s; }
.swatch:active b { transform: scale(.92); }
.swatch.on b { box-shadow: 0 0 0 2px var(--ink); }
.view-toggle { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 3px; }
.view-toggle button { width: 36px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.view-toggle button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.select-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + 10px); width: min(456px, calc(100% - 24px)); z-index: 40;
  background: var(--ink); color: var(--bg); border-radius: 20px; padding: 10px 12px; display: flex; gap: 6px; align-items: center; box-shadow: var(--shadow); animation: up .2s ease;
}
.select-bar .cnt { font-weight: 700; padding: 0 6px; font-size: 14px; white-space: nowrap; }
.select-bar button { flex: 1; min-width: 0; height: 46px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .12); color: inherit; font-weight: 600; font-size: 11px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.select-bar button[disabled] { opacity: .35; }
.select-bar button.x { flex: 0 0 40px; background: transparent; }
.select-bar svg { width: 18px; height: 18px; }
.g-tile { transition: transform .15s ease; }
.g-tile:active { transform: scale(.97); }

/* ===== Hoy te sugiero / clima / ocasiones ===== */
.today { position: relative; overflow: hidden; border-radius: 22px; padding: 14px; background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border: 1px solid var(--line); margin-bottom: 18px; }
.today .row { align-items: stretch; }
.today .mini { width: 38%; flex: none; }
.today h3 { font-size: 18px; margin: 2px 0 4px; }
.weather-chips { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.weather-chips .chip { height: 30px; padding: 0 10px; font-size: 13px; }
.occ-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.occ { display: grid; justify-items: center; gap: 2px; padding: 10px 2px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 11.5px; cursor: pointer; color: var(--ink); text-align: center; line-height: 1.2; }
.occ span { font-size: 22px; line-height: 1.1; }
.occ.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ===== Planificador semanal ===== */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { display: grid; gap: 4px; justify-items: center; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
.day .dn { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.day .dd { font-size: 13px; font-weight: 700; }
.day .box { width: 100%; aspect-ratio: 3/4; border-radius: 12px; background: var(--surface); border: 1px dashed var(--line); display: grid; place-items: center; overflow: hidden; position: relative; color: var(--muted); }
.day .box .collage { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; }
.day.today-d .box { border-color: var(--accent); border-style: solid; }
.day.today-d .dd { color: var(--accent); }
.day .box svg { width: 16px; height: 16px; }

/* ===== Tallas, precios y combinaciones ===== */
.size-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.size-chips .chip { height: 34px; min-width: 42px; justify-content: center; padding: 0 10px; }
.price-hints { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.price-hints button { border: 1px dashed var(--accent); background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.match-row { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.match-row::-webkit-scrollbar { display: none; }
.match-row .g-tile { flex: 0 0 27%; }
.pop-in { animation: pop .28s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
.wa { background: #1f9d55; color: #fff; }
