/* assets/css/style.css */

/* --- 1. GENEL AYARLAR & DEĞİŞKENLER --- */
:root { 
    --dark-green: #064e3b; 
    --soft-green: #10b981;
    --border-color: #e2e8f0;
    --danger: #ef4444;
    --bg-color: #f8fafc;
    --accent: #d4a017;
    --footer-bg: #1a3c34;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

html { scroll-behavior: smooth; }

/* Global Background */
#global-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: white;
    background-image: url('https://www.transparenttextures.com/patterns/fabric-of-squares.png');
    z-index: -1; pointer-events: none;
}

body { 
    background: transparent; 
    color: #334155; 
    display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; gap: 0;
}

body.modal-open { overflow: hidden; }

/* --- SWEETALERT --- */
.swal2-popup { border-radius: 24px !important; font-family: 'Inter', sans-serif !important; padding: 1.5em !important; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important; }
.swal2-title { color: var(--dark-green) !important; font-size: 1.3rem !important; }
.swal2-confirm { background-color: var(--soft-green) !important; border-radius: 12px !important; padding: 12px 24px !important; box-shadow: none !important; }
.swal2-deny { background-color: var(--accent) !important; border-radius: 12px !important; padding: 12px 24px !important; color: #fff !important; }
.swal2-cancel { background-color: #f1f5f9 !important; color: #64748b !important; border-radius: 12px !important; }

/* --- YUKARI ÇIK BUTONU --- */
#scrollTopBtn {
    position: fixed; bottom: 30px; right: 30px;
    width: 50px; height: 50px;
    background: var(--soft-green); color: white;
    border-radius: 50%; border: none; cursor: pointer;
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.4);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; opacity: 0; visibility: hidden;
    transform: translateY(20px); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 9999;
}
#scrollTopBtn.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* --- HOVER EFEKTLERİ (MASAÜSTÜ) --- */
@media (hover: hover) {
    #scrollTopBtn:hover { background: var(--dark-green); transform: translateY(-5px); }
    .btn-auth:hover { background: rgba(255,255,255,0.2); }
    .btn-auth.register:hover { background: #059669; }
    .btn-profile:hover { background: rgba(255,255,255,0.25); }
    
    /* GÜÇLENDİRİLMİŞ DERİNLİK ALGISI BURADA */
    .p-card:hover { 
        transform: translateY(-7px); 
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08); 
        border-color: var(--soft-green);
        z-index: 10;
    }
    .p-card:hover .p-img { 
        transform: scale(1.08); 
    }
    
    .cat-item:hover { transform: translateY(-2px); }
    .social-btn:hover { background: var(--accent); color: var(--footer-bg); transform: scale(1.1); }
}

/* --- HEADER & LOGO --- */
header { 
    background: rgba(6, 78, 59, 0.95);
    backdrop-filter: blur(10px);
    padding: 0 5%; position: sticky; top: 0; z-index: 2000; 
    display: flex; justify-content: space-between; align-items: center;
    height: 70px; box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: padding-right 0s; 
}

.logo-area { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.logo-area img { 
    height: 68px; /* SENİN AYARLADIĞIN BÜYÜK BOYUT */
    width: auto; 
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.2)); 
}
.logo-text h1 { color: #ffffff; font-size: 20px; font-weight: 800; line-height: 1; margin: 0; }
.logo-text span { color: #a7f3d0; font-size: 10px; font-weight: 500; text-transform: uppercase; }

.header-actions { display: flex; align-items: center; gap: 15px; }

/* --- BUTONLAR --- */
.btn-auth { 
    color: white; text-decoration: none; font-size: 13px; font-weight: 600; 
    padding: 8px 16px; border-radius: 50px; transition: 0.2s; 
    display: flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1);
}
.btn-auth.register { background: var(--soft-green); border-color: var(--soft-green); box-shadow: 0 4px 10px rgba(16,185,129,0.3); }

.btn-profile { 
    background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2); 
    border-radius: 50px; padding: 6px 12px; color:white; font-size:13px; 
    font-weight:600; display:flex; align-items:center; gap:8px; cursor:pointer; 
    transition: 0.2s; white-space: nowrap;
}

