/**
 * =========================================================
 * ARQUIVO : /assets/css/ofertas-relampago.css
 * PROJETO : BomVendedor
 * MÓDULO  : Grid público de Ofertas Relâmpago
 * VERSÃO  : V1.1 PREMIUM BREATHING LAYOUT
 * DATA    : 04/05/2026
 * =========================================================
 * OBJETIVO:
 * - Dar mais respiro visual ao bloco de Ofertas Relâmpago
 * - Evitar sobreposição visual da sombra no título seguinte
 * - Reduzir sensação de cards espremidos em desktops médios
 * - Preservar compatibilidade com a Home atual e com mobile
 * =========================================================
 */

.bv-flash-section {
    position: relative;
    isolation: isolate;
    margin: 34px 0 58px;
    padding: clamp(20px, 2.2vw, 28px);
    border-radius: 32px;
    overflow: hidden;
    background:
        radial-gradient(circle at 88% 12%, rgba(245, 183, 0, 0.22), transparent 24%),
        radial-gradient(circle at 10% 18%, rgba(54, 180, 229, 0.16), transparent 26%),
        linear-gradient(135deg, #0D1B3D 0%, #102b63 54%, #071126 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 24px 48px rgba(13, 27, 61, 0.18),
        0 8px 18px rgba(13, 27, 61, 0.10);
    color: #ffffff;
}

.bv-flash-section::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.42;
    background:
        linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 48%, transparent 100%),
        repeating-linear-gradient(90deg, transparent 0 58px, rgba(255, 255, 255, 0.03) 58px 59px);
    pointer-events: none;
}

.bv-flash-section::after {
    content: '';
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: 31px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    pointer-events: none;
}

.bv-flash-section + .home-section {
    margin-top: 54px;
}

.bv-flash-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    margin-bottom: 22px;
}

.bv-flash-title-wrap {
    min-width: 0;
}

.bv-flash-kicker {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #F5B700;
    background: rgba(245, 183, 0, 0.12);
    border: 1px solid rgba(245, 183, 0, 0.28);
    font-size: 12px;
    line-height: 1;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.bv-flash-title-wrap h2 {
    margin: 12px 0 8px;
    font-size: clamp(30px, 3.4vw, 46px);
    line-height: 1;
    letter-spacing: -0.055em;
    font-weight: 950;
    color: #ffffff;
}

.bv-flash-title-wrap p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
    line-height: 1.65;
    font-weight: 650;
}

.bv-flash-countdown {
    min-width: 336px;
    max-width: 392px;
    padding: 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 16px 30px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(14px);
}

.bv-flash-countdown__label {
    display: block;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bv-flash-countdown__units {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.bv-flash-countdown__unit {
    min-width: 0;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 8px;
    border-radius: 18px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.bv-flash-countdown__unit strong {
    display: block;
    font-size: 23px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.bv-flash-countdown__unit small {
    color: rgba(255, 255, 255, 0.70);
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
}

.bv-flash-countdown__unit--spin {
    position: relative;
    --bv-flash-progress: 0deg;
    background:
        linear-gradient(#0D1B3D, #0D1B3D) padding-box,
        conic-gradient(from -90deg, #F5B700 var(--bv-flash-progress), rgba(255,255,255,.14) 0deg) border-box;
    border: 2px solid transparent;
    box-shadow: 0 0 0 1px rgba(245, 183, 0, 0.18), 0 0 24px rgba(245, 183, 0, 0.13);
}

.bv-flash-countdown--static {
    min-width: 240px;
}

.bv-flash-countdown--static strong {
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    font-weight: 950;
}

.bv-flash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 232px), 1fr));
    gap: 18px;
    align-items: stretch;
}

.bv-flash-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    color: #0D1B3D;
    border: 1px solid rgba(255, 255, 255, 0.44);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.bv-flash-card:hover {
    transform: translateY(-4px);
    border-color: rgba(54, 180, 229, 0.45);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.20);
}

.bv-flash-card__image {
    position: relative;
    display: block;
    aspect-ratio: 1.18 / 1;
    padding: 18px;
    background: linear-gradient(135deg, #f8fbff 0%, #eaf3ff 100%);
    text-decoration: none;
}

.bv-flash-card__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 12px 16px rgba(13, 27, 61, 0.11));
}

.bv-flash-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #0D1B3D;
    background: linear-gradient(135deg, #F5B700 0%, #ffd76b 100%);
    box-shadow: 0 10px 20px rgba(245, 183, 0, 0.24);
    font-size: 13px;
    font-weight: 950;
    letter-spacing: -0.02em;
}

.bv-flash-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.bv-flash-card__store {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #50607a;
    font-size: 12px;
    font-weight: 850;
}

.bv-flash-card__store img {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.bv-flash-card h3 {
    min-height: 56px;
    margin: 0 0 10px;
    color: #0D1B3D;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: -0.03em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bv-flash-card h3 a {
    color: inherit;
    text-decoration: none;
}

.bv-flash-card h3 a:hover {
    color: #2563eb;
}

.bv-flash-card__prices {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bv-flash-card__prices span {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
    text-decoration: line-through;
}

.bv-flash-card__prices strong {
    color: #ef3b24;
    font-size: 26px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.bv-flash-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 12px 0 14px;
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
}

.bv-flash-hot {
    color: #ef3b24;
}

.bv-flash-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
    text-decoration: none;
    font-size: 13px;
    font-weight: 950;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.bv-flash-card__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.30);
}

.bv-flash-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.bv-flash-footer__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
}

.bv-flash-footer__link:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* =========================================================
   AJUSTES FINOS DA HOME QUANDO O BLOCO RELÂMPAGO ESTÁ ATIVO
   ---------------------------------------------------------
   Evita grids compactados demais em desktops médios e separa
   visualmente o bloco relâmpago da seção seguinte.
========================================================= */
@media (min-width: 981px) and (max-width: 1420px) {
    .bv-flash-section ~ .home-section .home-products-grid,
    .bv-flash-section ~ .home-section .home-products-grid--eight {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }

    .bv-flash-section ~ .home-section .home-product-card {
        padding: 18px;
        border-radius: 24px;
    }

    .bv-flash-section ~ .home-section .home-product-card__image {
        min-height: 238px;
    }

    .bv-flash-section ~ .home-section .home-product-card__image img {
        height: 200px;
    }
}

@media (max-width: 1120px) {
    .bv-flash-head {
        grid-template-columns: 1fr;
    }

    .bv-flash-countdown {
        min-width: 0;
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 820px) {
    .bv-flash-section {
        margin: 24px 0 46px;
        padding: 18px;
        border-radius: 26px;
    }

    .bv-flash-section + .home-section {
        margin-top: 40px;
    }

    .bv-flash-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(246px, 82vw);
        grid-template-columns: none;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        padding: 2px 2px 12px;
        scrollbar-width: thin;
    }

    .bv-flash-card {
        scroll-snap-align: start;
    }

    .bv-flash-footer {
        justify-content: stretch;
    }

    .bv-flash-footer__link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 560px) {
    .bv-flash-section {
        margin-inline: -2px;
        padding: 16px;
    }

    .bv-flash-title-wrap h2 {
        font-size: 30px;
    }

    .bv-flash-title-wrap p {
        font-size: 14px;
    }

    .bv-flash-countdown__units {
        gap: 6px;
    }

    .bv-flash-countdown__unit {
        min-height: 62px;
        border-radius: 15px;
        padding: 8px 6px;
    }

    .bv-flash-countdown__unit strong {
        font-size: 20px;
    }

    .bv-flash-card__prices strong {
        font-size: 23px;
    }
}
