/* ==========================================================================
   AD BLOCKS & CAROUSELS (MOBILE-FIRST)
   1. Hero Banner Integrado no Topo (Modelo 1)
   2. Carrossel de Cards Maiores com Foto de Fundo (Modelo 2)
   3. Carrossel de Cards Menores / Médios de Estabelecimentos (Modelo 3)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Estrutura Global das Seções de Ads & Tipografia Poppins
   -------------------------------------------------------------------------- */
.ads-section,
.ads-hero-wrapper,
.ad-card-large,
.ad-card-medium,
.ads-section-title,
.ads-section-subtitle,
.ads-section-link,
.ad-card-heading,
.ad-card-description,
.ad-card-category-name,
.ad-card-medium-title,
.ad-card-medium-desc,
.ad-card-medium-btn-text,
.ads-hero-title,
.ads-hero-subtitle,
.ads-hero-cta,
.ads-hero-badge {
    font-family: "Poppins", system-ui, -apple-system, sans-serif;
}

.ads-section {
    margin-bottom: 24px;
    width: 100%;
}

.ads-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 12px;
    padding: 0 2px;
}

.ads-section-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ads-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color, #111827);
    margin: 0;
    line-height: 1.25;
}

.ads-section-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted, #6b7280);
    font-weight: 400;
}

.ads-section-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--danger-color, #ea1d2c);
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 6px;
    border-radius: 6px;
    transition: opacity 0.18s ease;
}

.ads-section-link:hover {
    opacity: 0.8;
}

/* Sangria horizontal contínua para Mobile (Bleed com Peek) */
.ads-carousel-bleed {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    overflow: hidden;
}

.ads-scroll-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 14px 2px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
    scroll-padding: 0 16px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.ads-scroll-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.ads-scroll-snap {
    scroll-snap-type: x proximity;
    scroll-snap-stop: normal;
}

/* Estado ativo durante o arraste com o mouse/ponteiro */
.ads-scroll-track.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto !important;
    scroll-snap-type: none !important;
}

.ads-scroll-track img {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

.ads-scroll-track::after {
    content: '';
    flex: 0 0 6px;
    height: 1px;
}

/* --------------------------------------------------------------------------
   1. HERO BANNER INTEGRADO NO TOPO (Modelo 1)
   -------------------------------------------------------------------------- */
.ads-hero-wrapper {
    margin-bottom: 22px;
    width: 100%;
}

.ads-hero-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.ads-hero-track {
    position: relative;
    width: 100%;
    min-height: 150px;
}

.ads-hero-slide {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 150px;
    padding: 18px 18px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.35s ease-in-out;
}

.ads-hero-slide.active {
    display: flex;
    opacity: 1;
}

/* Temas de cores do banner */
.ads-hero-slide.theme-orange {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 45%, #fb923c 100%);
}

.ads-hero-slide.theme-emerald {
    background: linear-gradient(135deg, #047857 0%, #059669 45%, #10b981 100%);
}

.ads-hero-slide.theme-teal {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 45%, #14b8a6 100%);
}

.ads-hero-slide.theme-blue {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #3b82f6 100%);
}

.ads-hero-content {
    flex: 1;
    z-index: 2;
    padding-right: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.ads-hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
}

.ads-hero-title {
    font-size: clamp(1.05rem, 4.2vw, 1.35rem);
    font-weight: 800;
    line-height: 1.18;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ads-hero-subtitle {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 6px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ads-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    color: #111827;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ads-hero-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.ads-hero-media-wrap {
    width: clamp(100px, 32vw, 145px);
    height: clamp(95px, 30vw, 135px);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ads-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.35);
}

/* Indicadores de slide (Dots) */
.ads-hero-indicators {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 3;
}

.ads-hero-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
}

.ads-hero-dot.active {
    width: 20px;
    background: #ffffff;
}

/* --------------------------------------------------------------------------
   2. CARROSSEL DE CARDS MAIORES (Modelo 2 - Categorias)
   -------------------------------------------------------------------------- */
.ad-card-large {
    position: relative;
    flex: 0 0 clamp(146px, 41vw, 168px);
    height: clamp(215px, 58vw, 250px);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: #ffffff;
    scroll-snap-align: start;
    box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.16);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px 14px;
    box-sizing: border-box;
}

.ad-card-large:active {
    transform: scale(0.97);
}

.ad-card-large:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.22);
}

.ad-card-media-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.ad-card-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ad-card-large:hover .ad-card-bg-img {
    transform: scale(1.06);
}

/* Overlay escuro em gradiente para contraste do texto */
.ad-card-overlay-gradient {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(10, 10, 10, 0.78) 0%,
        rgba(15, 15, 15, 0.25) 45%,
        rgba(10, 10, 10, 0.85) 100%
    );
    pointer-events: none;
}

.ad-card-content-top {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ad-card-pill-tag {
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: var(--tag-accent, #4f46e5);
    color: #ffffff;
    padding: 2px 7px;
    border-radius: 999px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ad-card-heading {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    margin: 2px 0 0 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-card-description {
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-card-content-bottom {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.ad-card-arrow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: background 0.18s ease, transform 0.18s ease;
}

.ad-card-large:hover .ad-card-arrow-btn {
    background: rgba(255, 255, 255, 0.38);
    transform: translateX(2px);
}

/* --------------------------------------------------------------------------
   3. CARROSSEL DE CARDS MENORES / MÉDIOS (Modelo 3 - Tipos de Estabelecimentos)
   -------------------------------------------------------------------------- */
.ad-card-medium {
    position: relative;
    flex: 0 0 clamp(140px, 39vw, 175px);
    border-radius: 18px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    scroll-snap-align: start;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

.ad-card-medium:active {
    transform: scale(0.97);
}

.ad-card-medium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.14);
    border-color: var(--primary-color, #10b981);
}

.ad-card-medium-thumb {
    position: relative;
    width: 100%;
    height: 96px;
    overflow: hidden;
    background: #1f2937;
}

.ad-card-medium-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ad-card-medium:hover .ad-card-medium-img {
    transform: scale(1.05);
}

.ad-card-medium-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    color: #ffffff;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 2px 7px;
    border-radius: 999px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.ad-card-medium-body {
    padding: 10px 10px 10px 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    gap: 4px;
}

.ad-card-medium-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-color, #111827);
    margin: 0;
    line-height: 1.25;
}

.ad-card-medium-desc {
    font-size: 0.72rem;
    color: var(--text-muted, #6b7280);
    margin: 0;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 28px;
}

.ad-card-medium-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border-color, #f3f4f6);
}

.ad-card-medium-btn-text {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-color, #10b981);
}

.ad-card-medium-action-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-hover, #f3f4f6);
    color: var(--primary-color, #10b981);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.ad-card-medium:hover .ad-card-medium-action-circle {
    background: var(--primary-color, #10b981);
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   Ajustes para Desktop (> 640px)
   -------------------------------------------------------------------------- */
@media (min-width: 641px) {
    .ads-carousel-bleed {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .ads-hero-container {
        border-radius: 24px;
    }

    .ads-hero-slide {
        min-height: 175px;
        padding: 24px 28px;
    }

    .ads-hero-media-wrap {
        width: 170px;
        height: 140px;
    }

    .ad-card-large {
        flex: 0 0 168px;
        height: 250px;
    }

    .ad-card-medium {
        flex: 0 0 175px;
    }

    .ad-card-medium-thumb {
        height: 110px;
    }
}
