/**
 * Banner Slider CSS
 * Mobil öncelikli, responsive tasarım
 */

/* ========================
   Slider Container
   ======================== */
.banner-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    z-index: 100;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.banner-slider.hidden {
    display: none !important;
}

/* ========================
   Slide
   ======================== */
.banner-slide {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 8px 50px;
    position: relative;
    min-height: 48px;
    transition: opacity 0.4s ease;
    opacity: 0;
    text-align: center;
}

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

/* Gradient Banner */
.banner-slide.type-gradient {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Image Banner */
.banner-slide.type-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.banner-slide.type-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.banner-slide.type-image .banner-content {
    position: relative;
    z-index: 1;
}

/* ========================
   Banner İçerik
   ======================== */
.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    word-break: break-word;
}

.banner-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    letter-spacing: 0.01em;
    max-width: 100%;
}

.banner-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
    line-height: 1.3;
}

/* ========================
   Geri Sayım
   ======================== */
.countdown-timer {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
}

.countdown-item {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
}

.countdown-value {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 1.2em;
    text-align: center;
}

.countdown-label {
    font-size: 10px;
    opacity: 0.8;
    font-weight: 500;
}

.countdown-prefix {
    font-weight: 800;
    letter-spacing: 0;
    margin-right: 2px;
}

.countdown-expired {
    font-size: 12px;
    opacity: 0.7;
}

/* ========================
   Butonlar
   ======================== */
.banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 36px;
}

