/* ======================================= */
/* 1. GENEL LAYOUT VE YERLEŞİM (Grid)      */
/* ======================================= */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

.main-content-grid {
    display: grid;
    grid-template-columns: 280px 1fr; /* Sol sidebar ve sağ içerik */
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
}
.product-sections-wrapper {
    min-height: 80vh; 
}

/* Bölüm Başlıkları ve Genel Grid Ayarları */
.product-section { margin-bottom: 50px; }
.section-title {
    font-size: 1.8rem;
    color: var(--dark);
    border-bottom: 3px solid var(--accent);
    padding-bottom: 8px;
    margin-bottom: 25px;
    display: inline-block;
    font-weight: 700;
}
.section-title i { color: var(--accent); margin-right: 10px; }
.section-title small { font-size: 0.7em; color: #64748b; margin-left: 10px; font-weight: 500;}

.product-grid {
    display: grid;
    gap: 20px;
}
.popular-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.small-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}


/* ======================================= */
/* 2. SLIDER VE BANNER ALANLARI            */
/* ======================================= */
.main-slider-placeholder {
    height: 250px;
    background: linear-gradient(135deg, var(--primary), var(--dark));
    color: white;
    border-radius: 12px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
.main-slider-placeholder h1 { margin: 0; font-size: 2rem; }
.main-slider-placeholder p { font-size: 1.1rem; opacity: 0.9; }

.banner-area {
    background: #eff6ff;
    padding: 15px 30px;
    border-radius: 8px;
    margin: 40px 0;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    border: 2px dashed #bfdbfe;
}
.banner-area i { color: var(--accent); margin-right: 10px; }


/* ======================================= */
/* 3. ÜRÜN KARTLARI VE RIBBON              */
/* ======================================= */
.product-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 380px; 
}
.product-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.product-link {
    text-decoration: none;
    color: var(--dark);
    padding: 15px;
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
}

.product-image-box {
    width: 100%;
    height: 180px; 
    overflow: hidden;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 8px;
    position: relative; /* RIBBON için gereklidir */
}
.product-image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

/* --- ÜRÜN RIBBON (ETİKET) STİLİ --- */
.product-ribbon {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 5px;
}

.new-ribbon {
    background-color: #10b981; /* Yeşil - Sıfır Ürün */
}

.used-ribbon {
    background-color: #f97316; /* Turuncu - 2. El */
}

.soldout-ribbon {
    background-color: #ef4444; /* Kırmızı - Stokta Yok */
}
/* ---------------------------------- */


.product-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 10px 0;
    min-height: 40px; 
    overflow: hidden;
    color: #1f2937;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #dc2626; 
    margin-top: auto;
}

/* Ürün Aksiyon Butonları */
.product-actions {
    display: flex;
    border-top: 1px solid var(--border);
    background: #f8fafc;
}

.btn-action {
    flex-grow: 1;
    padding: 12px 0;
    text-align: center;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-cart {
    background: var(--primary);
    color: white;
    border-bottom-left-radius: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-cart:hover {
    background: var(--dark);
}

.btn-favorite {
    background: transparent;
    color: #ef4444; 
    width: 60px; 
    flex-grow: 0;
    border-bottom-right-radius: 12px;
}
.btn-favorite:hover {
    background: #fee2e2;
}

/* Stokta Yok Buton Engelleme */
.disabled-cart {
    pointer-events: none; 
    background: #94a3b8 !important; 
    opacity: 0.8;
}

/* ======================================= */
/* 4. RESPONSIVE AYARLAR                   */
/* ======================================= */
@media (max-width: 992px) {
    .main-content-grid { 
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    .popular-grid, .small-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    }
}

@media (max-width: 600px) {
    .popular-grid, .small-grid { 
        grid-template-columns: 1fr; 
    }
    .product-card {
        min-height: auto;
    }
    .product-actions { 
        flex-direction: column; 
    }
    .btn-cart, .btn-favorite {
        border-right: none;
        border-radius: 0;
        width: 100%;
    }
}