/* ARMA TU COMBO — seccion de la portada. Pareja de yoshiro-combo.js.
   Medidas y colores copiados de la seccion #look de Home.dc.html (prototipo,
   version del 2026-09-14). Donde el prototipo usa un color que ya es token de
   yoshiro-ui.css, va el token. */

@keyframes cb-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes cb-drop { 0% { opacity: 0; transform: translateY(-18px) scale(.96); } 100% { opacity: 1; transform: none; } }
@keyframes cb-coatin { 0% { opacity: 0; transform: translateX(26px) scale(.94); } 100% { opacity: 1; transform: none; } }
@keyframes cb-float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-16px) rotate(3deg); } }
/* La franja de caramelo que el prototipo pone encima de la seccion la retiro
   el dueño el 2026-09-14. El margen la sustituye: «Lo que más se llevan»,
   justo encima, no trae aire por abajo. */
.cb {
    margin-top: var(--yk-section);
    position: relative;
    background: var(--yk-sky-tint);
    color: var(--yk-ink);
    scroll-margin-top: 96px;
    overflow: hidden;
}
/* El regalito celeste que flota a la izquierda. */
.cb__gift {
    position: absolute; left: 1.5%; bottom: 18%; z-index: 0;
    width: clamp(30px, 3.4vw, 48px);
    animation: cb-float 9s ease-in-out 1.4s infinite;
}
.cb__gift div { position: relative; aspect-ratio: 1; background: var(--yk-sky); box-shadow: 0 10px 22px rgba(23, 25, 28, .12); }
.cb__gift span { position: absolute; background: #fff; }
.cb__gift span:first-child { left: 50%; top: 0; bottom: 0; width: 6px; margin-left: -3px; }
.cb__gift span:last-child { top: 50%; left: 0; right: 0; height: 6px; margin-top: -3px; }

.cb__wrap {
    position: relative; z-index: 1;
    max-width: var(--yk-wrap);
    margin: 0 auto;
    padding: var(--yk-section) var(--yk-gutter);
    display: grid;
    /* minmax(0, …) y no 1fr a secas: con un fr sin minimo la columna crece
       hasta el ancho de su tira mas larga. En el prototipo cada tira trae 3
       prendas y no se nota; con las 20 del catalogo real desarmaba la seccion. */
    grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
    gap: 40px clamp(32px, 4.5vw, 72px);
    align-items: start;
}
.cb-side { min-width: 0; }

/* ---------- tablero del look ---------- */
.cb-board-wrap { position: relative; }
.cb-board {
    position: relative;
    background: #fff;
    padding: clamp(18px, 2.4vw, 34px);
    box-shadow: 0 30px 60px -34px rgba(23, 25, 28, .4);
}
.cb-board__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--yk-line);
    font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--yk-muted);
}
.cb-board__grid {
    position: relative;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: clamp(10px, 2vw, 20px);
    align-items: center; justify-items: center;
    padding: clamp(16px, 2.6vw, 26px) 0 6px;
    min-height: clamp(300px, 36vw, 440px);
}
.cb-board__col {
    grid-column: 1; width: 100%; max-width: 232px; justify-self: end;
    display: flex; flex-direction: column; gap: 10px;
}
.cb-board__coat {
    position: relative;
    grid-column: 2; width: 100%; max-width: 232px; justify-self: start;
}
.cb-board__coat.is-new { animation: cb-coatin .6s cubic-bezier(.2, 1.2, .35, 1) both; }
.cb-board__tick {
    position: absolute; left: clamp(-20px, -2vw, -10px); top: 50%;
    width: 12px; height: 2px; background: var(--yk-ink); opacity: .25;
}

