/**
 * Product Slider Component
 * Modern, responsive ürün slider tasarımı
 */

.product-slider-section {
    margin: 60px 0;
    padding: 0 20px;
}

.product-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.product-slider-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    position: relative;
}

.product-slider-title::after {
    content: '';
    position: absolute;
    bottom: -17px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.slider-nav-buttons {
    display: flex;
    gap: 10px;
}

.slider-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #6b7280;
}

.slider-nav-btn:hover {
    border-color: #667eea;
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.slider-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: scale(1);
}

.product-slider-container {
    position: relative;
    overflow: hidden;
    padding-bottom: 10px;
    padding-top: 10px;
}

.product-slider-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card {
    flex: 0 0 calc(20% - 16px);
    min-width: 220px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border:1px solid #ebebeb;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
   
}

.product-card-image {
    position: relative;
    width: 100%;
    padding-top: 120%;
    overflow: hidden;
    background: #f9fafb;
}

.product-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

/* Product Badges - Fiyat altında yanyana dizilecek */
.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.product-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-new {
    background: #dcfce7;
    color: #166534;
}

.badge-discount, .badge-sale {
    background: #ffe4e6;
    color: #be123c;
}

.badge-featured {
    background: #f3e8ff;
    color: #6b21a8;
}

.badge-free-cargo {
    background: #dbeafe;
    color: #1e40af;
}

.badge-fast-delivery {
    background: #ffedd5;
    color: #c2410c;
}

.badge-bestseller {
    background: #fef9c3;
    color: #a16207;
}

/* Discount Badge - Görsel üzerinde indirim oranı */
.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ef4444;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    z-index: 5;
}

.product-card-content {
    padding: 16px;
}

.product-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px;
    line-height: 1.4;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.price-current {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
}

.price-old {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
}

.product-card-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #6b7280;
}

.rating-stars {
    color: #fbbf24;
}

.product-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-add-cart {
    flex: 1;
    padding: 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn-quick-view {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6b7280;
}

.btn-quick-view:hover {
    border-color: #667eea;
    color: #667eea;
}

.out-of-stock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #ef4444;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 1200px) {
    .product-card {
        flex: 0 0 calc(25% - 15px);
    }
}

@media (max-width: 992px) {
    .product-card {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 768px) {
    .product-slider-section {
        margin: 40px 0;
        padding: 0 15px;
    }
    
    .product-slider-title {
        font-size: 22px;
    }
    
    .product-card {
        flex: 0 0 calc(50% - 10px);
        min-width: 160px;
    }
    
    .slider-nav-buttons {
        display: none;
    }
}

@media (max-width: 480px) {
    .product-card {
        flex: 0 0 calc(50% - 6px);
        min-width: unset;
    }
    
    .product-card-info {
        padding: 8px;
    }
    
    .product-card-title {
        font-size: 12px;
        line-height: 1.3;
        -webkit-line-clamp: 2;
    }
    
    .product-card-price {
        font-size: 14px;
    }
    
    .product-card-old-price {
        font-size: 11px;
    }
    
    .product-badges {
        gap: 4px;
        margin-top: 6px;
    }
    
    .product-badge {
        padding: 2px 6px;
        font-size: 9px;
    }
}

/* ==================== HOMEPAGE SLIDER SECTION ==================== */

.homepage-slider-section {
    padding: 5px 0;

}

.homepage-slider-section .product-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 0;
    border-bottom: none;
}

.homepage-slider-section .product-slider-title {
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.homepage-slider-section .product-slider-title::after {
    display: none;
}

.homepage-slider-section .product-slider-nav {
    display: flex !important;
    gap: 12px;
}

.homepage-slider-section .product-slider-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #6b7280;
    font-size: 18px;
}

.homepage-slider-section .product-slider-btn:hover:not(:disabled) {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: scale(1.1);
    background: #f0f9ff;
}

.homepage-slider-section .product-slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.homepage-slider-section .products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    align-items: stretch;
}

/* Swiper slide eşit yükseklik */
.homepage-slider-section .swiper-slide {
    height: auto;
}

.homepage-slider-section .product-card-wrapper {
    position: relative;
}

.homepage-slider-section .product-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.homepage-slider-section .product-card:hover {
  
    transform: translateY(-4px);
}

.homepage-slider-section .product-favorite {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10;
    transition: all 0.2s;
}

.homepage-slider-section .product-favorite:hover {
    transform: scale(1.1);
}

.homepage-slider-section .product-image-link {
    display: block;
    text-decoration: none;
    position: relative;
}

.homepage-slider-section .product-image {
    position: relative;
    width: 100%;
    padding-bottom: 120%;
    background: #f3f4f6;
    overflow: hidden;
}

