/* =====================================================================
   Carrossel de anúncios (produtos de afiliados)
   Usado em frontend/consultas.php e licitacoes.php — JS: frontend/js/ads-carrossel.js
   Usa as variáveis de theme.css quando a página as carrega; senão, tema claro.
   ===================================================================== */
.ads-carrossel {
    position: relative;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}
.ads-carrossel[hidden],
.ads-carrossel-seta[hidden],
.ads-carrossel-pontos[hidden] { display: none; }
.ads-carrossel-label {
    position: absolute;
    top: 6px;
    right: 10px;
    z-index: 2;
    font-size: 0.65rem;
    color: var(--text-muted, #888888);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ads-carrossel-viewport { overflow: hidden; touch-action: pan-y; }
.ads-carrossel-trilho {
    display: flex;
    transition: transform 0.5s ease;
}
.ads-slide {
    flex: 0 0 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 64px;
    text-decoration: none;
    color: inherit;
}
.ads-slide:hover { text-decoration: none; }
.ads-slide-img {
    flex: 0 0 120px;
    height: 120px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ads-slide-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ads-slide-corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ads-slide-plataforma {
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}
.ads-slide-titulo {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #333333);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ads-slide-desc {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-secondary, #555555);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ads-slide-rodape { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ads-slide-preco { font-size: 1.05rem; font-weight: 700; color: var(--success, #28a745); }
.ads-slide-preco-de { font-size: 0.8rem; color: var(--text-muted, #888888); text-decoration: line-through; margin-right: 6px; font-weight: 400; }
.ads-slide-cta {
    background: var(--primary, #1351b4);
    color: var(--text-on-primary, #ffffff);
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}
.ads-carrossel-seta {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--border-color, #e0e0e0);
    background: var(--bg-card, #ffffff);
    color: var(--text-secondary, #555555);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.ads-carrossel-seta svg { width: 16px; height: 16px; }
.ads-carrossel-seta:hover { color: var(--primary, #1351b4); border-color: var(--primary, #1351b4); }
.ads-carrossel-seta.anterior { left: 12px; }
.ads-carrossel-seta.proxima { right: 12px; }
.ads-carrossel-pontos {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding-bottom: 10px;
}
.ads-carrossel-pontos button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--border-color, #e0e0e0);
    cursor: pointer;
    transition: width 0.2s, background 0.2s;
}
.ads-carrossel-pontos button.ativo { width: 20px; border-radius: 4px; background: var(--primary, #1351b4); }

@media (max-width: 768px) {
    .ads-slide { padding: 26px 16px 12px; gap: 12px; }
    .ads-slide-img { flex-basis: 84px; height: 84px; }
    .ads-slide-titulo { font-size: 0.9rem; }
    .ads-slide-desc { display: none; }
    .ads-carrossel-seta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ads-carrossel-trilho { transition: none; }
}
