/* =================================================================
   ARK YAPI - ÜRÜNLER SAYFASI
   ================================================================= */

/* --- GENEL AYARLAR --- */
:root {
    --color-green: #425F57;
    --color-dark: #212121;
    --color-gray-bg: #F3F3F3;
    --font-main: 'Poppins', sans-serif;
}

/* Konteyner */
.content-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 240px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* --- HERO ALANI --- */
.products-hero {
    position: relative;
    width: 100%;
    height: 507px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: 0;
    max-width: 100vw;
}

@media (max-width: 768px) {
    .products-hero {
        height: 400px;
    }
}

@media (max-width: 600px) {
    .products-hero {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .products-hero {
        height: 300px;
    }
}

.hero-bg {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    /* Arka plan görseli */
    background-image: url('../../img/ark/background.webp'); 
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* Yeşil Overlay */
.hero-overlay-green {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(66, 95, 87, 0.57);
    mix-blend-mode: overlay;
    z-index: 2;
}

.hero-overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    /* Figma Gradient */
    background: linear-gradient(90deg, rgba(31, 31, 31, 0.75) 1.12%, rgba(31, 31, 31, 0) 101.12%);
    z-index: 3;
}

.hero-text {
    position: relative;
    z-index: 4;
}

.hero-title {
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 54px;
    color: #FFFFFF;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-desc {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 20px;
    line-height: 24px;
    letter-spacing: 0px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
}

/* --- KATEGORİ SLIDER ALANI (Figma Birebir) --- */
.category-section {
    padding: 80px 0;
    background-color: #fff;
    overflow: hidden; /* Taşmaları gizle */
}

.slider-relative-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

/* Slider Track (Kaydırma Alanı) */
.category-track {
    display: flex;
    gap: 24px; /* Butonlar arası boşluk */
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 10px 56px; /* Ok butonlarıyla çakışmasın diye içe kaydırıldı */
    width: 100%;
    scrollbar-width: none; /* Scrollbar gizle */
    -webkit-overflow-scrolling: touch;
}

.category-track::-webkit-scrollbar {
    display: none;
}

/* Kategori Butonları (Gri Kutular) */
.cat-btn {
    flex: 0 0 auto;
    flex-shrink: 0;
    width: 235px; /* Figma Width */
    min-width: 235px;
    height: 80px; /* Figma Height */
    background-color: var(--color-gray-bg);
    border-radius: 4px; /* Hafif oval köşe */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    box-sizing: border-box;
    
    /* Font Ayarları */
    font-family: var(--font-main);
    font-size: 18px;
    font-weight: 400;
    color: var(--color-green);
    text-decoration: none;
    transition: all 0.3s ease;
    line-height: 1.2;
}

/* Aktif Buton (Yeşil) */
.cat-btn.active, .cat-btn:hover {
    background-color: var(--color-green);
    color: #FFFFFF;
}

/* Slider Okları (Yuvarlak ve Beyaz) */
.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-color: #FFFFFF;
    border-radius: 50%; /* Tam yuvarlak */
    border: none;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.15); /* Gölge */
    /* Varsayılan gizli: JS kaydırmaya gerek olup olmadığını hesaplayıp ".is-visible" ekliyor.
       Önce görünür basılıp JS'in gizlemesini beklemek sayfa yenilenince okların bir anlığına
       görünüp kaybolmasına (flash) sebep oluyordu. */
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s ease;
}

.slider-nav-btn.is-visible {
    display: flex;
}

.slider-nav-btn:hover {
    transform: translateY(-50%) scale(1.1);
    background-color: var(--color-green);
}

.slider-nav-btn:hover svg path {
    stroke: #FFFFFF;
}

/* Okların Konumu */
.prev-btn {
    left: 220px; /* Container padding'den biraz içeri */
}

.next-btn {
    right: 220px; /* Container padding'den biraz içeri */
}

/* --- ÜRÜN GRID ALANI --- */
.products-grid-section {
    padding-bottom: 100px;
    background-color: #fff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Sütun */
    gap: 30px;
    margin-bottom: 60px;
}

.product-card {
    background: #fff;
    width: 100%;
    height: 457px;
    border: 1px solid #DCDCDC;
    border-radius: 8px;
    border-width: 1px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
    opacity: 1;
    box-sizing: border-box;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 10px 20px rgba(0,0,0,0.1);
}

