/* Modern E-Ticaret Tasarımı - Trendyol/Hepsiburada Tarzı */

/* Üst Mesaj Bar */
.top-message-bar {
    position: sticky;
    top: 0;
    z-index: 1001;
    font-size: 0.875rem;
}

.scrolling-text-wrapper {
    overflow: hidden;
    width: 100%;
}

.scrolling-text {
    display: inline-flex;
    white-space: nowrap;
    animation: scrollText 30s linear infinite;
}

.scrolling-text span {
    display: inline-block;
    margin-right: 60px;
    flex-shrink: 0;
}

@keyframes scrollText {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Header */
.main-header {
    border-bottom: 1px solid #e0e0e0;
}

.header-top {
    border-bottom: 1px solid #f0f0f0;
}

/* Header Z-order: Kullanıcı menüsü en üstte, ana menü altında, arama düşük */
.header-block-cart {
    position: relative;
    z-index: 1060;
}
.header-block-cart .dropdown,
.header-block-cart .user-menu-dropdown {
    position: relative;
    z-index: 1060;
}
.header-block-cart .dropdown-menu {
    z-index: 1061;
}
.header-block-menu {
    position: relative;
    z-index: 1050;
}
.header-block-menu .dropdown-menu {
    z-index: 1051;
}
.header-block-search {
    position: relative;
    z-index: 100;
}
/* Mobil menü dropdown'ları da ana menü seviyesinde */
#mainNav .dropdown-menu {
    z-index: 1051;
}

.header-block-search .search-form {
    width: 100%;
    max-width: 400px;
}

.search-form .form-control {
    border-radius: 8px 0 0 8px;
    border: 2px solid var(--primary-color);
}

.search-form .btn {
    border-radius: 0 8px 8px 0;
}

/* Kayar Banner */
.sliding-banner {
    overflow: hidden;
}

.brand-item {
    transition: transform 0.3s ease;
}

.brand-item:hover {
    transform: translateY(-5px);
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin: 2rem 0;
}

.hero-slider .swiper-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.hero-slider .swiper-pagination-bullet-active {
    background: var(--primary-color);
}

/* Slider Ok Butonları - Şeffaf varsayılan, hover'da site renkleri */
.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev,
.category-slider .swiper-button-next,
.category-slider .swiper-button-prev {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.hero-slider .swiper-button-next::after,
.hero-slider .swiper-button-prev::after,
.category-slider .swiper-button-next::after,
.category-slider .swiper-button-prev::after {
    font-size: 1.25rem;
}

.hero-slider .swiper-button-next:hover,
.hero-slider .swiper-button-prev:hover,
.category-slider .swiper-button-next:hover,
.category-slider .swiper-button-prev:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.hero-slider .swiper-button-disabled,
.category-slider .swiper-button-disabled {
    opacity: 0.25;
    pointer-events: none;
}

/* Ürün Grid Layouts */
.product-section {
    margin: 3rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

/* Layout 1: Tekli Büyük */
.layout-single-large .product-card {
    height: 100%;
}

/* Layout 2: İkili */
.layout-double .product-card {
    height: 100%;
}

/* Layout 3: Üçlü */
.layout-triple .product-card {
    height: 100%;
}

/* Layout 4: 2'şerli 3 Blok */
.layout-2x3 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Layout 5: 2'şerli 4 Blok */
.layout-2x4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Layout 6: 1 Büyük + 2 Küçük */
.layout-1big-2small {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.layout-1big-2small .product-card:first-child {
    grid-row: span 2;
}

/* Reklam/Banner Alanları */
.ad-section {
    margin: 3rem 0;
}

.ad-banner {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.ad-banner:hover {
    transform: scale(1.02);
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

/* Sidebar (ürün listesi, ana sayfa): sticky iken header altında kalır, ekrana sığmazsa kendi içinde kaydırılır */
.sidebar.sticky-top,
.product-listing-sidebar.sticky-top {
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
}
.sidebar.sticky-top::-webkit-scrollbar,
.product-listing-sidebar.sticky-top::-webkit-scrollbar {
    width: 6px;
}
.sidebar.sticky-top::-webkit-scrollbar-track,
.product-listing-sidebar.sticky-top::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}
.sidebar.sticky-top::-webkit-scrollbar-thumb,
.product-listing-sidebar.sticky-top::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

/* Filtreler */
.filter-group {
    margin-bottom: 1rem;
}

.filter-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.filter-checkbox {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .top-message-bar {
        font-size: 0.75rem;
    }
    
    .hero-slider .swiper-slide img {
        height: 250px;
    }
    
    .layout-1big-2small {
        grid-template-columns: 1fr;
    }
    
    .layout-2x3,
    .layout-2x4 {
        grid-template-columns: 1fr;
    }
}

/* Animasyonlar */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Özel Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