/* --- YENİ ŞIK GERİ DÖN BUTONU --- */
.btn-back-stylish {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px; /* Diğer butonlarla aynı dolgunluk */
    border-radius: 50px; /* Tam yuvarlak */
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.15); /* Diğer butonlarla aynı şeffaflık */
    white-space: nowrap;
}

.btn-back-stylish:hover {
    background: rgba(255, 255, 255, 0.25); /* Parlama efekti */
    transform: translateX(-3px); /* Sola hafif kayma */
}

.btn-back-stylish i {
    font-size: 12px;
}

/* --- SEPET (CART) --- */
.cart-wrapper { position: relative; display: flex; align-items: center; }
.cart-btn { 
    background: rgba(255, 255, 255, 0.15); padding: 0 16px; border-radius: 50px; 
    cursor: pointer; display: flex; align-items: center; gap: 10px; 
    border: 1px solid rgba(255,255,255,0.2); font-weight: 600; color: #fff;
    height: 40px; transition: all 0.2s; backdrop-filter: blur(5px); white-space: nowrap;
}
.cart-btn:active { transform: scale(0.95); background: rgba(255, 255, 255, 0.25); }
.cart-badge { background: var(--danger); color: #fff; font-weight: 700; padding: 2px 6px; border-radius: 50px; font-size: 10px; min-width: 18px; text-align: center; }

.cart-dropdown { 
    position: absolute; top: 75px; right: 2%; width: 350px; max-width: 90vw;
    background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(15px);
    border-radius: 16px; display: none; padding: 20px; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.15); z-index: 3000; border: 1px solid rgba(255,255,255,0.8);
}
.cart-dropdown.show { display: block; animation: slideUp 0.25s; }

