/* Akcijos page (Figma "Akcijos" 220:2339, mobile 220:22742). The hero and
   the promo cards are the homepage's (global.css .hero, .promo-card), the
   publication cards solid_publications' (.flyer-card, its front.css). */

#content-wrapper:has(.promotions-page) {
    float: none;
    inline-size: 100%;
    margin: 0;
    padding: 0;
}

main:has(.promotions-page) {
    max-inline-size: none;
    box-shadow: none;
}

/* 18px under the header (16px on phones), hero or not */
.promotions-page {
    padding-block: 18px calc(130px - var(--footer-gap));
}

.promotions-page .hero {
    margin-block-start: 0;
}

/* Promo cards: 4 per row, 323px wide at 1440px, 26px under the hero */
.promotions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero + .container > .promotions-grid {
    margin-block-start: 26px;
}

/* An h2 here (an h3 on the homepage): the card sets the type, not the margin */
.promotions-grid .promo-card__title {
    margin-block: 0;
}

.promotions-flyers {
    margin-block-start: 26px;
}

.promotions-flyers .flyer-card__title {
    margin-block: 0;
}

.promotions-empty {
    margin: 0;
    padding: 48px 24px;
    border-radius: var(--radius-md);
    background-color: var(--color-bg-surface);
    color: var(--color-text);
    font: var(--text-p);
    text-align: center;
}

@media (max-width: 1175.98px) {
    .promotions-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .promotions-page {
        padding-block: 16px calc(64px - var(--footer-gap));
    }

    .promotions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 7px;
    }

    .hero + .container > .promotions-grid,
    .promotions-flyers {
        margin-block-start: 32px;
    }

    /* Figma: title and badge 10px from the card edge (the theme's card has 16px) */
    .promotions-grid .promo-card {
        padding-inline: 10px;
    }

    .promotions-flyers {
        row-gap: 8px;
    }
}
