/* ==========================================
   ÜRÜN İNDİRİM SİSTEMİ - FRONTEND CSS
   Profesyonel E-Ticaret İndirim Gösterimi
   ========================================== */

/* İndirim Rozeti */
.indirim-badge-container {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.urun-indirim-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.4);
    animation: pulse 2s infinite;
}

.urun-indirim-badge.flash-sale {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    box-shadow: 0 3px 10px rgba(243, 156, 18, 0.4);
}

.urun-indirim-badge.kampanya {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    box-shadow: 0 3px 10px rgba(155, 89, 182, 0.4);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* ==========================================
   ÜRÜN KARTI - İNDİRİMLİ DÜZEN
   app.css ve custom.css override
   ========================================== */

/* 
 * ÖNEMLİ: Tüm ürün kartlarının eşit yükseklikte olması için
 * - Eski fiyat olan ve olmayan kartlar aynı yükseklikte
 * - Flexbox ile alt kısım her zaman alta yaslanır
 * - Fiyat alanı sabit yükseklikte
 */

/* Tüm ürün kartları için products-footer düzeni */
.products-card .products-footer {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 140px !important;
    padding-bottom: 45px !important;
    position: relative !important;
}

/* Fiyat alanı - SABİT YÜKSEKLİK (eski fiyat olsun olmasın) */
.products-card .products-footer .price {
    min-height: 40px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
}

/* Eski fiyat - her zaman yer kaplar (boş olsa bile) */
.products-card .products-footer .price .old {
    min-height: 16px !important;
    line-height: 16px !important;
    display: block !important;
}

/* Eski fiyat yoksa boş placeholder gibi davran */
.products-card .products-footer .price:not(:has(.old))::before {
    content: '' !important;
    display: block !important;
    min-height: 16px !important;
}

/* Swiper içindeki kartlar - daha kompakt */
.swiper-slide .products-card .products-footer {
    min-height: 120px !important;
    padding-bottom: 42px !important;
}

.swiper-slide .products-card .products-footer .price {
    min-height: 38px !important;
}

.swiper-slide .products-card .products-footer .price .old {
    min-height: 14px !important;
    line-height: 14px !important;
}

/* İndirimli ürünler sidebar - en kompakt */
.indirimli-urunler-sidebar .products-card .products-footer {
    min-height: 100px !important;
    padding-bottom: 38px !important;
}

.indirimli-urunler-sidebar .products-card .products-footer .price {
    min-height: 32px !important;
}

.indirimli-urunler-sidebar .products-card .products-footer .price .old {
    min-height: 12px !important;
    line-height: 12px !important;
    font-size: 11px !important;
}

.indirimli-urunler-sidebar .products-card .products-footer .price .new {
    font-size: 14px !important;
}

/* İndirimli olmayan kartlar için aynı düzen - Liste görünümü */
.products.ui-style-list .products-card .products-footer {
    min-height: 140px !important;
    padding-bottom: 45px !important;
}

/* Kalan Süre Sayacı - Ürün Kartı */
.indirim-sayac {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 0;
    position: relative;
    z-index: 5;
}

.indirim-sayac .sayac-label {
    opacity: 0.8;
    margin-right: 3px;
    font-size: 10px;
}

.indirim-sayac .sayac-gun,
.indirim-sayac .sayac-saat,
.indirim-sayac .sayac-dakika,
.indirim-sayac .sayac-saniye {
    background: rgba(255,255,255,0.2);
    padding: 2px 4px;
    border-radius: 3px;
    min-width: 20px;
    text-align: center;
    font-size: 10px;
}

/* Tüm Ürün Kartlarında Buton - TAM ALT KISIM */
.products-card .products-footer .button-border {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    border-radius: 0 0 8px 8px !important;
}

.indirim-sayac.urgency {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    animation: urgency-pulse 1s infinite;
}

@keyframes urgency-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.9; }
}

.indirim-sayac .sayac-bitti {
    color: #f39c12;
    font-style: italic;
}