.cart-item-row { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; margin-bottom: 10px; }
.ci-info { flex: 1; padding-right: 10px; }
.ci-name { font-weight: 600; font-size: 14px; color: #1e293b; }
.ci-detail { font-size: 12px; color: #64748b; }
.ci-actions { display: flex; align-items: center; gap: 10px; }
.ci-price { font-weight: 700; font-size: 14px; color: var(--dark-green); }
.ci-del-btn { color: var(--danger); border: none; background: none; cursor: pointer; padding: 5px; }

/* --- KUPON --- */
.coupon-area { margin-top: 15px; padding-top: 15px; border-top: 1px dashed #e2e8f0; }
.coupon-input-group { display: flex; gap: 8px; }
.coupon-input { flex: 1; padding: 10px; border: 1px solid #cbd5e1; border-radius: 10px; font-size: 13px; outline: none; text-transform: uppercase; letter-spacing: 1px; }
.coupon-input:focus { border-color: var(--soft-green); }
.btn-apply { background: #334155; color: white; border: none; padding: 0 16px; border-radius: 10px; font-weight: 600; cursor: pointer; font-size: 12px; transition: 0.2s; }
.btn-apply:hover { background: #1e293b; }
#coupon-msg { font-size: 11px; margin-top: 5px; height: 16px; }

/* --- MODALLER --- */
.modal { display: none; position: fixed; z-index: 5000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); align-items: center; justify-content: center; }
.modal.active { display: flex; animation: fadeIn 0.2s; }
.modal-content { background: #fff; width: 90%; max-width: 400px; padding: 30px; border-radius: 20px; position: relative; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); max-height: 90vh; overflow-y: auto; }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 24px; cursor: pointer; color: #94a3b8; }

/* --- FORMLAR --- */
.form-group { margin-bottom: 15px; width: 100%; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #64748b; margin-bottom: 5px; }
.form-input { width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 10px; outline: none; font-size: 14px; background: #f8fafc; box-sizing: border-box; }
.form-input:focus { border-color: var(--soft-green); background: #fff; }
.btn-primary { width: 100%; padding: 14px; background: var(--soft-green); color: white; border: none; border-radius: 12px; font-weight: 700; cursor: pointer; margin-top: 10px; transition:0.2s; }
.btn-primary:active { transform: scale(0.98); }

/* --- ANA İÇERİK & ÜRÜNLER --- */
.main-wrapper { max-width: 1200px; margin: 25px auto; padding: 0 15px; flex: 1; width: 100%; }

.category-nav { display: flex; gap: 10px; overflow-x: auto; padding: 5px 5px 15px 5px; margin-bottom: 10px; scrollbar-width: none; }
.category-nav::-webkit-scrollbar { display: none; } 
.cat-item { background: #ffffff; color: #64748b; padding: 10px 20px; border-radius: 50px; cursor: pointer; white-space: nowrap; font-weight: 600; border: 1px solid var(--border-color); transition: 0.3s; font-size: 13px; user-select: none; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.cat-item.active { background: var(--dark-green); color: #fff; border-color: var(--dark-green); box-shadow: 0 4px 12px rgba(6, 78, 59, 0.3); }
.cat-item.special { background: #fdf4ff; color: #7c3aed; border-color: #d8b4fe; }
.cat-item.special.active { background: #7c3aed; color: #fff; border-color: #7c3aed; }

.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.p-card { background: #ffffff; border-radius: 20px; padding: 12px; box-shadow: var(--card-shadow); border: 1px solid rgba(255,255,255,0.5); display: flex; flex-direction: column; position: relative; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.out-of-stock-badge { position: absolute; top: 12px; left: 12px; background: rgba(239, 68, 68, 0.95); color: white; padding: 5px 10px; border-radius: 8px; font-size: 10px; font-weight: 700; z-index: 10; backdrop-filter: blur(4px); }
.discount-badge { position: absolute; top: 12px; left: 12px; background: #f59e0b; color: white; padding: 5px 10px; border-radius: 8px; font-size: 10px; font-weight: 700; z-index: 10; box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3); }

.p-img-wrapper { border-radius: 16px; overflow: hidden; margin-bottom: 12px; aspect-ratio: 1/1; position: relative; background: #f1f5f9; }
.p-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.p-info { display: flex; flex-direction: column; flex-grow: 1; }
.price-container { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.p-price { font-size: 16px; font-weight: 800; color: var(--soft-green); }
.p-old-price { font-size: 12px; color: #94a3b8; text-decoration: line-through; font-weight: 500; }
.p-name { font-weight: 600; font-size: 14px; color: #1e293b; margin-bottom: 12px; height: 40px; overflow: hidden; }
.action-area { margin-top: auto; height: 40px; position: relative; }
.btn-add { width: 100%; height: 100%; border-radius: 12px; border: 1px solid var(--border-color); background: #fff; color: var(--dark-green); font-weight: 700; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: 0.2s; }
.btn-add:active { transform: scale(0.96); background: #f8fafc; }
.qty-control { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--soft-green); border-radius: 12px; height: 100%; width: 100%; overflow: hidden; }
.qty-btn-action { width: 36px; height: 100%; border: none; background: #fff; color: var(--soft-green); font-size: 16px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; user-select: none; }
.qty-btn-action:active { background: #dcfce7; }
.qty-btn-action.delete { color: var(--danger); }
.qty-btn-action.delete:active { background: #fee2e2; }
.qty-text { flex: 1; text-align: center; font-size: 13px; font-weight: 700; background: var(--soft-green); color: white; height: 100%; display: flex; align-items: center; justify-content: center; user-select: none; }

/* --- FOOTER --- */
footer { background: var(--footer-bg); color: white; padding: 30px 5% 15px; font-size: 13px; border-top: 4px solid var(--accent); margin-top: auto; }
.footer-container { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 20px; max-width: 1200px; margin: 0 auto; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 20px; }
.footer-col h3 { font-size: 13px; font-weight: 700; margin-bottom: 12px; color: #fff; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.8; }
.footer-left { text-align: left; } .footer-links ul { list-style: none; padding: 0; margin: 0; } .footer-links li { margin-bottom: 6px; } .footer-links a { color: #a7f3d0; text-decoration: none; transition: 0.2s; display: inline-flex; align-items: center; gap: 5px; }
.footer-right { text-align: right; } .contact-info p { margin-bottom: 6px; display: flex; align-items: center; justify-content: flex-end; gap: 6px; } .contact-info a { color: #a7f3d0; text-decoration: none; transition: 0.2s; font-weight: 500; } .contact-info a:hover { color: #fff; } .contact-info i { color: var(--soft-green); font-size: 14px; }
.social-links { display: flex; justify-content: flex-end; gap: 12px; margin-top: 15px; } .social-btn { width: 36px; height: 36px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; text-decoration: none; transition: 0.3s; font-size: 16px; }
.footer-bottom { text-align: center; padding-top: 15px; font-size: 11px; color: rgba(255,255,255,0.4); }

/* --- PROFİL SAYFASI ÖZEL CSS --- */
.container { max-width: 1200px; margin: 30px auto; padding: 0 20px; display: flex; align-items: flex-start; gap: 30px; flex: 1; width: 100%; }
.sidebar-wrapper { flex: 0 0 260px; max-width: 260px; }
.sidebar-card { width: 100%; background: white; border-radius: 16px; padding: 20px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); border: 1px solid var(--border-color); position: sticky; top: 100px; width: 100%; }

.content-wrapper { flex: 1; min-width: 0; display: flex; flex-direction: column; width: 100%; }
.content-section { display: none; animation: fadeIn 0.4s ease; width: 100%; }
.content-section.active { display: block; }

.main-card { width: 100%; background: white; border-radius: 16px; padding: 30px; border: 1px solid var(--border-color); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); width: 100%; display: block; }
.stats-grid { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { width: 100%; background: white; border-radius: 16px; padding: 20px; border: 1px solid var(--border-color); display: flex; align-items: center; gap: 15px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); width: 100%; }
.stat-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.stat-info h3 { font-size: 20px; font-weight: 800; color: #1e293b; margin: 0; }
.stat-info p { font-size: 12px; color: #64748b; margin: 0; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.order-scroll-container { max-height: 600px; overflow-y: auto; padding-right: 10px; }
.order-scroll-container::-webkit-scrollbar { width: 8px; }
.order-scroll-container::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
.order-scroll-container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; border: 2px solid #f1f5f9; }
.order-scroll-container::-webkit-scrollbar-thumb:hover { background: var(--soft-green); }

.order-card { width: 100%; border: 1px solid var(--border-color); border-radius: 12px; padding: 20px; margin-bottom: 15px; background: #fff; transition: 0.2s; width: 100%; }
.order-card:hover { border-color: var(--soft-green); box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.order-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dashed var(--border-color); }
.order-id { font-weight: 800; color: var(--dark-green); font-size: 15px; }
.order-date { font-size: 12px; color: #94a3b8; margin-top: 4px; display: block; }
.order-status { font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 20px; text-transform: uppercase; }
.st-pending { background: #fff7ed; color: #d97706; } .st-shipping { background: #eff6ff; color: #2563eb; } .st-completed { background: #ecfdf5; color: #059669; } .st-cancelled { background: #fef2f2; color: #dc2626; }
.order-items { display: flex; flex-direction: column; gap: 8px; }
.order-item { display: flex; justify-content: space-between; font-size: 14px; color: #475569; }
.order-total { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border-color); font-weight: 800; font-size: 18px; color: var(--dark-green); }

.user-brief { text-align: center; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.avatar { width: 80px; height: 80px; background: #ecfdf5; color: var(--soft-green); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; margin: 0 auto 10px; border: 2px solid #d1fae5; }
.nav-menu button { width: 100%; text-align: left; padding: 12px 15px; background: none; border: none; border-radius: 10px; cursor: pointer; color: #64748b; font-weight: 600; display: flex; align-items: center; gap: 10px; transition: 0.2s; font-size: 14px; margin-bottom: 5px; }
.nav-menu button:hover, .nav-menu button.active { background: #f0fdf4; color: var(--dark-green); }
.nav-menu button i { width: 24px; text-align: center; }
.logout-btn { color: #ef4444 !important; margin-top: 10px; }
.logout-btn:hover { background: #fef2f2 !important; color: #dc2626 !important; }
.coupon-tag { font-size: 11px; background: #f0fdf4; color: var(--soft-green); padding: 4px 10px; border-radius: 6px; border: 1px dashed var(--soft-green); display: inline-flex; align-items: center; gap: 5px; }
.old-price { text-decoration: line-through; color: #94a3b8; font-size: 13px; font-weight: 500; margin-right: 8px; }
.btn-save { background: var(--soft-green); color: white; border: none; padding: 14px 25px; border-radius: 10px; font-weight: 700; cursor: pointer; transition: 0.2s; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.btn-save:hover { background: var(--dark-green); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }

/* --- RESPONSIVE AYARLAR --- */
@media (min-width: 768px) { 
    header { padding: 0 10%; } 
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 25px; } 
    .cart-dropdown { right: 10%; } 
    .footer-links a:hover { color: #fff; transform: translateX(3px); }
}

@media (max-width: 768px) { 
    header { height: 60px; padding: 0 15px; } 
    
    /* Mobil Logo Ayarı */
    .logo-area img { height: 45px; } 
    .logo-text h1 { font-size: 15px; } 
    .logo-text span { display: none; } 
    
    .header-actions { gap: 8px; }
    .auth-buttons { gap: 6px; }
    .btn-auth { font-size: 11px; padding: 6px 12px; }
    .btn-profile { padding: 5px 10px; font-size: 11px; }
    .btn-profile i { font-size: 14px; }
    .cart-btn { padding: 0 12px; height: 36px; font-size: 12px; }
    .cart-dropdown { top: 60px; right: 0; left: 0; width: 100%; max-width: 100%; border-radius: 0 0 16px 16px; }
    
    .footer-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 10px; padding-bottom: 20px; }
    .footer-left { text-align: left; }
    .footer-right { text-align: right; }
    .contact-info p { justify-content: flex-end; }
    .social-links { justify-content: flex-end; }
    #scrollTopBtn { bottom: 25px; right: 25px; width: 45px; height: 45px; font-size: 18px; }

    /* Profil Mobil */
    .container { flex-direction: column; margin: 15px auto; gap: 20px; display: flex; }
    .sidebar-wrapper { flex: auto; max-width: 100%; width: 100%; }
    .sidebar-card { position: static; width: 100%; margin-bottom: 15px; }
    .content-wrapper { width: 100%; }
    .stats-grid { grid-template-columns: 1fr; }
    .nav-menu { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; -webkit-overflow-scrolling: touch; }
    .nav-menu button { white-space: nowrap; flex: 1; justify-content: center; border: 1px solid var(--border-color); }
    .nav-menu button.active { border-color: var(--soft-green); }
    
    /* Mobil Geri Dön Butonu Ayarı */
    .btn-back-stylish span { display: none; }
    .btn-back-stylish { padding: 0; width: 36px; height: 36px; justify-content: center; border-radius: 50%; }
    .btn-back-stylish i { margin: 0; font-size: 14px; }
}

.sold-out { opacity: 0.7; pointer-events: none; filter: grayscale(0.8); }
@keyframes slideUp { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }