/*
 * ============================================================
 * PROMO SLIDER — Custom Elementor Shop
 * ============================================================
 */

.ces-promo-slider-section {
    background: var(--c-surface, #f7f8fa);
    padding: 32px 0 24px;
    width: 100%;
}

.ces-promo-slider-section__container {
    max-width: var(--container-max, 1280px);
    margin: 0 auto;
    padding: 0 var(--container-pad, 32px);
}

/* Swiper container */
.ces-promo-swiper {
    width: 100%;
    overflow: hidden;
    /* Prevent layout shift before JS loads */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ces-promo-swiper.swiper-initialized {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   PROMO CARD
═══════════════════════════════════════════════════════════ */
.ces-promo-card {
    display: block;
    position: relative;
    width: 100%;
    /* No fixed ratio, natural height adapts to image */
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    transform: translateZ(0); /* Force hardware acceleration */
    will-change: transform;
    background-color: transparent;
}

/* Continuous linear scroll for wrapper */
.ces-promo-swiper .swiper-wrapper {
    transition-timing-function: linear !important;
}

/* Background Cover */
.ces-promo-card__bg {
    position: absolute;
    inset: 0;
    background-size: contain; /* Prevents cutting the image */
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Contrast Protection Scrim */
.ces-promo-card__scrim {
    position: absolute;
    inset: 0;
    z-index: 2;
    /* Dark gradient at top for text readability, clear at bottom */
    background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 40%, rgba(0,0,0,0) 100%);
}

/* Card Content (Typography) */
.ces-promo-card__content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 14px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

@media (min-width: 1024px) {
    .ces-promo-card__content {
        padding: 24px;
        gap: 8px;
    }
}

.ces-promo-card__title {
    margin: 0;
    font: 600 16px/1.2 var(--font-base, sans-serif);
    letter-spacing: -0.3px;
    /* Clamp to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .ces-promo-card__title {
        font-size: 20px;
    }
}

.ces-promo-card__subtitle {
    margin: 0;
    font: 500 11px/1.3 var(--font-base, sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (min-width: 1024px) {
    .ces-promo-card__subtitle {
        font-size: 12px;
    }
}

/* Text Theme Variations */
.ces-promo-card--light .ces-promo-card__title {
    color: #ffffff;
}
.ces-promo-card--light .ces-promo-card__subtitle {
    color: rgba(255, 255, 255, 0.85);
}

.ces-promo-card--dark .ces-promo-card__scrim {
    background: linear-gradient(180deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.2) 40%, rgba(255,255,255,0) 100%);
}
.ces-promo-card--dark .ces-promo-card__title {
    color: #1c1c1e;
}
.ces-promo-card--dark .ces-promo-card__subtitle {
    color: rgba(28, 28, 30, 0.75);
}

/* Mobile container padding reset */
@media (max-width: 767px) {
    :root { --container-pad: 16px; }
    .ces-promo-slider-section__container {
        padding-right: 0; /* Let slider bleed off right edge natively */
    }
    .ces-promo-swiper {
        padding-right: 16px; /* Offset the bleed inside swiper */
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .ces-promo-card { transition: none; transform: none; }
    .ces-promo-card:hover { transform: none; }
    .ces-promo-card__bg { transition: none; transform: none; }
    .ces-promo-card:hover .ces-promo-card__bg { transform: none; }
}
