/* Empty cart v2 (everyone, see includes/woocommerce/empty-cart-v2.php). */

body.por-empty-cart-v2 .wp-block-woocommerce-empty-cart-block {
    margin: 0;
    padding: 0;
}

body.por-empty-cart-v2 .por-ec {
    --por-ec-navy: var(--black-blue, #0b1f3a);
    --por-ec-text: var(--gray-600, #4b5563);
    --por-ec-line: #e5e4df;
    --por-ec-soft: #f4f4f2;
    --por-ec-gold: #b08d57;
    color: var(--por-ec-navy);
}

/* Hero ---------------------------------------------------------------------- */

body.por-empty-cart-v2 .por-ec__hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 480px;
    margin: 0 auto;
    padding: 8px 0 28px;
    text-align: center;
}

body.por-empty-cart-v2 .por-ec__art {
    display: block;
    width: 128px;
    height: auto;
    margin-bottom: 12px;
}

body.por-empty-cart-v2 .por-ec__title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--por-ec-navy);
}

body.por-empty-cart-v2 .por-ec__text {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--por-ec-text);
}

body.por-empty-cart-v2 .por-ec__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}

body.por-empty-cart-v2 .por-ec__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 24px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: var(--por-ec-navy);
    border-radius: 100px;
    transition: background-color .15s;
}

body.por-empty-cart-v2 .por-ec__btn:hover,
body.por-empty-cart-v2 .por-ec__btn:focus-visible {
    color: #fff;
    background: #1c3558;
}

body.por-empty-cart-v2 .por-ec__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    font-size: 15px;
    font-weight: 600;
    color: var(--por-ec-navy);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--por-ec-line);
}

body.por-empty-cart-v2 .por-ec__link:hover {
    text-decoration-color: currentColor;
}

/* Black Friday chip (only while the promo is visible, see por-black-friday). */
body.por-empty-cart-v2 .por-ec__promo {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 16px;
    padding: 10px 14px;
    font-size: 13.5px;
    line-height: 1.35;
    color: #fff;
    text-align: left;
    text-decoration: none;
    background: linear-gradient(100deg, #4a0d12, #7a1a1f 55%, #4a0d12);
    border-radius: 14px;
}

body.por-empty-cart-v2 .por-ec__promo:hover {
    color: #fff;
}

body.por-empty-cart-v2 .por-ec__promo-label {
    flex: none;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #2a1a05;
    background: linear-gradient(180deg, #f3d58a, #c99a3f);
    border-radius: 100px;
}

body.por-empty-cart-v2 .por-ec__promo-text {
    flex: 1 1 auto;
    min-width: 0;
}

body.por-empty-cart-v2 .por-ec__promo svg {
    flex: none;
}

/* Best sellers -------------------------------------------------------------- */

body.por-empty-cart-v2 .por-ec__products {
    padding-top: 24px;
    border-top: 1px solid var(--por-ec-line);
}

body.por-empty-cart-v2 .por-ec__subtitle {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
    color: var(--por-ec-navy);
}

body.por-empty-cart-v2 .por-ec__grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 44%;
    gap: 12px;
    margin: 0 -16px;
    padding: 2px 16px 12px;
    overflow-x: auto;
    list-style: none;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

body.por-empty-cart-v2 .por-ec__grid::-webkit-scrollbar {
    display: none;
}

body.por-empty-cart-v2 .por-ec-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--por-ec-line);
    border-radius: 16px;
    scroll-snap-align: start;
}

body.por-empty-cart-v2 .por-ec-card__media {
    display: block;
    margin-bottom: 10px;
    overflow: hidden;
    background: var(--por-ec-soft);
    border-radius: 12px;
    aspect-ratio: 1;
}

body.por-empty-cart-v2 .por-ec-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: contain;
}

body.por-empty-cart-v2 .por-ec-card__title {
    display: -webkit-box;
    min-height: 2.7em;
    margin-bottom: 4px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--por-ec-navy);
    text-decoration: none;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

body.por-empty-cart-v2 .por-ec-card__title:hover {
    text-decoration: underline;
}

body.por-empty-cart-v2 .por-ec-card__price {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #2d3748;
}

body.por-empty-cart-v2 .por-ec-card__price del {
    margin-right: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #8c96a3;
}

body.por-empty-cart-v2 .por-ec-card__price ins {
    text-decoration: none;
}

body.por-empty-cart-v2 .por-ec-card__add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    margin-top: auto;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--por-ec-navy);
    text-decoration: none;
    background: #fff;
    border: 1.5px solid var(--por-ec-navy);
    border-radius: 100px;
    transition: background-color .15s, color .15s;
}

body.por-empty-cart-v2 .por-ec-card__add:hover,
body.por-empty-cart-v2 .por-ec-card__add:focus-visible {
    color: #fff;
    background: var(--por-ec-navy);
}

body.por-empty-cart-v2 .por-ec-card__add svg {
    width: 16px;
    height: 16px;
}

body.por-empty-cart-v2 .por-ec-card__add.is-busy {
    pointer-events: none;
    opacity: .55;
}

/* Trust strip (same badges as the filled cart) ------------------------------ */

body.por-empty-cart-v2 .por-ec__trust {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 20px 0 0;
    padding: 16px 0 0;
    list-style: none;
    border-top: 1px solid var(--por-ec-line);
}

body.por-empty-cart-v2 .por-ec__trust li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin: 0;
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
    color: var(--por-ec-text);
}

body.por-empty-cart-v2 .por-ec__trust svg {
    color: var(--por-ec-navy);
}

body.por-empty-cart-v2 .por-ec__trust-name {
    font-weight: 600;
    color: var(--por-ec-navy);
}

body.por-empty-cart-v2 .por-ec__trust-note:empty {
    display: none;
}

/* Tablet and desktop: a grid instead of the scroller ------------------------- */

@media (min-width: 768px) {
    body.por-empty-cart-v2 .por-ec__hero {
        padding: 16px 0 36px;
    }

    body.por-empty-cart-v2 .por-ec__art {
        width: 150px;
    }

    body.por-empty-cart-v2 .por-ec__title {
        font-size: 28px;
    }

    body.por-empty-cart-v2 .por-ec__actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px 24px;
    }

    body.por-empty-cart-v2 .por-ec__btn {
        min-width: 260px;
    }

    body.por-empty-cart-v2 .por-ec__products {
        padding-top: 32px;
    }

    body.por-empty-cart-v2 .por-ec__subtitle {
        font-size: 22px;
    }

    body.por-empty-cart-v2 .por-ec__grid {
        grid-auto-flow: row;
        grid-auto-columns: auto;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        margin: 0;
        padding: 0;
        overflow: visible;
    }

    body.por-empty-cart-v2 .por-ec-card {
        padding: 12px;
    }

    body.por-empty-cart-v2 .por-ec-card__title {
        font-size: 15px;
    }

    body.por-empty-cart-v2 .por-ec__trust {
        max-width: 720px;
        margin: 32px auto 0;
        padding-top: 24px;
    }

    body.por-empty-cart-v2 .por-ec__trust li {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px 8px;
        font-size: 13px;
    }

    body.por-empty-cart-v2 .por-ec__trust-note {
        flex-basis: 100%;
    }
}
