:root {
    --brand-color: #A38771;
    --primary-color: #2D3748;
    --bg-color: #f9fafb;
    --white: #ffffff;
    --border-color: #E5E7EB;
    --text-light: #6B7280;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --font-heading: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
}

body {
    background-color: var(--bg-color);
    color: var(--primary-color);
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Bar */
.top-bar {
    background: var(--primary-color);
    color: var(--white);
    font-size: 12px;
    text-align: center;
    padding: 8px 0;
    font-weight: 500;
}

/* Header */
.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.search-bar {
    display: flex;
    flex: 1;
    max-width: 450px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-bar button {
    background: transparent;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    color: var(--text-light);
    font-size: 18px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s;
}

.action-btn:hover {
    border-color: var(--brand-color);
    color: var(--brand-color);
}

.cart-btn {
    background: var(--brand-color);
    color: var(--white);
    border-color: var(--brand-color);
}

.cart-btn:hover {
    background: #8e735e;
    color: var(--white);
}

.badge {
    background: var(--white);
    color: var(--brand-color);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

/* Nav */
.main-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-link {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
}

.nav-link.active, .nav-link:hover {
    color: var(--brand-color);
    background: #fdfbf7;
}

/* Layout Grid (Anasayfa) */
.layout-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 60px;
}

.sidebar-filters {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    height: fit-content;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h3 {
    font-size: 15px;
    margin-bottom: 12px;
    font-weight: 600;
}

.filter-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    color: #4B5563;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-inputs input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    outline: none;
}

.apply-btn {
    background: var(--brand-color);
    color: var(--white);
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

/* Products Grid */
.products-section {
    width: 100%;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--primary-color);
    z-index: 2;
}

.fav-btn.active {
    color: #E53E3E;
}

.product-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-brand {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
    margin: 5px 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-color);
    margin-top: auto;
}

.add-to-cart {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 100%;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.add-to-cart:hover {
    background: var(--brand-color);
}

/* Toast Bildirim */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}
/* ==========================================
   MOBİL VE TABLET UYUMLULUK KURALLARI (Responsive)
   ========================================== */

@media screen and (max-width: 992px) {
    .layout-grid {
        grid-template-columns: 1fr !important; /* Tablet ve mobilde filtreler üste, ürünler alta geçer */
        gap: 20px;
    }
}

@media screen and (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar {
        max-width: 100%;
    }

    .header-actions {
        justify-content: space-between;
        width: 100%;
        overflow-x: auto;
    }

    .action-btn span {
        display: none; /* Mobilde buton yazılarını gizleyip sadece ikon bırakarak yer kazanalım */
    }

    .action-btn {
        padding: 8px 10px;
        font-size: 18px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* Mobilde ürünler yan yana 2'li görünür */
        gap: 12px;
    }

    .product-image {
        height: 200px !important;
    }
}

@media screen and (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr !important; /* Çok küçük ekranlarda ürünler tekli sütun olur */
    }
}
/* ==========================================
   TRENDYOL TARZI MOBİL OPTİMİZASYONU
   ========================================== */
@media screen and (max-width: 768px) {
    /* Ana sayfadaki ürünleri mobilde yan yana 2'li yapıyoruz */
    .products-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 0 5px;
    }

    /* Ürün kartlarını mobilde küçültüp kompakt hale getirelim */
    .product-card {
        border-radius: 6px;
    }

    .product-image {
        height: 160px !important; /* Mobilde fotoğraflar çok uzamasın */
    }

    .product-info {
        padding: 10px !important;
    }

    .product-title {
        font-size: 13px !important;
        margin: 3px 0 6px 0 !important;
    }

    .product-price {
        font-size: 14px !important;
    }

    .add-to-cart {
        padding: 8px !important;
        font-size: 12px !important;
    }

    /* Ürün Detay Sayfası Mobilde Yan Yana / Düzgün Görünüm */
    #productDetailWrapper > div {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 12px !important;
    }

    #productDetailWrapper img {
        height: 280px !important;
    }
}
/* ==========================================
   SEPET SAYFASI MOBİL OPTİMİZASYONU
   ========================================== */
