/*
 * Commercial block for [affiliate-offers].
 *
 * Every rule is scoped under .affiliate-review-offers so nothing here can reach the rest
 * of the UltraNews theme. Layout leans on flexbox rather than a grid framework, and
 * colours/typography inherit from the theme instead of introducing a second palette.
 * Loaded only on pages where the shortcode actually renders.
 */
.affiliate-review-offers {
    margin: 1.75rem 0;
}

.affiliate-review-offers__product {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.affiliate-review-offers__header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

/* O contêiner não encolhe.
   O tema tem `img { max-width: 100% }` global, então a largura da miniatura é
   limitada pela do pai — e o pai, sendo item de um flex, encolhia abaixo dos
   132px. Sem este flex-shrink a largura declarada na imagem nunca valia. */
.affiliate-review-offers__thumb {
    flex: 0 0 auto;
}

.affiliate-review-offers__thumb img {
    /* 132x88 (3:2) e nao 96x96.
       A foto de produto e paisagem; num quadrado com object-fit:contain ela
       encolhia para caber na largura e sobrava vazio em cima e embaixo. Na
       proporcao da foto a imagem ocupa a caixa inteira, ficando maior sem
       empurrar o texto ao lado. */
    width: 132px;
    height: 88px;
    object-fit: contain;
    border-radius: 6px;
}

.affiliate-review-offers__identity {
    flex: 1 1 auto;
    min-width: 0;
}

.affiliate-review-offers__name {
    font-size: 1.125rem;
    margin: 0 0 0.25rem;
}

.affiliate-review-offers__brand {
    font-size: 0.875rem;
    opacity: 0.7;
    margin: 0 0 0.5rem;
}

.affiliate-review-offers__description {
    font-size: 0.9375rem;
    line-height: 1.5;
    margin: 0;
}

.affiliate-review-offers__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.affiliate-review-offers__offer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.affiliate-review-offers__offer--best {
    border-color: rgba(25, 135, 84, 0.55);
}

.affiliate-review-offers__store {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 40%;
    min-width: 0;
}

.affiliate-review-offers__store-name {
    font-weight: 600;
}

.affiliate-review-offers__badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: #198754;
    color: #fff;
}

.affiliate-review-offers__note {
    font-size: 0.75rem;
    opacity: 0.7;
}

.affiliate-review-offers__pricing {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    white-space: nowrap;
}

.affiliate-review-offers__original {
    font-size: 0.8125rem;
    opacity: 0.6;
}

.affiliate-review-offers__price {
    font-size: 1.0625rem;
    font-weight: 700;
}

.affiliate-review-offers__price--unknown {
    font-size: 0.9375rem;
    font-weight: 500;
    opacity: 0.8;
}

.affiliate-review-offers__cta {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: #198754;
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    white-space: nowrap;
}

.affiliate-review-offers__cta:hover,
.affiliate-review-offers__cta:focus {
    background: #146c43;
    color: #fff;
    text-decoration: none;
}

.affiliate-review-offers .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Below the theme's tablet breakpoint the row becomes a stack, so the store list stays
   usable on a phone instead of turning into a horizontal scroll. */
@media (max-width: 575.98px) {
    .affiliate-review-offers__header {
        gap: 0.75rem;
    }

    .affiliate-review-offers__thumb img {
        width: 72px;
        height: 72px;
    }

    .affiliate-review-offers__offer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .affiliate-review-offers__pricing {
        white-space: normal;
    }

    .affiliate-review-offers__cta {
        text-align: center;
    }
}