/* Ürün Kartı İndirim Fiyat Gösterimi */
.urun-fiyat-indirimli {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.urun-fiyat-indirimli .eski-fiyat {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.urun-fiyat-indirimli .yeni-fiyat {
    font-size: 20px;
    font-weight: 700;
    color: #e74c3c;
}

.urun-fiyat-indirimli .tasarruf-miktar {
    font-size: 12px;
    color: #27ae60;
    font-weight: 600;
}

/* Ürün Detay Sayfası İndirim Gösterimi */
.urun-detay-indirim {
    background: linear-gradient(135deg, #fff5f5, #ffe0e0);
    border: 2px solid #e74c3c;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.urun-detay-indirim .indirim-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.urun-detay-indirim .indirim-baslik {
    font-size: 18px;
    font-weight: 700;
    color: #e74c3c;
    display: flex;
    align-items: center;
    gap: 10px;
}

.urun-detay-indirim .indirim-baslik i {
    font-size: 24px;
}

.urun-detay-indirim .fiyat-container {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 15px;
}

.urun-detay-indirim .fiyat-eski {
    font-size: 24px;
    color: #999;
    text-decoration: line-through;
}

.urun-detay-indirim .fiyat-yeni {
    font-size: 36px;
    font-weight: 800;
    color: #e74c3c;
}

.urun-detay-indirim .indirim-yuzde {
    background: #e74c3c;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
}

.urun-detay-indirim .tasarruf-banner {
    background: #27ae60;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Büyük Sayaç - Ürün Detay */
.indirim-sayac-buyuk {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: 12px;
    margin-top: 15px;
}

.indirim-sayac-buyuk .sayac-item {
    text-align: center;
    color: #fff;
}

.indirim-sayac-buyuk .sayac-deger {
    display: block;
    font-size: 32px;
    font-weight: 700;
    background: rgba(255,255,255,0.15);
    padding: 10px 15px;
    border-radius: 8px;
    min-width: 60px;
}

.indirim-sayac-buyuk .sayac-etiket {
    display: block;
    font-size: 11px;
    margin-top: 5px;
    opacity: 0.8;
    text-transform: uppercase;
}

/* Flash Sale Banner */
.flash-sale-banner {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.flash-sale-banner .flash-icon {
    font-size: 40px;
    animation: flash-icon 0.5s infinite alternate;
}

@keyframes flash-icon {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.flash-sale-banner .flash-text h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.flash-sale-banner .flash-text p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

/* Stok Bar */
.indirim-stok-bar {
    margin-top: 15px;
}

.indirim-stok-bar .stok-progress {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.indirim-stok-bar .stok-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.indirim-stok-bar .stok-text {
    font-size: 12px;
    color: #e74c3c;
    font-weight: 600;
    margin-top: 5px;
    display: flex;
    justify-content: space-between;
}

/* Ürün Grid İndirim Hover */
.urun-kart.indirimli:hover .indirim-badge-container {
    transform: translateY(-3px);
    transition: transform 0.3s ease;
}

/* Liste Görünümü İndirim */
.urun-liste-indirim {
    display: flex;
    align-items: center;
    gap: 10px;
}

.urun-liste-indirim .yuzde-badge {
    background: #e74c3c;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

/* ==========================================
   ÜRÜN BAŞLIĞI (TITLE) - MOBİL DÜZELTME
   2 satır başlık gösterimi için
   ========================================== */

/* Desktop - 2 satır */
.products-card .products-footer .title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.25 !important;
    height: auto !important;
    min-height: 40px !important;
    max-height: 48px !important;
    font-size: 17px !important;
}

/* Responsive */
@media (max-width: 992px) {
    .products-card .products-footer {
        min-height: 130px !important;
        padding-bottom: 42px !important;
    }
    
    .products-card .products-footer .title {
        font-size: 14px !important;
        line-height: 1.25 !important;
        min-height: 32px !important;
        max-height: 38px !important;
    }
    
    .products-card .products-footer .price {
        min-height: 36px !important;
    }
    
    .products-card .products-footer .price .old {
        min-height: 14px !important;
        line-height: 14px !important;
    }
    
    .swiper-slide .products-card .products-footer {
        min-height: 110px !important;
        padding-bottom: 40px !important;
    }
    
    .indirim-sayac {
        padding: 5px 8px;
        gap: 3px;
        font-size: 9px;
    }
    
    .indirim-sayac .sayac-gun,
    .indirim-sayac .sayac-saat,
    .indirim-sayac .sayac-dakika,
    .indirim-sayac .sayac-saniye {
        padding: 2px 3px;
        min-width: 18px;
        font-size: 9px;
    }
    
    .indirim-sayac .sayac-label {
        font-size: 9px;
    }
    
    .urun-indirim-badge {
        padding: 4px 8px;
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .products-card .products-footer {
        min-height: 120px !important;
        padding-bottom: 40px !important;
    }
    
    .products-card .products-footer .title {
        font-size: 13px !important;
        line-height: 1.2 !important;
        min-height: 28px !important;
        max-height: 34px !important;
        -webkit-line-clamp: 2 !important;
        margin-bottom: 4px !important;
    }
    
    .products-card .products-footer .price {
        min-height: 34px !important;
    }
    
    .products-card .products-footer .price .old {
        min-height: 12px !important;
        line-height: 12px !important;
    }
    
    .swiper-slide .products-card .products-footer {
        min-height: 100px !important;
        padding-bottom: 38px !important;
    }
    
    .indirim-sayac-buyuk {
        gap: 8px;
        padding: 15px;
    }
    
    .indirim-sayac-buyuk .sayac-deger {
        font-size: 24px;
        padding: 8px 10px;
        min-width: 45px;
    }
    
    .urun-detay-indirim .fiyat-yeni {
        font-size: 28px;
    }
    
    .urun-detay-indirim .fiyat-eski {
        font-size: 18px;
    }
    
    .flash-sale-banner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .indirim-sayac {
        padding: 4px 6px;
        gap: 2px;
        font-size: 8px;
        border-radius: 4px;
    }
    
    .indirim-sayac .sayac-gun,
    .indirim-sayac .sayac-saat,
    .indirim-sayac .sayac-dakika,
    .indirim-sayac .sayac-saniye {
        padding: 2px;
        min-width: 16px;
        font-size: 8px;
        border-radius: 2px;
    }
    
    .indirim-sayac .sayac-label {
        display: none; /* Mobilde ikonu gizle, yer kazanmak için */
    }
    
    .urun-indirim-badge {
        padding: 3px 6px;
        font-size: 9px;
        gap: 3px;
    }
    
    .urun-indirim-badge i {
        font-size: 10px;
    }
    
    .indirim-badge-container {
        top: 5px;
        left: 5px;
    }
}

@media (max-width: 480px) {
    .products-card .products-footer {
        min-height: 110px !important;
        padding-bottom: 38px !important;
    }
    
    .products-card .products-footer .title {
        font-size: 12px !important;
        line-height: 1.2 !important;
        min-height: 26px !important;
        max-height: 30px !important;
        -webkit-line-clamp: 2 !important;
        margin-bottom: 3px !important;
        letter-spacing: -0.3px !important;
    }
    
    .products-card .products-footer .price {
        min-height: 32px !important;
    }
    
    .products-card .products-footer .price .old {
        min-height: 11px !important;
        line-height: 11px !important;
    }
    
    .swiper-slide .products-card .products-footer {
        min-height: 95px !important;
        padding-bottom: 36px !important;
    }
    
    .swiper-slide .products-card .products-footer .title {
        font-size: 11px !important;
        min-height: 24px !important;
        max-height: 28px !important;
    }
    
    .indirim-sayac {
        padding: 3px 5px;
        font-size: 7px;
        margin-top: 5px;
        margin-bottom: 0;
    }
    
    .indirim-sayac .sayac-gun,
    .indirim-sayac .sayac-saat,
    .indirim-sayac .sayac-dakika,
    .indirim-sayac .sayac-saniye {
        padding: 1px 2px;
        min-width: 14px;
        font-size: 7px;
    }
    
    .urun-indirim-badge {
        padding: 2px 5px;
        font-size: 8px;
    }
}

/* Çok küçük mobil ekranlar */
@media (max-width: 360px) {
    .products-card .products-footer {
        min-height: 100px !important;
        padding-bottom: 36px !important;
    }
    
    .products-card .products-footer .title {
        font-size: 11px !important;
        line-height: 1.15 !important;
        min-height: 24px !important;
        max-height: 28px !important;
        -webkit-line-clamp: 2 !important;
        margin-bottom: 2px !important;
        letter-spacing: -0.4px !important;
        word-break: break-word !important;
    }
    
    .products-card .products-footer .price {
        min-height: 28px !important;
    }
    
    .products-card .products-footer .price .old {
        min-height: 10px !important;
        line-height: 10px !important;
        font-size: 10px !important;
    }
    
    .products-card .products-footer .price .new {
        font-size: 14px !important;
    }
    
    .swiper-slide .products-card .products-footer {
        min-height: 90px !important;
        padding-bottom: 34px !important;
    }
    
    .swiper-slide .products-card .products-footer .title {
        font-size: 10px !important;
        min-height: 22px !important;
        max-height: 26px !important;
    }
    
    .products-card .products-footer .category {
        font-size: 9px !important;
        margin-bottom: 2px !important;
    }
}

/* Skeleton Loading */
.indirim-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* İndirimli Ürün Öne Çıkma */
.urun-kart.indirimli {
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.urun-kart.indirimli::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.urun-kart.indirimli:hover::before {
    opacity: 0.5;
}

/* Kampanya Bitiş Uyarısı */
.kampanya-bitis-uyari {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #fff;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    animation: bitis-uyari 1s infinite;
}

@keyframes bitis-uyari {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.kampanya-bitis-uyari i {
    animation: bell-ring 0.5s infinite alternate;
}

@keyframes bell-ring {
    from { transform: rotate(-5deg); }
    to { transform: rotate(5deg); }
}

/* ==========================================
   BREADCRUMB - MOBİL GÖRÜNÜRLÜK
   Kategori sayfasında mobilde de göster
   ========================================== */

/* Mobilde breadcrumb'ı göster */
@media (max-width: 767px) {
    .inner-page__wrapper .breadcrumb {
        display: block !important;
    }
    
    .inner-page__wrapper .breadcrumb ul {
        flex-wrap: wrap;
        gap: 2px 0;
    }
    
    .inner-page__wrapper .breadcrumb ul li a {
        font-size: 12px;
    }
    
    .inner-page__wrapper .breadcrumb ul li a::after {
        margin-inline: 6px;
    }
    
    .inner-page__wrapper .breadcrumb ul li a h1 {
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .inner-page__wrapper .breadcrumb ul li a {
        font-size: 11px;
    }
    
    .inner-page__wrapper .breadcrumb ul li a::after {
        margin-inline: 4px;
    }
    
    .inner-page__wrapper .breadcrumb ul li a h1 {
        font-size: 11px !important;
    }
}