@media screen and (max-width: 992px) {
    /* Sepet sayfasındaki 2 sütunlu yapıyı mobilde tamamen alt alta çeviriyoruz */
    .cart-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    .cart-summary-box {
        position: static !important;
        width: 100% !important;
    }

    /* Sepet içindeki ürün kartını mobilde daha yatay ve şık yapalım */
    .cart-item-card {
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    .cart-item-card img {
        width: 65px !important;
        height: 75px !important;
    }
}
/* ==========================================
   MOBİL KATEGORİ AÇILIR ÇEKMECE & TRENDYOL GÖRÜNÜMÜ
   ========================================== */

/* Bilgisayarda bu buton gizli kalır */
.mobile-filter-toggle {
    display: none; 
}

@media screen and (max-width: 992px) {
    /* Mobilde ana düzeni tek sütun yapalım */
    .layout-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    /* Mobilde açılır kategori butonu görünür olsun */
    .mobile-filter-toggle {
        display: flex !important;
        background: var(--white);
        border: 1px solid var(--border-color);
        padding: 12px 15px;
        border-radius: var(--radius);
        font-weight: 600;
        font-size: 14px;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        color: var(--primary-color);
        width: 100%;
        margin-bottom: 10px;
    }

    /* Filtre kutusu varsayılan olarak mobilde gizli gelsin */
    .sidebar-filters {
        display: none !important;
        background: var(--white);
        box-shadow: var(--shadow);
        width: 100% !important;
        margin-bottom: 15px;
    }

    /* Butona basılınca açılacak sınıf */
    .sidebar-filters.open {
        display: block !important;
        animation: fadeIn 0.2s ease;
    }

    /* Mobilde ürünler yan yana 2'li görünsün */
    .products-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .product-image {
        height: 160px !important;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ==========================================
   MOBİL ÜST BUTONLAR (Sipariş, Favori, Sepet) HİZALAMASI
   ========================================== */
@media screen and (max-width: 768px) {
    /* Header içindeki alanları mobilde dikey esnetelim */
    .header-container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    /* Arama çubuğu tam genişlik olsun */
    .search-bar {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Sağ üst buton grubunu tam genişlikte, aralarında eşit boşlukla yan yana getirelim */
    .header-actions {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        gap: 8px !important;
    }

    /* Butonların yazılarını gizleyip sadece ikonları bırakalım ve şık kare/dikdörtgen yapalım */
    .header-actions .action-btn {
        flex: 1 !important;
        justify-content: center !important;
        padding: 10px 5px !important;
        font-size: 20px !important; /* İkon boyutu */
        border-radius: var(--radius) !important;
    }

    .header-actions .action-btn span {
        display: none !important; /* Yazıları mobilde tamamen gizler, alanı ferahlatır */
    }
}
/* ==========================================
   MOBİL ÜST BUTONLAR - TAM ORTADA HİZALAMA
   ========================================== */
@media screen and (max-width: 768px) {
    .header-actions {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important; /* Tam ortaya hizalar */
        align-items: center !important;
        width: 100% !important;
        gap: 12px !important; /* Butonlar arası ideal boşluk */
    }

    .header-actions .action-btn {
        flex: 0 1 auto !important;
        min-width: 50px !important;
        justify-content: center !important;
        padding: 10px 14px !important;
        font-size: 20px !important;
        border-radius: var(--radius) !important;
    }

    .header-actions .action-btn span {
        display: none !important; /* Yazıları gizleyip ikonları ortada şık bırakıyoruz */
    }
}
/* ==========================================
   HTML'E DOKUNMADAN MOBİL KATEGORİ & FİLTRE DÜZENİ
   ========================================== */
@media screen and (max-width: 992px) {
    /* Mobilde sol taraftaki uzun filtre kutusunu tamamen gizleyelim, yer kaplamasın */
    .sidebar-filters {
        display: none !important;
    }

    /* Ürünlerin olduğu alanı tam genişlik yapalım */
    .layout-grid {
        display: block !important;
    }
}

@media screen and (max-width: 768px) {
    /* Tümü, Kadın, Erkek sekmelerini mobilde en üstte yatay kaydırılabilir şık bir şerit yapalım */
    .main-nav {
        padding: 8px 0 !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        background: var(--white) !important;
        border-bottom: 1px solid var(--border-color) !important;
    }

    .nav-list {
        display: flex !important;
        gap: 8px !important;
        padding: 0 15px !important;
    }

    .nav-link {
        font-size: 13px !important;
        padding: 6px 16px !important;
        background: #f1f3f5 !important;
        border-radius: 20px !important;
        color: var(--primary-color) !important;
    }

    .nav-link.active {
        background: var(--brand-color) !important;
        color: var(--white) !important;
    }
}
/* ==========================================
   MOBİL KATEGORİ SEKMELERİNİ (Tümü, Kadın, Erkek) ORTALAMA
   ========================================== */
@media screen and (max-width: 768px) {
    .main-nav {
        display: flex !important;
        justify-content: center !important; /* Sekmeler çubuğunu ortalar */
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding: 8px 0 !important;
    }

    .nav-list {
        display: flex !important;
        justify-content: center !important; /* İçindeki butonları tam ortaya hizalar */
        gap: 8px !important;
        margin: 0 auto !important;
        padding: 0 15px !important;
    }
}
