﻿/* ====================Kategori.css=================================
   KATEGORİ SAYFASI İÇİN EK CSS
   Not: Bu dosya, ana layout CSS'inden SONRA eklenmelidir.
   1. dosyada zaten olan genel reset, topbar, header, menü, footer,
   floating buton ve alt güven bandı kodları tekrar edilmemiştir.
===================================================== */

/* Ana CSS'te button/input vardı; kategori sayfasında select de kullanılıyor */
select {
    font: inherit;
}

/* =====================================================
   BUTON EKİ
===================================================== */

.btn-outline {
    border-color: var(--line);
    background: #fff;
    color: var(--text);
}

    .btn-outline:hover {
        background: var(--soft);
    }


/* =====================================================
   KATEGORİ HERO
===================================================== */

.category-hero {
    position: relative;
    isolation: isolate;
    min-height: 360px;
    display: grid;
    align-items: center;
    overflow: hidden;
    background: #111;
}

    .category-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.58) 40%, rgba(0,0,0,.18) 100%), url('images/hero.webp') 58% center / cover no-repeat;
        z-index: -2;
        transform: scale(1.03);
        animation: categoryHeroZoom 2.8s ease-out forwards;
    }

@keyframes categoryHeroZoom {
    from {
        transform: scale(1.05);
    }

    to {
        transform: scale(1);
    }
}

.category-hero-content {
    width: 680px;
    max-width: 100%;
    color: #fff;
    padding: 56px 0;
}

.breadcrumb-light {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    color: rgba(255,255,255,.72);
    font-size: 14px;
}

    .breadcrumb-light a:hover {
        color: #fff;
    }

.category-hero-label {
    display: inline-flex;
    margin-bottom: 16px;
    color: #d6a64e;
    font-weight: 900;
    font-size: 16px;
}

.category-hero h1 {
    margin: 0;
    font-size: clamp(42px, 4vw, 70px);
    line-height: 1.02;
    letter-spacing: -.055em;
}

.category-hero p {
    margin: 20px 0 0;
    max-width: 620px;
    color: rgba(255,255,255,.88);
    font-size: 18px;
    line-height: 1.65;
}

.category-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

    .category-hero-stats span {
        display: inline-flex;
        align-items: center;
        min-height: 38px;
        padding: 0 14px;
        border: 1px solid rgba(255,255,255,.20);
        border-radius: 999px;
        background: rgba(255,255,255,.08);
        color: rgba(255,255,255,.92);
        font-size: 13px;
        font-weight: 800;
    }


/* =====================================================
   KATEGORİ SAYFA GÖVDESİ
===================================================== */

.category-page {
    background: linear-gradient(180deg, #fff 0%, #f7f3ed 100%);
    padding: 46px 0 72px;
}

.category-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
    align-items: start;
}


/* =====================================================
   FİLTRE SIDEBAR
===================================================== */

.filter-sidebar {
    position: sticky;
    top: 126px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 10px 30px rgba(0,0,0,.035);
    overflow: hidden;
}

.filter-head {
    padding: 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

    .filter-head strong {
        font-size: 18px;
        font-weight: 950;
    }

.filter-clear {
    border: 0;
    background: transparent;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.filter-group {
    padding: 20px;
    border-bottom: 1px solid var(--line);
}

    .filter-group:last-child {
        border-bottom: 0;
    }

    .filter-group h3 {
        margin: 0 0 14px;
        font-size: 15px;
        font-weight: 950;
    }

.filter-list {
    display: grid;
    gap: 10px;
}

.filter-check {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #333;
    font-size: 14px;
    cursor: pointer;
}

    .filter-check input {
        accent-color: var(--brand);
    }

.filter-category-list {
    display: grid;
    gap: 8px;
}

    .filter-category-list a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        border-radius: 12px;
        color: #222;
        font-size: 14px;
        font-weight: 750;
    }

        .filter-category-list a:hover,
        .filter-category-list a.is-active {
            background: #f4eee4;
            color: var(--brand-dark);
        }

    .filter-category-list small {
        color: var(--muted);
        font-weight: 700;
    }

.mobile-filter-btn {
    display: none;
    width: 100%;
    margin-bottom: 18px;
}


/* =====================================================
   ÜRÜN LİSTE ÜST BAR
===================================================== */

.listing-top {
    min-height: 72px;
    margin-bottom: 18px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 10px 30px rgba(0,0,0,.025);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.listing-title strong {
    display: block;
    font-size: 18px;
    font-weight: 950;
}

.listing-title span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.listing-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .listing-actions select {
        min-height: 42px;
        padding: 0 38px 0 14px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: #fff;
        color: #222;
        font-size: 14px;
        font-weight: 700;
    }

.view-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-weight: 950;
}

    .view-btn.is-active {
        background: #111;
        color: #fff;
    }


/* =====================================================
   KATEGORİ ÜRÜN GRID KARTLARI
   Not: .category-page ile scope edildi. Böylece ana sayfadaki
   ürün vitrin kartlarını bozmaz.
===================================================== */

.category-page .product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.category-page .product-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,.035);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

    .category-page .product-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow);
        border-color: #ddcdaf;
    }

    .category-page .product-card > a {
        display: block;
        height: 100%;
    }

