.storefront-skeleton-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.storefront-skeleton-block,
.storefront-skeleton-line,
.storefront-skeleton-button {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 37%, #e5e7eb 63%);
    background-size: 200% 100%;
    animation: storefront-shimmer 1.2s linear infinite;
}

.storefront-skeleton-block {
    border-radius: 0.5rem;
}

.storefront-skeleton-line {
    height: 0.875rem;
    border-radius: 9999px;
}

.storefront-skeleton-line--short {
    width: 62%;
}

.storefront-skeleton-button {
    height: 2.25rem;
    border-radius: 0.375rem;
}

@keyframes storefront-shimmer {
    to { background-position: -200% 0; }
}

[data-store-reveal-grid].storefront-reveal-pending > * {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 240ms cubic-bezier(0.23, 1, 0.32, 1), transform 240ms cubic-bezier(0.23, 1, 0.32, 1);
}

[data-store-reveal-grid].storefront-reveal-pending > *.storefront-reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

.store-purchase-button,
.store-product-card {
    transition: transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}

.store-purchase-button:active,
.store-product-card:active {
    transform: scale(0.97);
}

.storefront-sheet-enter {
    transition-duration: 200ms;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.storefront-sheet-leave {
    transition-duration: 150ms;
    transition-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
}

.storefront-related-strip {
    display: flex;
    margin-inline: -0.75rem;
    padding-inline: 0.75rem;
    overflow-x: auto;
    scroll-padding-inline-start: 0.75rem;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.storefront-related-strip::-webkit-scrollbar {
    display: none;
}

.storefront-related-strip > * {
    flex: 0 0 66%;
    min-width: 0;
    scroll-snap-align: start;
}

@media (min-width: 640px) and (max-width: 767px) {
    .storefront-related-strip {
        margin-inline: -1.5rem;
        padding-inline: 1.5rem;
        scroll-padding-inline-start: 1.5rem;
    }

    .storefront-related-strip > * {
        flex-basis: 44%;
    }
}

@media (min-width: 768px) {
    .storefront-related-strip {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin-inline: 0;
        padding-inline: 0;
        overflow-x: visible;
        scroll-padding-inline-start: 0;
        scroll-snap-type: none;
        overscroll-behavior-x: auto;
    }

    .storefront-related-strip > * {
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .storefront-skeleton-block,
    .storefront-skeleton-line,
    .storefront-skeleton-button {
        animation: none;
        background: #e5e7eb;
    }

    [data-store-reveal-grid].storefront-reveal-pending > * {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .store-purchase-button,
    .store-product-card {
        transition: none;
    }
}

.store-product-card__countdown {
    box-sizing: border-box;
    /* The callout borrows gutter space so padding cannot wrap the 142px-card label. */
    max-width: calc(100% + var(--store-space-6, 24px));
    margin-inline-start: calc(-1 * var(--store-space-2, 8px));
    margin-inline-end: calc(-1 * var(--store-space-4, 16px));
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    margin-block: 8px;
    padding: 6px 4px;
    border: 1px solid var(--store-offer-border, rgba(190, 24, 93, 0.2));
    border-radius: var(--store-radius-sm, 6px);
    background: var(--store-offer-bg, rgba(236, 72, 153, 0.08));
    box-shadow: none;
    transform: none;
    color: var(--store-offer-ink, #831843);
    font-size: 12px;
    line-height: 1.35;
}

.store-product-card__countdown-label {
    color: inherit;
    font-size: inherit;
    white-space: normal;
    overflow-wrap: anywhere;
}

.store-product-card__countdown-detail {
    white-space: nowrap;
}

.store-product-card__countdown-time {
    color: inherit;
    font-size: inherit;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.store-product-card__shipping-row {
    align-self: flex-start;
}

/* Lighting preference: native radio semantics, quiet switch material, genuine photos. */
.product-lighting { min-width: 0; margin: 0 0 1rem; padding: 0; border: 0; color: #24313d; }
.product-lighting legend { margin-bottom: .625rem; padding: 0; font-size: var(--store-text-sm, .875rem); font-weight: 600; }
.product-lighting__switch { display: inline-grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .25rem; max-width: 100%; padding: .25rem; border: 1px solid #b7bec6; border-radius: 999px; background: var(--store-color-surface-muted, #f1f3f5); }
.product-lighting__option { position: relative; display: block; min-width: 0; cursor: pointer; }
.product-lighting__option input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.product-lighting__option span { display: flex; align-items: center; justify-content: center; gap: .375rem; min-height: 44px; padding: .5rem .75rem; border: 1px solid transparent; border-radius: 999px; font-size: .875rem; font-weight: 600; }
.product-lighting__option svg { width: 18px; height: 18px; flex-shrink: 0; }
.product-lighting__option input:checked + span { border-color: #647181; background: #fff; color: #192737; }
.product-lighting__option input[value="warm"]:checked + span { background: #fff3db; color: #533a19; }
.product-lighting__option input:focus-visible + span { outline: 3px solid var(--store-color-primary-ink, #9c205f); outline-offset: 3px; }
.product-lighting__option input:disabled + span { color: #566170; cursor: not-allowed; }
.product-lighting p, .product-lighting noscript { display: block; max-width: 36rem; margin: .625rem 0 0; color: #4b5563; font-size: .8125rem; line-height: 1.5; }
.product-lighting__previous { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; opacity: 1; transition: opacity 200ms var(--sf-ease-out, cubic-bezier(.23, 1, .32, 1)); }
.product-lighting__previous--fading { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .product-lighting__previous { transition-duration: 0s; } }

/* -------------------------------------------------------------------------
   Oferta relámpago y escasez (home + ficha)
   Paleta propia: amarillo tipo Mercado Libre para el reloj y gradiente
   naranja → rojo para la barra de unidades disponibles.
   ------------------------------------------------------------------------- */
.store-product-card__flash {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.12rem;
    max-width: calc(100% - 1rem);
    padding: 0.2rem 0.28rem;
    border-radius: 5px;
    background: linear-gradient(135deg, #ffeb5a 0%, #ffc400 100%);
    color: #1f2937;
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.24);
    pointer-events: none;
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.01em;
}

.store-product-card__flash-bolt {
    margin-right: 0.04rem;
    color: #111827;
    font-size: 0.7rem;
}

.store-product-card__flash-digit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
    min-width: 1.05em;
    padding: 0.12rem 0.13rem;
    border-radius: 3px;
    background: #fff;
    color: #111827;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.store-product-card__flash-digit-current {
    display: block;
}

.store-product-card__flash-digit-current.is-rolling {
    animation: flash-digit-in 320ms cubic-bezier(0.23, 1, 0.32, 1);
}

.store-product-card__flash-digit-ghost {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    animation: flash-digit-out 320ms cubic-bezier(0.23, 1, 0.32, 1);
}

.store-product-card__flash-sep {
    color: #4b3b00;
    font-weight: 900;
}

.store-product-card__prices--flash {
    flex-direction: column-reverse;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 0.1rem;
}

.store-product-card__prices--flash .store-product-card__price-old {
    margin-bottom: 0;
}

.store-product-card__scarcity {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.store-product-card__scarcity-head {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.store-product-card__scarcity-label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    overflow: hidden;
    color: #c2410c;
    font-size: var(--store-text-2xs, 0.625rem);
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.store-product-card__scarcity-label i {
    color: #f97316;
    font-size: 0.65rem;
}

.store-product-card__scarcity-track {
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: #ffe7d1;
    overflow: hidden;
}

.store-product-card__scarcity-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff9f1c 0%, #ff7a00 55%, #ff4d4d 100%);
    transition: width 280ms cubic-bezier(0.23, 1, 0.32, 1);
}

.product-flash-offer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 0 1rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid #eab308;
    border-radius: var(--store-radius-md, 10px);
    background: linear-gradient(100deg, #fff07a 0%, #ffe14d 45%, #ffd000 100%);
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(234, 179, 8, 0.18);
    box-sizing: border-box;
    overflow: hidden;
}

/* La ficha es un flex item: sin min-width:0 su contenido puede empujar
   el ancho de toda la página en mobile. */
.store-product-summary,
.store-product-buybox,
.store-product-main__inner {
    min-width: 0;
}

.product-flash-offer__label {
    display: inline-flex;
    align-items: center;
    flex: 0 1 auto;
    gap: 0.3rem;
    min-width: 0;
    color: #111827;
    font-size: clamp(10px, 3vw, 14px);
    font-weight: 900;
    letter-spacing: 0.01em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.product-flash-offer__label i {
    font-size: 1.1em;
}

.product-flash-offer__timer {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    flex: 0 1 auto;
    gap: 0.2rem clamp(4px, 1vw, 8px);
    min-width: 0;
}

.product-flash-offer__ends {
    color: #4b3b00;
    font-size: clamp(9px, 2.4vw, 11.5px);
    font-weight: 700;
    white-space: nowrap;
}

.product-flash-offer__digits {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    min-width: 0;
    font-variant-numeric: tabular-nums;
}

.product-flash-offer__digit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
    min-width: clamp(20px, 5.6vw, 27px);
    padding: 0.16rem 0.18rem;
    border-radius: 4px;
    background: #fff;
    color: #111827;
    text-align: center;
    font-size: clamp(10px, 3.1vw, 14px);
    font-weight: 800;
    line-height: 1.1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
}

.product-flash-offer__digit-current {
    display: block;
    transform: translateY(0);
}

.product-flash-offer__digit-current.is-rolling {
    animation: flash-digit-in 320ms cubic-bezier(0.23, 1, 0.32, 1);
}

.product-flash-offer__digit-ghost {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    animation: flash-digit-out 320ms cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes flash-digit-in {
    from {
        opacity: 0.15;
        transform: translateY(-110%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flash-digit-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0.15;
        transform: translateY(110%);
    }
}

.product-flash-offer__sep {
    color: #3f3200;
    font-size: clamp(10px, 3.1vw, 14px);
    font-weight: 900;
}

.product-flash-offer__day {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
}

.product-flash-offer__unit {
    color: #4b3b00;
    font-size: clamp(9px, 2.4vw, 11.5px);
    font-weight: 800;
}

.product-scarcity {
    margin: 0.5rem 0 1rem;
    padding: 0.65rem 0.75rem 0.6rem;
    border: 1px solid #ffd3b0;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff9f4 0%, #fff3e8 100%);
    box-sizing: border-box;
}

.product-scarcity__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.product-scarcity__label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #9a3412;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.product-scarcity__label i {
    color: #f97316;
    font-size: 0.8rem;
}

.product-scarcity__count {
    color: #c2410c;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.product-scarcity__track {
    position: relative;
    height: 9px;
    border-radius: 999px;
    background: #ffe3c7;
    box-shadow: inset 0 1px 2px rgba(124, 45, 18, 0.08);
    overflow: hidden;
}

.product-scarcity__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff9f1c 0%, #ff7a00 52%, #ff4d4d 100%);
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.25);
    transition: width 300ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (max-width: 359px) {
    .product-flash-offer {
        flex-wrap: wrap;
        row-gap: 0.35rem;
    }

    .product-flash-offer__ends {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .store-product-card__scarcity-fill,
    .product-scarcity__fill {
        transition: none;
    }

    .product-flash-offer__digit-current.is-rolling,
    .product-flash-offer__digit-ghost,
    .store-product-card__flash-digit-current.is-rolling,
    .store-product-card__flash-digit-ghost {
        animation: none;
    }

    .product-flash-offer__digit-ghost,
    .store-product-card__flash-digit-ghost {
        display: none !important;
    }
}
