/* Recomendações e partilha nas páginas de detalhe de oferta. */

.offer-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    margin: -64px 0 72px;
    padding: 14px 0 0;
}

.offer-share-label {
    margin: 0;
    color: var(--detail-teal);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.offer-share-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.offer-share-native,
.offer-share-whatsapp,
.offer-share-facebook,
.offer-share-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 8px 16px;
    border: 1px solid rgba(47, 103, 109, 0.28);
    border-radius: 999px;
    background: #fff;
    color: var(--detail-teal-dark);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.offer-share-native:hover,
.offer-share-whatsapp:hover,
.offer-share-facebook:hover,
.offer-share-copy:hover,
.offer-share-native:focus-visible,
.offer-share-whatsapp:focus-visible,
.offer-share-facebook:focus-visible,
.offer-share-copy:focus-visible {
    border-color: var(--detail-coral);
    color: var(--detail-ink);
    background: var(--detail-cream);
    outline: none;
}

.offer-share-native:focus-visible,
.offer-share-whatsapp:focus-visible,
.offer-share-facebook:focus-visible,
.offer-share-copy:focus-visible {
    outline: 2px solid rgba(217, 112, 122, 0.55);
    outline-offset: 3px;
}

.offer-share.is-fallback .offer-share-native {
    display: none !important;
}

.offer-share-toast {
    position: fixed;
    z-index: 45;
    left: 50%;
    bottom: calc(var(--offer-sticky-bar-height, 108px) + env(safe-area-inset-bottom, 0px) + 16px);
    max-width: min(90vw, 320px);
    margin: 0;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--detail-ink);
    color: #fffaf7;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    box-shadow: 0 12px 28px rgba(39, 79, 88, 0.22);
    transform: translateX(-50%) translateY(8px);
    opacity: 0;
    pointer-events: none;
}

.offer-share-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    transition: opacity 180ms ease, transform 180ms ease;
}

.offer-related-offers {
    margin-top: 56px;
    padding: 8px 0 0;
}

.offer-related-offers .portal-kicker {
    margin-bottom: 8px;
}

.offer-related-offers h2 {
    margin: 0;
    max-width: 18ch;
    color: var(--detail-ink);
    font-family: var(--detail-serif);
    font-size: clamp(1.7rem, 3vw, 2.15rem);
    font-weight: 600;
    letter-spacing: -0.05em;
    line-height: 1.05;
}

.offer-related-lead {
    max-width: 46ch;
    margin: 10px 0 0;
    color: var(--detail-muted);
    font-size: 14px;
    line-height: 1.55;
}

.offer-related-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 18px;
    margin-top: 28px;
}

.offer-related-card {
    position: relative;
    display: flex;
    flex: 1 1 calc((100% - 36px) / 3);
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--detail-line);
    border-radius: 16px 16px 5px 16px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(39, 79, 88, 0.06);
    transition:
        transform 240ms ease,
        box-shadow 240ms ease,
        border-color 240ms ease;
}

.offer-related-card-link {
    color: inherit;
    text-decoration: none;
}

.offer-related-card-link::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
}

.offer-related-card:hover,
.offer-related-card:has(:focus-visible) {
    border-color: rgba(217, 112, 122, 0.48);
    box-shadow: 0 18px 36px rgba(39, 79, 88, 0.12);
    transform: translateY(-6px);
}

.offer-related-card:has(:focus-visible) {
    outline: 2px solid rgba(217, 112, 122, 0.42);
    outline-offset: 3px;
}

.offer-related-card .database-offer-visual {
    position: relative;
    height: 214px;
    overflow: hidden;
    background: linear-gradient(145deg, var(--detail-ink) 0%, var(--detail-teal) 55%, var(--detail-coral) 100%);
}

.offer-related-card .database-offer-visual::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(39, 79, 88, 0.02) 25%,
        rgba(39, 79, 88, 0.72) 100%
    );
    content: "";
    pointer-events: none;
}