.cb-piece {
    position: relative; aspect-ratio: 3 / 4; overflow: hidden;
    background: #fff;
    box-shadow: 0 18px 34px -20px rgba(23, 25, 28, .5);
}
.cb-piece--coat { box-shadow: 0 22px 38px -20px rgba(23, 25, 28, .55); }
.cb-piece.is-new { animation: cb-drop .5s cubic-bezier(.2, 1.2, .35, 1) both; }
.cb-piece img, .cb-item__pic img { width: 100%; height: 100%; object-fit: contain; }
/* La portada IA trae su propio fondo: a sangre, como en las tarjetas. */
.cb-piece img[data-ia-cover], .cb-item__pic img[data-ia-cover] { object-fit: cover; }
.cb-piece__name {
    position: absolute; left: 0; bottom: 0; right: 0;
    padding: 8px 10px;
    background: linear-gradient(to top, rgba(255, 255, 255, .94), rgba(255, 255, 255, 0));
    font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cb-piece__badge {
    position: absolute; left: 8px; top: 8px;
    background: var(--yk-orange); color: #fff;
    font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    padding: 4px 7px;
}
.cb-piece--bot .cb-piece__badge { background: var(--yk-sky-text); }
.cb-piece--coat .cb-piece__badge { background: var(--yk-ink); }
.cb-piece__x {
    position: absolute; right: 8px; top: 8px;
    width: 26px; height: 26px; border: 0; border-radius: 50%;
    background: rgba(23, 25, 28, .6); color: #fff;
    font-size: 14px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .2s;
}
.cb-piece__x:hover { background: var(--yk-ink); }

.cb-slot {
    aspect-ratio: 3 / 4;
    border: 1.5px dashed #B9CDD7;
    background: rgba(255, 255, 255, .55);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    text-align: center; padding: 12px;
}
.cb-slot.is-new { animation: cb-drop .45s both; }
.cb-slot__n {
    width: 28px; height: 28px; border-radius: 50%; color: #fff;
    font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.cb-slot__t { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--yk-ink); }
.cb-slot__p { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: #8FA5B0; }

/* ---------- controles ---------- */
.cb-kicker { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--yk-sky-text); }
.cb-title {
    font-family: var(--yk-font-display);
    font-size: clamp(34px, 4.4vw, 60px); font-weight: 500;
    letter-spacing: -.025em; line-height: .98;
    margin: 12px 0 0; text-wrap: pretty;
}
.cb-sub { font-size: 14px; color: var(--yk-body); margin: 12px 0 0; max-width: 46ch; }

.cb-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.cb-cat {
    height: 40px; padding: 0 18px;
    border: 1px solid #B9CDD7; background: transparent; color: var(--yk-ink);
    border-radius: 20px;
    font-family: inherit; font-size: 12px; font-weight: 600; letter-spacing: .06em;
    cursor: pointer; transition: all .25s;
}
.cb-cat:hover { border-color: var(--yk-ink); }
.cb-cat.is-on { border-color: var(--yk-ink); background: var(--yk-ink); color: #fff; }

.cb-steps { margin-top: 26px; display: flex; flex-direction: column; gap: 20px; }
.cb-steps .is-in { animation: cb-in .45s both; }
.cb-step { display: flex; align-items: baseline; gap: 10px; }
.cb-step__n {
    width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%;
    color: #fff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.cb-step__n--plus { background: var(--yk-ink); color: var(--yk-yellow); }
.cb-step__t { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.cb-step__v { margin-left: auto; min-width: 0; font-size: 12px; color: var(--yk-muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cb-rail {
    display: flex; gap: 10px; overflow-x: auto;
    padding: 12px 0 4px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.cb-rail::-webkit-scrollbar { display: none; }
.cb-item {
    flex: 0 0 auto; width: 98px; scroll-snap-align: start;
    background: none; border: 0; padding: 0; text-align: left;
    font-family: inherit; cursor: pointer;
}
/* El padding de 2px deja sitio al anillo (outline-offset) dentro de la tira,
   que tiene overflow y si no lo recortaria. */
.cb-rail { padding-left: 4px; padding-right: 4px; margin-left: -4px; margin-right: -4px; }
.cb-item__pic {
    position: relative; aspect-ratio: 3 / 4; overflow: hidden;
    background: #fff;
    outline: 2px solid transparent; outline-offset: 2px;
    transition: outline-color .2s;
}
.cb-item.is-on .cb-item__pic { outline-color: var(--yk-orange); }
.cb-item__ok {
    position: absolute; right: 6px; top: 6px;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--yk-orange); color: #fff; font-size: 11px;
    display: flex; align-items: center; justify-content: center;
}
.cb-item__name {
    font-size: 11px; font-weight: 600; line-height: 1.3; margin-top: 7px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--yk-body);
}
.cb-item.is-on .cb-item__name { color: var(--yk-ink); }
.cb-none { margin: 12px 0 0; font-size: 12px; color: var(--yk-muted-2); }

.cb-cta {
    display: flex; align-items: center; gap: 14px;
    width: 100%; text-align: left;
    padding: 18px 20px;
    border: 1.5px solid var(--yk-ink); background: var(--yk-yellow); color: var(--yk-ink);
    border-radius: var(--yk-radius);
    font-family: inherit; cursor: pointer;
    transition: transform .25s, box-shadow .25s;
}
.cb-cta.is-in { animation: cb-in .45s both; }
.cb-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -12px rgba(23, 25, 28, .5); }
.cb-cta__t { font-family: var(--yk-font-display); font-size: clamp(17px, 1.8vw, 23px); font-weight: 600; line-height: 1.1; }
.cb-cta__o { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }

.cb-skip {
    margin-top: 4px; background: none; border: 0; padding: 0;
    font-family: inherit; font-size: 12px; color: var(--yk-muted-2);
    text-decoration: underline; cursor: pointer;
}

.cb-sizes { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(23, 25, 28, .15); }
.cb-sizes__row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cb-sizes__l { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--yk-muted); margin-right: 6px; }
.cb-size {
    min-width: 38px; height: 36px; padding: 0 8px;
    border: 1px solid #B9CDD7; background: #fff; color: var(--yk-ink);
    font-family: inherit; font-size: 12px; font-weight: 600;
    border-radius: var(--yk-radius);
    cursor: pointer; transition: all .2s;
}
.cb-size:hover:not(:disabled) { border-color: var(--yk-ink); }
.cb-size.is-on { border-color: var(--yk-ink); background: var(--yk-ink); color: #fff; }
.cb-size:disabled { color: #B7BAC0; text-decoration: line-through; cursor: not-allowed; }
.cb-guide { font-size: 11px; text-decoration: underline; color: var(--yk-muted-2); margin-left: 6px; }

.cb-total {
    margin-top: 20px; background: #fff; padding: 18px 20px;
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.cb-total span { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.cb-total strong { font-family: var(--yk-font-display); font-size: 30px; font-weight: 500; }

.cb-buy {
    margin-top: 14px; width: 100%; height: 56px;
    border: 0; background: var(--yk-orange); color: #fff;
    border-radius: var(--yk-radius);
    font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    cursor: pointer; transition: background .3s;
}
.cb-buy:hover:not(:disabled) { background: var(--yk-orange-dark); }
.cb-buy:disabled { background: #B7BAC0; cursor: default; }
.cb-buy.is-added, .cb-buy.is-added:hover { background: var(--yk-ink); }

.cb-all {
    display: inline-block; margin-top: 18px;
    font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    padding-bottom: 2px;
    background-image: linear-gradient(var(--yk-ink), var(--yk-ink));
    background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%;
}

@media (max-width: 899px) {
    /* En telefono y tablet se lee primero de que va la seccion y despues se ve
       el tablero: antes salia la caja vacia "TU COMBO" con su hueco punteado
       ANTES del titulo. El marcado no cambia: .cb-side se deshace
       (display:contents) y sus hijos se ordenan junto al tablero. */
    .cb__wrap { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
    .cb-side { display: contents; }
    .cb-kicker, .cb-title, .cb-sub, .cb-cats { order: 1; }
    .cb-board-wrap { order: 2; margin-top: 26px; width: 100%; max-width: 560px; justify-self: center; }
    .cb-steps, .cb-sizes, .cb-total, .cb-buy, .cb-all { order: 3; }
    .cb-all { justify-self: start; }
    .cb-board__grid { min-height: 0; }
    /* El regalito flotante es un adorno del margen izquierdo: sin margen donde
       ponerlo, caia encima de "Seguir sin casaca" y de la talla del combo. */
    .cb__gift { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .cb__gift, .cb-piece.is-new, .cb-slot.is-new, .cb-board__coat.is-new, .cb-steps .is-in, .cb-cta.is-in { animation: none; }
}
