/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa; /* Genel arka plan rengi */
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Anasayfa için daha geniş çalışma alanı */
body.home .container {
    max-width: 1400px;
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    top: 0;
    z-index: 1000;
}

/* Header içindeki olası dropdown'lar akışı bozmamalı */
.header .cart-dropdown,
.header .cart-overlay{
    position: absolute;
}

.top-bar {
    background: #2a395a;
    color: #fff;
    font-size: 14px;
    width: 100%;
    padding: 8px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-actions a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.user-actions a:hover {
    color: #ffd700;
}
.user-actions i {
    margin-right: 5px;
}

/* Cart Wrapper Styling */
.cart-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-link {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
    font-size: 15px;
}

.cart-link:hover {
    color: #ffd700;
}

.cart-count {
    background: #d32f2f;
    color: white;
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    line-height: 16px;
    height: 16px;
    margin-left: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.3s;
}

.cart-toggle:hover {
    background: rgba(255,255,255,0.1);
    color: #ffd700;
}

.main-header {
    padding: 15px 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* elemanları yanaştır, arayı gap belirlesin */
    gap: 12px; /* search ile sağdaki kutu arasını yaklaştır */
}

.logo h1 { /* Sizin HTML'inizde h1 yok, img var. Bu kural etkisiz */
    color: #2a395a;
    font-size: 24px;
    font-weight: bold;
}

.search-bar {
    flex: 1 1 auto; /* alanı doldurup sağdaki kutuya yaklaşsın */
    max-width: 820px; /* daha geniş arama alanı */
}

.search-form {
    display: flex;
    border: 2px solid #2a395a;
    border-radius: 5px;
    overflow: hidden;
}

/* Fibosearch için özel stil kaldırıldı (plugin kendi stilleri kullanılsın) */

.search-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-form button {
    background: #2a395a;
    color: #fff;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-form button:hover {
    background: #1e2a3d;
}

.header-info {
    display: flex;
    align-items: center;
    margin-left: auto; /* sola genişlesin, info hemen sonrasında gelsin */
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px; /* ikon ile metin arasını kısalt */
    color: #2a395a;
}

.info-item i {
    font-size: 24px;
}

.info-item div {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.info-item strong {
    font-size: 14px;
}

.info-item span {
    font-size: 12px;
    color: #666;
}

/* Header big cart next to free shipping */
.header-cart { margin-left: 16px; }
.header-cart-link { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #2a395a; }
.header-cart-icon { position: relative; display: inline-flex; width: 40px; height: 40px; border-radius: 8px; background: #eef1f4; align-items: center; justify-content: center; }
.header-cart-icon i { font-size: 24px; }
.header-cart-badge { position: absolute; top: -6px; right: -6px; background: #d32f2f; color: #fff; border-radius: 999px; min-width: 18px; height: 18px; padding: 0 4px; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; }
.header-cart-text strong { font-size: 14px; display: block; }
.header-cart-link:hover .header-cart-icon { background: #ffd700; }

/* Hide old top-bar cart on desktop when we have header cart */
@media (min-width: 992px) {
    .top-bar .cart-wrapper { display: none !important; }
}

/* Product category pages: move Free Shipping + Cart away from the right edge */
@media (min-width: 992px) {
    body.tax-product_cat .header .main-header .container { padding-right: 96px; }
    body.tax-product_cat .header .header-info { padding-right: 24px; }
}

/* A11y helper */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 1px, 0); white-space: nowrap; border: 0; }

/* Hero Section */
.hero-section {
    /* Üst slider ile sonraki bölüm arasındaki boşluğu daha da daralt */
    padding: 12px 0 6px 0;
}

.hero-content {
    display: flex;
    gap: 20px;
    align-items: stretch;
    min-height: 400px;
}

slider-container, .main-slider .slide img {
    height: 647px;
    min-height: 647px;
    max-height: 647px;
}
.deals-box {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    min-height: 647px;
    max-height: 647px;
    overflow: hidden;
    border-radius: 10px; /* Köşeleri yuvarlak yap */
    background: #fff; /* Haftanın Fırsatları kutusunun arka planı */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* deals-box h3 başlığı artık carousel.css'te tanımlı */


.slider-container {
    flex: 2 1 0%;
    min-width: 0;
}

.deals-sidebar {
    flex: 1 1 360px;
    max-width: 440px; /* Haftanın Fırsatları kutusunu büyüt */
    min-width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Make the promo stick to the bottom inside deals box */
.deals-box .deals-carousel { margin-bottom: 0 !important; }
.deals-box .home-sidebar-promo { margin-top: auto !important; margin-bottom: 0 !important; }
.deals-box .home-sidebar-promo img { display: block; width: 100%; height: auto; }

/* Desktop: lock deals box to slider height to align bottoms */
@media (min-width: 992px) {
    .hero-section .deals-box { min-height: 647px !important; max-height: 647px !important; }
    .hero-section .deals-sidebar { align-self: stretch; }
}

.main-slider .slide {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.main-slider .slide img {
    width: 100%;
    height: auto;
    display: block;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50px;
    transform: translateY(-50%);
    color: #fff;
    z-index: 2;
}

.slide-content h2 {
    font-size: 32px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-content p {
    font-size: 16px;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.slide-content .btn {
    background: #ffd700;
    color: #2a395a;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s;
}

.slide-content .btn:hover {
    background: #ffed4e;
    transform: translateY(-2px);
}

@media (max-width: 900px) {
    .hero-content {
        flex-direction: column;
    }
    .slider-container, .deals-sidebar {
        max-width: 100%;
        min-width: 0;
    }
    /* Mobilde slider sabit yüksekliği kaldır */
    .slider-container, .main-slider .slide img {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }
    .deals-sidebar {
        margin-top: 20px;
        max-height: none !important; /* kutu kuyruğu olmasın */
    }
    .deals-box {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .main-slider .slide img{height:auto;}
}

/* Category Grid */
.category-grid {
    padding: 60px 0 40px 0;
    background: #fff;
}

.grid-item {
    text-align: center;
    padding: 12px 5px 5px 5px;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    min-width: 110px;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.grid-item img {
    width: 95px;
    height: 72px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 4px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.grid-item h3 {
    color: #2a395a;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

/* Products Sections */
.new-products { /* Hem "En Çok Satanlar" hem "Yeni Ürünler" bu section sınıfını kullanır */
    padding: 40px 0;
}

.section-title {
    color: #2a395a;
    font-size: 28px;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #2a395a;
}

/* Ürün kartı stilleri için unified-product-card.css dosyasına bakın */


/* Footer */
.footer {
    background: #000;
    color: #fff;
    margin-top: 50px;
}

.footer-top {
    padding: 40px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-column h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 2px solid #2a395a;
    padding-bottom: 10px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: #fff;
}

.contact-info p {
    color: #ccc;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info i {
    color: #2a395a;
    width: 20px;
}

/* Sosyal linkler HTML'de yok */
/* .social-links {} */

.footer-bottom {
    background: #111;
    padding: 20px 0;
    border-top: 1px solid #333;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: #ccc;
    font-size: 14px;
}

.payment-methods {
    display: flex;
    gap: 10px;
}

.payment-methods img {
    height: 25px;
    border-radius: 3px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-info {
        display: none;
    }
    
    .search-bar {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .slider-container,
    .deals-sidebar {
        flex: 1;
    }
    
    .slide-content {
        left: 20px;
        right: 20px;
        text-align: center;
    }
    
    .slide-content h2 {
        font-size: 24px;
    }
    
    .deals-box {
        margin-top: 16px;
    }

    /* Mobilde de alt boşluğu daha da kısalt */
    .hero-section {
        padding-bottom: 8px;
    }
    

/* Başlıkli ürün bölümlerini hero'ya yaklaştır */
.bestsellers-section,
.new-products-section,
.all-parts-section {
    padding-top: 10px; /* başlık ile arama arasında daha iyi nefes payı */
}
    .top-bar-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .user-actions {
        display: flex;
        justify-content: center;
        gap: 15px;
    }
    
    .user-actions a {
        margin-left: 0;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    /* Kategori carousel görsellerini büyüt */
    .category-carousel .grid-item img {
        height: 110px;
        max-width: 100%;
        object-fit: contain;
        margin-bottom: 8px;
        display: block;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .slide-content h2 {
        font-size: 20px;
    }
    
    .slide-content p {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 24px;
    }
}