.offer-related-card .database-offer-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.offer-related-card .database-offer-visual img.is-offer-fallback {
    object-fit: contain;
}

.offer-related-card:hover .database-offer-visual img,
.offer-related-card:has(:focus-visible) .database-offer-visual img {
    transform: scale(1.06);
}

.offer-related-card:hover .database-offer-visual img.is-offer-fallback,
.offer-related-card:has(:focus-visible) .database-offer-visual img.is-offer-fallback {
    transform: none;
}

.offer-related-card .database-offer-visual .portal-photo-credit {
    position: absolute;
    left: 0;
    right: auto;
    bottom: 0;
    z-index: 2;
    max-width: 68%;
    margin: 0;
    padding: 0 12px 8px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.3;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
}

.offer-related-card .database-offer-visual .portal-photo-credit a {
    position: relative;
    z-index: 2;
}

.offer-related-card .database-offer-soon {
    position: absolute;
    z-index: 2;
    top: 14px;
    right: 14px;
    max-width: calc(100% - 28px);
    padding: 7px 11px;
    border-radius: 999px;
    color: #fffaf7;
    background: var(--detail-coral-deep);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    white-space: nowrap;
}

.offer-related-card .database-offer-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 12px;
    padding: 18px 18px 20px;
}

.offer-related-card .database-offer-body h3 {
    margin: 0;
    color: var(--detail-ink);
    font-family: var(--detail-serif);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.15;
}

.offer-related-facts {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.offer-related-facts li {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    gap: 8px 12px;
    align-items: baseline;
}

.offer-related-facts li span {
    color: var(--detail-teal);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.offer-related-facts li strong {
    color: var(--detail-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
}

.offer-related-card .database-offer-footer {
    margin-top: auto;
}

.offer-related-card .database-offer-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
}

.offer-related-card .database-offer-price small {
    width: 100%;
    color: var(--detail-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.offer-related-card .database-offer-price strong {
    color: var(--detail-coral-deep);
    font-family: var(--detail-serif);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1;
}

.offer-related-card .database-offer-unit {
    color: var(--detail-muted);
    font-size: 12px;
}

.offer-related-offers + .offer-detail-bottom-links {
    margin-top: 56px;
}

@media (max-width: 900px) {
    .offer-related-card {
        flex-basis: calc((100% - 18px) / 2);
    }
}

@media (max-width: 760px) {
    .offer-share {
        margin: -36px 0 48px;
    }

    .offer-related-offers {
        margin-top: 40px;
    }

    .offer-related-card {
        flex-basis: 100%;
    }

    .offer-related-card .database-offer-visual {
        height: 200px;
    }
}

@media (max-width: 430px) {
    .offer-share {
        margin: -24px 0 40px;
        gap: 10px 12px;
    }

    .offer-share-native,
    .offer-share-whatsapp,
    .offer-share-facebook,
    .offer-share-copy {
        min-height: 44px;
        padding: 8px 14px;
    }

    .offer-related-offers h2 {
        max-width: none;
        overflow-wrap: anywhere;
    }

    .offer-related-lead,
    .offer-related-facts li strong,
    .offer-related-card .database-offer-body h3 {
        overflow-wrap: anywhere;
    }

    .offer-related-card .database-offer-visual {
        height: 188px;
    }

    .offer-share-toast {
        bottom: calc(var(--offer-sticky-bar-height, 160px) + env(safe-area-inset-bottom, 0px) + 12px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .offer-share-native,
    .offer-share-whatsapp,
    .offer-share-facebook,
    .offer-share-copy,
    .offer-related-card,
    .offer-related-card:hover,
    .offer-related-card:has(:focus-visible),
    .offer-related-card .database-offer-visual img,
    .offer-related-card:hover .database-offer-visual img,
    .offer-related-card:has(:focus-visible) .database-offer-visual img {
        transition: none;
        transform: none;
        animation: none;
    }

    .offer-share-toast,
    .offer-share-toast.is-visible {
        transition: none;
        transform: translateX(-50%);
    }
}
