/* Quantity tiers on the product page (tiers.js). Loads after pdp.css and reuses its tokens, chips and buttons. */
button.cbtn { border: 0; font: inherit; cursor: pointer; }
.cbtn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.tiers { margin: 4px 0 0; padding: 0; border: 0; min-width: 0; }
.tiers__l { padding: 0; margin-bottom: 12px; font-weight: 700; }
.tiers__list { display: grid; gap: 12px; }
.tier { position: relative; display: flex; flex-direction: column; border-radius: var(--c-r); background: var(--c-card); border: 1.5px solid var(--c-line); transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.tier.is-sel { border-color: var(--c-night); background: var(--c-alt); box-shadow: 0 0 0 1.5px var(--c-night); }
.tier:has(.tier__head input:focus-visible) { outline: 3px solid var(--c-violet); outline-offset: 3px; }
.tier__head { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 72px; padding: 14px; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.tier__head input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tier__thumbs { display: flex; align-items: center; }
.tier__thumbs img { width: 52px; height: 52px; object-fit: cover; border-radius: 12px; background: var(--c-alt); border: 2px solid var(--c-card); box-shadow: 0 2px 6px rgba(28,18,51,.18); }
.tier__thumbs img + img { margin-left: -36px; }
.tier__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tier__t { font: 800 1.0625rem/1.2 var(--f-disp); text-transform: uppercase; letter-spacing: .01em; }
.tier__pills { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 2px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .8125rem; font-weight: 700; line-height: 1.5; }
.pill--save { background: var(--c-night); color: var(--c-lime); }
.pill--save.is-warn { background: var(--c-note-bg); color: var(--c-ink); border: 1px solid var(--c-note-line); }
.tier__p { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tier__p b { font: 800 1.1875rem/1.15 var(--f-disp); }
.tier__p s { font-size: .9375rem; color: var(--c-ink-2); text-decoration-thickness: 1.5px; }
.tier__badge { order: -1; align-self: flex-start; margin: 10px 14px -2px; padding: 3px 10px; border-radius: 999px; background: var(--c-lime); color: var(--c-night); font-size: .8125rem; font-weight: 700; line-height: 1.3; border: 1.5px solid var(--c-night); pointer-events: none; }
.tier.is-off { border-style: dashed; background: transparent; }
.tier.is-off .tier__head, .tier.is-off input { cursor: not-allowed; }
.tier.is-off .tier__t, .tier.is-off .tier__p, .tier.is-off .tier__thumbs { opacity: .55; }
/* expanded part of the selected card: one select per unit */
.tier__more:empty { display: none; }
.tier__more { display: grid; gap: 12px; padding: 0 14px 16px; border-top: 1px solid var(--c-line); padding-top: 14px; margin: 0 14px; padding-left: 0; padding-right: 0; animation: tiermore 200ms var(--e-out); }
.tunit { display: grid; gap: 6px; }
.tunit__l { display: flex; align-items: baseline; gap: 8px; font-weight: 700; }
.tunit__l small { font-weight: 500; color: var(--c-ink-2); font-size: .875rem; }
.tsel { width: 100%; min-height: 48px; padding: 0 44px 0 14px; font-family: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; color: var(--c-ink); background: var(--c-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23271a16' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; border: 1.5px solid var(--c-line); border-radius: var(--c-r-s); appearance: none; -webkit-appearance: none; cursor: pointer; }
.tsel:focus-visible { outline: 3px solid var(--c-violet); outline-offset: 2px; }
.tunits__hint { margin: 0; font-size: .875rem; color: var(--c-ink-2); }
.tiers__err { margin: 0 0 8px; padding: 10px 14px; background: var(--c-note-bg); border: 1px solid var(--c-note-line); border-radius: var(--c-r-s); font-weight: 600; }
.pp__main b.is-pop { animation: tierpop 220ms var(--e-out); }
@keyframes tierpop { from { opacity: .35; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@keyframes tiermore { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
#colores[hidden] { display: none; }
@media (max-width: 380px) { .tier__head { gap: 10px; padding: 12px; } .tier__thumbs img { width: 46px; height: 46px; } .tier__thumbs img + img { margin-left: -32px; } .tier__p b { font-size: 1.0625rem; } }
@media (prefers-reduced-motion: reduce) { .tier { transition: none; } .tier__more, .pp__main b.is-pop { animation: none; } }
.pill[hidden], .tier__badge[hidden], .tier__p [hidden] { display: none; }
.tsel:disabled { opacity: .6; cursor: progress; }
.tunits__hint[hidden] { display: none; }