.banner-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.banner-btn-primary {
    background: rgba(255, 255, 255, 0.25);
    color: inherit;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.banner-btn-primary:hover {
    background: rgba(255, 255, 255, 0.35);
}

.banner-btn-outline {
    background: transparent;
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.banner-btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ========================
   Navigasyon
   ======================== */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.slider-nav:hover {
    background: rgba(255, 255, 255, 0.35);
}

.slider-prev {
    left: 8px;
}

.slider-next {
    right: 40px;
}

/* ========================
   Dots (Gösterge)
   ======================== */
.slider-dots {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.slider-dot.active {
    background: rgba(255, 255, 255, 0.9);
    width: 18px;
    border-radius: 3px;
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* ========================
   Kapatma Butonu
   ======================== */
.banner-close {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0.7;
}

.banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

/* ========================
   İndirim Badge
   ======================== */
.banner-discount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

/* ========================
   Responsive - Mobil
   ======================== */
@media (max-width: 768px) {
    .banner-slide {
        padding: 8px 34px 9px 12px;
        min-height: 82px;
    }
    
    .banner-content {
        display: grid;
        grid-template-columns: auto auto;
        grid-template-areas:
            "title title"
            "subtitle subtitle"
            "countdown actions";
        column-gap: 10px;
        row-gap: 7px;
        align-items: center;
        justify-items: center;
        width: 100%;
    }

    .banner-content.no-subtitle {
        grid-template-areas:
            "title title"
            "countdown actions";
    }

    .banner-text {
        display: contents;
    }

    .banner-title {
        grid-area: title;
        font-size: 16px;
        line-height: 1.2;
        margin: 0;
        text-align: center;
        padding: 0 4px;
    }

    .banner-subtitle {
        grid-area: subtitle;
        font-size: 11px;
        text-align: center;
        max-width: 92%;
    }

    .banner-discount {
        grid-area: title;
        justify-self: end;
        align-self: center;
        font-size: 11px;
        padding: 2px 6px;
        display: none;
    }

    .countdown-timer {
        grid-area: countdown;
        justify-content: flex-end;
        justify-self: end;
        gap: 4px;
        font-size: 13px;
        font-weight: 800;
        line-height: 1;
        font-variant-numeric: tabular-nums;
    }

    .banner-actions {
        grid-area: actions;
        display: flex;
        flex-direction: row;
        gap: 6px;
        align-items: center;
        justify-content: flex-start;
        justify-self: start;
        width: auto;
        max-width: 100%;
    }

    .banner-btn {
        flex: 0 1 auto;
        padding: 5px 9px;
        font-size: 11px;
        min-height: 30px;
        white-space: nowrap;
        line-height: 1.1;
        text-align: center;
        justify-content: center;
        border-radius: 8px;
    }

    .banner-btn-outline {
        min-width: 0;
        max-width: 132px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .slider-nav {
        display: none;
    }


    .countdown-value {
        font-size: 15px;
    }

    .countdown-label {
        font-size: 10px;
        opacity: 0.9;
    }

    .banner-close {
        top: 50%;
        right: 8px;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .slider-dots {
        bottom: 2px;
    }
}

/* ========================
   Responsive - Küçük Mobil
   ======================== */
@media (max-width: 400px) {
    .banner-slide {
        padding: 8px 28px 9px 10px;
        min-height: 78px;
    }

    .banner-title {
        font-size: 14px;
    }

    .banner-subtitle {
        font-size: 10px;
    }

    .banner-btn {
        padding: 5px 7px;
        font-size: 10px;
    }

    .banner-btn-outline {
        max-width: 108px;
    }

    .countdown-timer {
        gap: 3px;
    }

    .countdown-value {
        font-size: 14px;
    }

    .countdown-label {
        font-size: 9px;
    }

    .banner-discount {
        font-size: 11px;
        padding: 1px 6px;
    }
}

/* ========================
   Responsive - Büyük Ekran
   ======================== */
@media (min-width: 1200px) {
    .banner-slide {
        padding: 10px 60px;
    }

    .banner-title {
        font-size: 16px;
    }

    .banner-subtitle {
        font-size: 13px;
    }

    .banner-btn {
        padding: 8px 18px;
        font-size: 13px;
    }
}

/* ========================
   Animasyonlar
   ======================== */
@keyframes bannerSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-slider {
    animation: bannerSlideIn 0.4s ease;
}

/* ========================
   Kampanya Sayfası Kartları
   ======================== */
.campaign-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.campaign-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.campaign-card-body {
    padding: 24px;
    color: #fff;
    text-align: center;
}

.campaign-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.campaign-card-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.campaign-card-countdown {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.campaign-card-countdown .countdown-item {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
}

.campaign-card-countdown .countdown-value {
    font-size: 20px;
    font-weight: 700;
}

.campaign-card-countdown .countdown-label {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.8;
}

.campaign-card-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .campaign-card-body {
        padding: 16px;
    }

    .campaign-card-title {
        font-size: 16px;
    }

    .campaign-card-countdown .countdown-value {
        font-size: 16px;
    }

    .campaign-card-countdown .countdown-item {
        padding: 4px 8px;
        min-width: 40px;
    }
}
/* ========================
   Mikro Banner (Yükseklik <= 45px)
   ======================== */
.banner-mini {
    padding: 0 16px !important;
}

.banner-mini .banner-content {
    gap: 4px 8px !important;
    flex-wrap: nowrap !important;
    width: 100%;
}

.banner-mini .banner-title {
    font-size: 11px !important;
    line-height: 1 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.banner-mini .banner-subtitle {
    font-size: 9px !important;
    line-height: 1 !important;
    display: none; /* Çok dar olduğu için alt başlığı gizle */
}

.banner-mini .banner-btn {
    min-height: 24px !important;
    padding: 2px 8px !important;
    font-size: 10px !important;
    border-radius: 4px !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.banner-mini .countdown-value {
    font-size: 11px !important;
}
.banner-mini .countdown-timer {
    flex-shrink: 0;
}

.banner-mini .countdown-label {
    font-size: 8px !important;
}

.banner-mini .banner-discount {
    font-size: 9px !important;
    padding: 1px 4px !important;
}

.banner-mini .banner-close {
    width: 16px !important;
    height: 16px !important;
    font-size: 10px !important;
    right: 4px !important;
}