.p-image-box {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.p-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.p-title {
    font-family: var(--font-main);
    font-size: 24px;
    font-weight: 400;
    color: #000;
    margin-bottom: 20px;
}

.p-btn {
    width: 100%;
    height: 48px;
    /* Kart sabit yükseklikte (457px); buton başlığın hemen altında değil, kartın en altına
       yaslanıyor — başlık kısa olduğunda aradaki boşluk butonu aşağı itiyor. */
    margin-top: auto;
    background-color: var(--color-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: var(--font-main);
    font-size: 20px;
    font-weight: 400;
    border-radius: 2px;
    transition: background 0.3s;
}

.p-btn:hover {
    background-color: #2f453e;
}

/* "Tümünü Gör" Butonu */
.load-more-wrapper {
    display: flex;
    justify-content: center;
}

.load-more-btn {
    width: 190px;
    height: 56px;
    background-color: var(--color-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: var(--font-main);
    font-size: 16px;
    border-radius: 4px;
    transition: opacity 0.3s;
}

.load-more-btn:hover {
    opacity: 0.9;
}

/* --- RESPONSIVE --- */
@media (max-width: 1600px) {
    .content-container {
        padding: 0 150px;
    }
    
    .prev-btn {
        left: 130px;
    }
    
    .next-btn {
        right: 130px;
    }
}

@media (max-width: 1400px) {
    .content-container {
        padding: 0 100px;
    }
    
    .prev-btn {
        left: 80px;
    }
    
    .next-btn {
        right: 80px;
    }
}

@media (max-width: 1200px) {
    .content-container {
        padding: 0 60px;
    }
    
    .prev-btn {
        left: 40px;
    }
    
    .next-btn {
        right: 40px;
    }
    
    .products-grid { 
        grid-template-columns: repeat(3, 1fr); 
    }
    
    .category-track {
        gap: 20px;
    }
    
    .cat-btn {
        width: 220px;
        min-width: 220px;
    }
}

@media (max-width: 992px) {
    .content-container {
        padding: 0 40px;
    }
    
    .prev-btn {
        left: 20px;
    }
    
    .next-btn {
        right: 20px;
    }
    
    .products-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 20px;
    }
    
    .hero-title { 
        font-size: 40px; 
    }
    
    .hero-desc {
        font-size: 18px;
    }
    
    .category-section {
        padding: 60px 0;
    }
    
    .category-track {
        gap: 16px;
    }
    
    .cat-btn {
        width: 200px;
        min-width: 200px;
        height: 75px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .content-container {
        padding: 0 30px;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
    
    .products-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 15px;
    }
    
    .product-card {
        height: auto;
        min-height: 400px;
        padding: 15px;
    }
    
    .p-image-box {
        height: 200px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-desc {
        font-size: 16px;
    }
    
    .category-section {
        padding: 40px 0;
    }
    
    .category-track {
        gap: 12px;
        padding: 10px 56px;
    }

    .cat-btn {
        width: 160px;
        min-width: 160px;
        height: 65px;
        font-size: 14px;
        padding: 0 12px;
    }
}

/* max-width: 991px - Markalar ile aynı */
@media (max-width: 991px) {
    .products-hero {
        height: 400px;
    }
    
    .content-container {
        padding: 0 30px;
    }
    
    .hero-title {
        font-size: 36px;
        line-height: 48px;
    }
    
    .hero-desc {
        font-size: 16px;
        line-height: 24px;
    }
}

@media (max-width: 600px) {
    .content-container {
        padding: 0 20px;
    }
    
    .prev-btn {
        left: 0px;
    }
    
    .next-btn {
        right: 0px;
    }
    
    .products-grid { 
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    
    .product-card {
        height: auto;
        min-height: 380px;
    }
}

/* max-width: 576px - Markalar ile aynı */
@media (max-width: 576px) {
    .products-hero {
        height: 350px;
    }
    
    .content-container {
        padding: 0 20px;
    }
    
    .hero-title {
        font-size: 20px;
        line-height: 36px;
    }
    
    .hero-desc {
        font-size: 14px;
        line-height: 20px;
    }
    
    /* Mobilde oklar artık GİZLENMİYOR: sadece kaydırmaya (swipe) güvenmek, dokunmatik kaydırma
       her zaman güvenilir/belirgin olmadığı için bazı kategorilerin hiç görünmemesine/
       ulaşılamamasına yol açıyordu. Oklar zaten JS ile sadece gerçekten kaydırma gerektiğinde
       gösteriliyor (.slider-nav-btn.is-visible), o yüzden burada zorla gizlemeye gerek yok. */

    .category-track {
        gap: 10px;
        padding: 10px 0;
    }
    
    .cat-btn {
        width: 140px;
        min-width: 140px;
        height: 60px;
        font-size: 13px;
        padding: 0 10px;
        line-height: 1.3;
    }
    
    .category-section {
        padding: 30px 0;
    }
}

@media (max-width: 480px) {
    .content-container {
        padding: 0 15px;
    }
    
    .prev-btn {
        left: 0px;
    }
    
    .next-btn {
        right: 0px;
    }
    
    .products-grid {
        gap: 15px;
    }
    
    .product-card {
        min-height: 350px;
        padding: 15px;
    }
    
    .p-image-box {
        height: 180px;
        margin-bottom: 15px;
    }
    
    .p-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .p-btn {
        height: 44px;
        font-size: 18px;
    }
    
    .category-track {
        gap: 8px;
        padding: 10px 0;
    }
    
    .cat-btn {
        width: 120px;
        min-width: 120px;
        height: 55px;
        font-size: 12px;
        padding: 0 8px;
        line-height: 1.4;
    }
    
    .category-section {
        padding: 25px 0;
    }
}