.category-page .product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.category-page .product-img {
    aspect-ratio: 1.22 / 1;
    overflow: hidden;
    background: var(--soft);
}

    .category-page .product-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .22s ease;
    }

.category-page .product-card:hover .product-img img {
    transform: scale(1.04);
}

.category-page .product-body {
    padding: 16px;
}

.category-page .product-category {
    display: block;
    margin-bottom: 8px;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 900;
}

.category-page .product-body h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.18;
    letter-spacing: -.02em;
}

.category-page .product-body p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.product-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

    .product-meta-row span {
        padding: 6px 9px;
        border-radius: 999px;
        background: #f4f0e8;
        color: #222;
        font-size: 12px;
        font-weight: 750;
    }

.product-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

    .product-card-actions a {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 950;
    }

    .product-card-actions .detail-link {
        background: #111;
        color: #fff;
    }

    .product-card-actions .offer-link {
        border: 1px solid var(--line);
        background: #fff;
        color: #111;
    }

        .product-card-actions .offer-link:hover {
            background: var(--soft);
        }


/* =====================================================
   SAYFALAMA
===================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 34px;
}

    .pagination a,
    .pagination span {
        width: 42px;
        height: 42px;
        border: 1px solid var(--line);
        border-radius: 999px;
        display: grid;
        place-items: center;
        background: #fff;
        font-weight: 850;
    }

    .pagination .is-active {
        background: var(--brand);
        color: #fff;
        border-color: var(--brand);
    }


/* =====================================================
   KATEGORİ SEO ALANI
===================================================== */

.category-seo-area {
    background: #fff;
    padding: 72px 0;
}

.category-seo-box {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 10px 30px rgba(0,0,0,.035);
    padding: 38px;
}

    .category-seo-box > span {
        display: inline-flex;
        margin-bottom: 12px;
        color: var(--brand-dark);
        font-weight: 900;
    }

    .category-seo-box h2 {
        margin: 0;
        font-size: clamp(30px, 3vw, 46px);
        letter-spacing: -.045em;
        line-height: 1.1;
    }

    .category-seo-box p {
        margin: 18px 0 0;
        max-width: 1100px;
        color: var(--muted);
        font-size: 16px;
        line-height: 1.75;
    }

.category-seo-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

    .category-seo-links a {
        padding: 9px 13px;
        border-radius: 999px;
        background: #f4f0e8;
        color: #222;
        font-size: 13px;
        font-weight: 850;
    }

        .category-seo-links a:hover {
            background: var(--brand);
            color: #fff;
        }


/* =====================================================
   KATEGORİ SAYFASI RESPONSIVE
===================================================== */

@media (max-width: 1500px) {
    .category-page .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1300px) {
    .category-layout {
        grid-template-columns: 260px 1fr;
    }
}

@media (max-width: 1020px) {
    .category-layout {
        grid-template-columns: 1fr;
    }

    .filter-sidebar {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 110px;
        max-height: calc(100dvh - 130px);
        overflow-y: auto;
        z-index: 900;
        display: none;
    }

        .filter-sidebar.is-open {
            display: block;
        }

    .mobile-filter-btn {
        display: inline-flex;
    }

    .category-page .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .category-hero {
        min-height: 420px;
    }

        .category-hero::before {
            background: linear-gradient(180deg, rgba(0,0,0,.60) 0%, rgba(0,0,0,.78) 100%), url('images/hero-mobile.webp') center / cover no-repeat;
            animation: none;
        }

    .category-hero-content {
        padding: 56px 0;
    }

    .category-hero h1 {
        font-size: 46px;
    }

    .category-hero p {
        font-size: 16px;
    }

    .category-page {
        padding: 32px 0 54px;
    }

    .listing-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .listing-actions {
        width: 100%;
    }

        .listing-actions select {
            width: 100%;
        }

    .category-page .product-grid {
        grid-template-columns: 1fr;
    }

    .product-card-actions {
        grid-template-columns: 1fr;
    }

    .category-seo-box {
        padding: 24px;
        border-radius: 20px;
    }
}

@media (max-width: 430px) {
    .category-hero h1 {
        font-size: 38px;
    }
}

/* =====================================================
   KATEGORİ KART BUTON DÜZELTME
===================================================== */

.category-page .product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-page .product-img-link {
    display: block;
}

.category-page .product-text-link {
    display: block;
}

.category-page .product-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.category-page .product-card-actions {
    margin-top: auto;
    padding-top: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

    .category-page .product-card-actions a {
        min-height: 42px;
        width: 100%;
    }