.homepage-slider-section .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.homepage-slider-section .product-card:hover .product-image img {
    transform: scale(1.05);
}

.homepage-slider-section .discount-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #ef4444;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    z-index: 5;
}

.homepage-slider-section .product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.homepage-slider-section .product-card:hover .product-overlay {
    opacity: 1;
}

.homepage-slider-section .btn-detail {
    background: white;
    color: #1f2937;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.homepage-slider-section .btn-detail:hover {
    background: #3b82f6;
    color: white;
    transform: scale(1.05);
}

.homepage-slider-section .product-info {
    padding: 12px 5px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.homepage-slider-section .product-category {
    font-size: 11px;
    text-transform: uppercase;
    color: #9ca3af;
    font-weight: 600;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.homepage-slider-section .product-name {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 12px;
}

.homepage-slider-section .product-name h3 {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    margin: 0;
    line-height: 1.2;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.homepage-slider-section .product-name:hover h3 {
    color: #3b82f6;
}

.homepage-slider-section .product-price {
    margin-top: auto;
}

.homepage-slider-section .price-current {
    font-size: 19px;
    font-weight: 500;
    color: #1f2937;
    display: block;
    margin-bottom: 4px;
}

.homepage-slider-section .price-old {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
}

.homepage-slider-section .out-of-stock {
    margin-top: 12px;
    padding: 8px;
    background: #fee2e2;
    color: #dc2626;
    text-align: center;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

/* Product Badges - Fiyat altında yanyana */
.homepage-slider-section .product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    min-height: 28px;
}

.homepage-slider-section .product-badge {
   display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
}

/* Homepage Slider Responsive */
@media (max-width: 1200px) {
    .homepage-slider-section .products-grid { 
        grid-template-columns: repeat(3, 1fr); 
    }
}

@media (max-width: 768px) {
    .homepage-slider-section {
        padding: 40px 0;
    }
    
    .homepage-slider-section .products-grid { 
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .homepage-slider-section .product-slider-title { 
        font-size: 22px; 
    }
    
    .homepage-slider-section .product-slider-header {
        margin-bottom: 20px;
    }
    
    .homepage-slider-section .product-card {
        border-radius: 12px;
    }
    
    .homepage-slider-section .product-info {
        padding: 12px;
    }
    
    .homepage-slider-section .product-category {
        font-size: 10px;
        margin-bottom: 6px;
    }
    
    .homepage-slider-section .product-name h3 {
        font-size: 13px;
        height: 36px;
    }
    
    .homepage-slider-section .price-current {
        font-size: 18px;
        margin-bottom: 2px;
    }
    
    .homepage-slider-section .price-old {
        font-size: 12px;
    }
    
    .homepage-slider-section .product-favorite {
        width: 32px;
        height: 32px;
        top: 10px;
        right: 10px;
    }
    
    .homepage-slider-section .discount-badge {
        top: 10px;
        left: 10px;
        padding: 4px 8px;
        font-size: 11px;
        border-radius: 6px;
    }
    
    .homepage-slider-section .product-slider-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .homepage-slider-section {
        padding: 30px 0;
    }
    
    .homepage-slider-section .products-grid { 
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .homepage-slider-section .product-slider-title { 
        font-size: 18px; 
    }
    
    .homepage-slider-section .product-slider-header {
        margin-bottom: 16px;
    }
    
    .homepage-slider-section .product-card {
        border-radius: 10px;
    }
    
    .homepage-slider-section .product-info {
        padding: 10px;
    }
    
    .homepage-slider-section .product-category {
        font-size: 9px;
        margin-bottom: 4px;
    }
    
    .homepage-slider-section .product-name h3 {
        font-size: 12px;
        height: 34px;
    }
    
    .homepage-slider-section .price-current {
        font-size: 16px;
    }
    
    .homepage-slider-section .price-old {
        font-size: 11px;
    }
    
    .homepage-slider-section .product-favorite {
        width: 28px;
        height: 28px;
        top: 8px;
        right: 8px;
    }
    
    .homepage-slider-section .product-favorite svg {
        width: 14px;
        height: 14px;
    }
    
    .homepage-slider-section .discount-slider-btn {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }
    
    .homepage-slider-section .product-slider-nav {
        gap: 8px;
    }
}

/* Swiper Mobile 2-Column Layout */
@media (max-width: 480px) {
    .swiper .swiper-slide {
        width: calc(50% - 5px) !important;
    }
    
    .swiper .swiper-slide .product-card {
        min-width: unset;
        width: 100%;
    }
    
    .product-slider-container.swiper {
        padding: 0 5px;
    }
    
    .product-slider-section {
        padding: 0 10px;
        margin: 30px 0;
    }
}
