/* ==========================================================================
   1. FONT VE TEMEL DEĞİŞKENLER (CSS Custom Properties)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
    /* Renk Paleti */
    --ana-renk: #e74c3c; 
    --ana-renk-hover: #c0392b;
    --koyu-renk: #1e293b;
    --acik-renk: #f8fafc;
    --metin-renk: #334155;
    --metin-acik: #64748b;
    --sinir-renk: #e2e8f0;
    
    /* Gölgeler */
    --golge-hafif: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --golge-orta: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --golge-hover: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    
    /* Yapısal Değerler */
    --radius-kucuk: 8px;
    --radius-orta: 16px;
    --radius-buyuk: 24px;
    --gecis-hizi: 0.4s;
    --gecis-egrisi: cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ==========================================================================
   2. GENEL SIFIRLAMA VE YAPI
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--acik-renk);
    color: var(--metin-renk);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased; /* Fontların daha net görünmesini sağlar */
}

h1, h2, h3, .baslik-font {
    font-family: 'Playfair Display', serif; /* Başlıklar için daha şık bir font */
    color: var(--koyu-renk);
}

/* Seçim Rengi */
::selection {
    background-color: var(--ana-renk);
    color: #fff;
}

/* Özel Kaydırma Çubuğu (Custom Scrollbar) */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--ana-renk); }

/* ==========================================================================
   3. HEADER VE NAVBAR (Glassmorphism Effect)
   ========================================================================== */
.navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
    padding: 15px 0;
    transition: all var(--gecis-hizi) var(--gecis-egrisi);
}

/* Navbar Scroll Olduğunda Daralma Efekti (JS ile .scrolled class'ı eklenebilir) */
.navbar.scrolled {
    padding: 8px 0;
    box-shadow: var(--golge-hafif);
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--koyu-renk) !important;
    margin: 0 12px;
    position: relative;
    transition: color 0.3s;
}

/* Menü Alt Çizgi Hover Animasyonu */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--ana-renk);
    transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link:hover { color: var(--ana-renk) !important; }

/* ==========================================================================
   4. ÜRÜN KARTLARI (Premium Tasarım)
   ========================================================================== */
.product-card {
    border: 1px solid var(--sinir-renk);
    border-radius: var(--radius-orta);
    background: #fff;
    transition: all var(--gecis-hizi) var(--gecis-egrisi);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--golge-hover);
    border-color: transparent;
}

.product-image-wrapper {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: #f1f5f9;
    border-radius: var(--radius-orta) var(--radius-orta) 0 0;
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--gecis-egrisi);
}

.product-card:hover img { 
    transform: scale(1.08); 
}

/* Rozetler (Yeni, İndirim vb.) */
.badge-etiket {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 30px;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.badge-yeni { background-color: var(--koyu-renk); color: white; }
.badge-indirim { background-color: var(--ana-renk); color: white; }

/* Favorilere Ekle Butonu */
.wishlist-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 1.1rem;
    box-shadow: var(--golge-hafif);
    z-index: 2;
    transition: 0.3s;
    text-decoration: none;
}
.wishlist-btn:hover, .wishlist-btn.active {
    color: var(--ana-renk);
    transform: scale(1.1);
}

/* Sepete Ekle Butonu - Aşağıdan Kayan Efekt */
.add-to-cart-btn {
    position: absolute;
    bottom: -60px;
    left: 10px;
    right: 10px;
    background: var(--koyu-renk);
    color: #fff;
    border: none;
    border-radius: var(--radius-kucuk);
    padding: 12px;
    font-weight: 600;
    transition: all 0.4s var(--gecis-egrisi);
    opacity: 0;
    visibility: hidden;
    z-index: 2;
}

.product-card:hover .add-to-cart-btn {
    bottom: 10px;
    opacity: 1;
    visibility: visible;
}
.add-to-cart-btn:hover { background: var(--ana-renk); color: #fff; }

/* Fiyatlandırma */
.price-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}
.price-tag {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ana-renk);
}
.old-price {
    font-size: 0.95rem;
    text-decoration: line-through;
    color: var(--metin-acik);
}

/* ==========================================================================
   5. SLIDER (Ana Görsel)
   ========================================================================== */
.main-slider .carousel-item {
    height: 600px;
    position: relative;
}
.main-slider img {
    height: 100%;
    object-fit: cover;
    /* Resmi doğrudan karartmak yerine üzerine gradient ekleyelim */
}

/* Slider Gradient Overlay - Metnin daha iyi okunması için */
.main-slider .carousel-item::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 100%);
    pointer-events: none;
}

.slider-caption {
    z-index: 2;
    bottom: 20%;
}

.slider-caption h2 {
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 4px 15px rgba(0,0,0,0.4);
    animation: fadeInUp 1s ease forwards; /* Animasyon aşağıda tanımlı */
}
.slider-caption p {
    font-size: 1.2rem;
    font-weight: 300;
    color: #f8f9fa;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}
.slider-caption .btn {
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

/* ==========================================================================
   6. BUTONLAR (Genel)
   ========================================================================== */
.btn-custom {
    background-color: var(--ana-renk);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}
.btn-custom:hover {
    background-color: var(--ana-renk-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
footer {
    background: var(--koyu-renk);
    color: #94a3b8;
    padding-top: 70px;
    border-top: 5px solid var(--ana-renk);
}
footer h5, footer h6 { 
    color: #f8fafc; 
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.5px;
}
footer a { 
    color: #94a3b8; 
    text-decoration: none; 
    transition: all 0.3s ease; 
    display: inline-block;
}
footer a:hover { 
    color: var(--ana-renk); 
    transform: translateX(5px); /* Üzerine gelince sağa kayma efekti */
}
.footer-bottom {
    background: #0f172a;
    padding: 20px 0;
    margin-top: 50px;
}

/* ==========================================================================
   8. ANİMASYONLAR VE YÜKLEME (SKELETON)
   ========================================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ürünler yüklenirken gösterilecek iskelet yapısı */
.skeleton-box {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ==========================================================================
   9. MOBİL UYUM (RESPONSIVE)
   ========================================================================== */
@media (max-width: 991px) {
    .navbar { padding: 10px 0; }
    .nav-link::after { display: none; } /* Mobilde alt çizgiyi kaldır */
}

@media (max-width: 768px) {
    .main-slider .carousel-item { height: 400px; }
    .slider-caption h2 { font-size: 2.2rem; }
    .slider-caption p { font-size: 1rem; }
    
    .product-image-wrapper { height: 220px; }
    
    /* Sepete ekle butonunu mobilde her zaman görünür yap (Mobilde hover yoktur) */
    .add-to-cart-btn {
        position: relative;
        bottom: 0;
        opacity: 1;
        visibility: visible;
        margin-top: 15px;
        width: 100%;
        left: 0;
    }
}