/* ============================
   OyunMarket - Ana CSS
   ============================ */

:root {
    --primary: #6c63ff;
    --primary-dark: #5a52d5;
    --secondary: #ff6584;
    --bg-dark: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card2: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --border: #2a2a3e;
    --success: #00c851;
    --warning: #ffbb33;
    --danger: #ff4444;
    --radius: 12px;
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================
   Flash Mesaj
   ============================ */
.flash-message {
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    border-radius: var(--radius);
    min-width: 300px;
    box-shadow: var(--shadow);
}
.flash-success { background: var(--success); color: #000; }
.flash-error { background: var(--danger); }
.flash-warning { background: var(--warning); color: #000; }
.flash-message button { background: none; border: none; cursor: pointer; font-size: 1.2rem; opacity: 0.7; color: inherit; }

/* ============================
   Header
   ============================ */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 15px 0;
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav { display: flex; gap: 20px; margin-left: auto; }
.main-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}
.main-nav a:hover { color: var(--text-primary); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-btn {
    position: relative;
    padding: 10px 14px;
    background: var(--bg-card2);
    border-radius: var(--radius);
    font-size: 1.1rem;
    transition: background 0.2s;
}
.cart-btn:hover { background: var(--border); }
.cart-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* User Menu */
.user-menu { position: relative; }
.user-btn {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.user-btn:hover { background: var(--border); }
.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 200px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.user-menu:hover .user-dropdown { display: block; }
.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.2s;
}
.user-dropdown a:hover { background: var(--border); color: var(--text-primary); }
.user-dropdown .admin-link { color: var(--primary); }
.user-dropdown .logout-link { color: var(--danger); border-top: 1px solid var(--border); }

/* ============================
   Category Nav
   ============================ */
.category-nav {
    border-top: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav-inner {
    display: flex;
    gap: 5px;
    padding: 8px 0;
}
.cat-item { position: relative; }
.cat-item > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
}
.cat-item > a img { width: 20px; height: 20px; object-fit: contain; }
.cat-item > a:hover { background: var(--border); color: var(--text-primary); }
.cat-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 220px;
    box-shadow: var(--shadow);
    z-index: 100;
    padding: 8px 0;
}
.cat-item:hover .cat-dropdown { display: block; }
.cat-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all 0.2s;
}
.cat-dropdown a img { width: 20px; height: 20px; object-fit: contain; }
.cat-dropdown a:hover { background: var(--border); color: var(--text-primary); }

/* ============================
   Buttons
   ============================ */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-align: center;
    justify-content: center;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-primary); }
.btn-outline:hover { background: var(--border); }
.btn-success { background: var(--success); color: #000; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: #000; }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; }

/* ============================
   Hero / Slider
   ============================ */
.hero-section {
    background: linear-gradient(135deg, var(--bg-card2) 0%, var(--bg-dark) 100%);
    padding: 60px 0;
    margin-bottom: 40px;
    overflow: hidden;
    position: relative;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(108,99,255,0.1) 0%, transparent 60%);
}

.slider-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px;
}
.slider-container img { width: 100%; height: 300px; object-fit: cover; border-radius: 16px; }

/* Feature Badges */
.features-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}
.feature-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: border-color 0.2s;
}
.feature-item:hover { border-color: var(--primary); }
.feature-item i { font-size: 2rem; color: var(--primary); margin-bottom: 10px; }
.feature-item h4 { font-size: 0.9rem; margin-bottom: 4px; }
.feature-item p { font-size: 0.8rem; color: var(--text-secondary); }

/* ============================
   Kategoriler Grid
   ============================ */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 50px;
}
.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}
.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(108,99,255,0.2);
}
.category-card img { width: 64px; height: 64px; object-fit: contain; margin-bottom: 12px; }
.category-card h4 { font-size: 0.85rem; font-weight: 600; }

/* ============================
   Ürünler Grid
   ============================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s;
    position: relative;
}
.product-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(108,99,255,0.2);
}
.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}
.product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.product-info { padding: 16px; }
.product-info h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 10px; line-height: 1.4; }
.product-price { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.price-current { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.price-old { font-size: 0.85rem; color: var(--text-secondary); text-decoration: line-through; }
.price-discount {
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}
.product-info .btn { width: 100%; }

/* ============================
   Ürün Detay
   ============================ */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px 0;
}
.product-detail-img { border-radius: 16px; overflow: hidden; }
.product-detail-img img { width: 100%; border-radius: 16px; }
.product-detail-info h1 { font-size: 2rem; margin-bottom: 16px; }
.product-detail-price {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}
.price-big { font-size: 2.5rem; font-weight: 800; color: var(--primary); }

/* ============================
   Sepet
   ============================ */
.cart-layout { display: grid; grid-template-columns: 1fr 350px; gap: 30px; padding: 40px 0; }
.cart-items { display: flex; flex-direction: column; gap: 16px; }
.cart-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.cart-item img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.cart-item-info { flex: 1; }
.cart-item-info h3 { font-size: 1rem; margin-bottom: 6px; }
.cart-item-price { color: var(--primary); font-weight: 700; }
.cart-item-remove { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 1.2rem; }

.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 100px;
}
.cart-summary h3 { margin-bottom: 20px; }
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--text-secondary);
}
.summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* ============================
   Forms
   ============================ */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; }
.form-control {
    width: 100%;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: var(--primary); }
.form-control::placeholder { color: var(--text-secondary); }
textarea.form-control { resize: vertical; min-height: 100px; }

.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.auth-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
}
.auth-box h2 { text-align: center; margin-bottom: 30px; font-size: 1.8rem; }

/* ============================
   Ödeme
   ============================ */
.payment-methods-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.payment-method-card {
    background: var(--bg-card2);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.payment-method-card.selected { border-color: var(--primary); background: rgba(108,99,255,0.1); }
.payment-method-card:hover { border-color: var(--primary); }
.payment-method-card h4 { font-size: 1rem; margin-top: 8px; }
.payment-method-card i { font-size: 2rem; color: var(--primary); }

/* ============================
   Dashboard / Hesap
   ============================ */
.account-layout { display: grid; grid-template-columns: 250px 1fr; gap: 30px; padding: 40px 0; }
.account-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    height: fit-content;
}
.account-sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 4px;
    transition: all 0.2s;
}
.account-sidebar a:hover, .account-sidebar a.active { background: var(--border); color: var(--text-primary); }
.account-sidebar a.active { color: var(--primary); }
.account-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
}

/* ============================
   Tablo
   ============================ */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { color: var(--text-secondary); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* Status badges */
.badge-success { background: rgba(0,200,81,0.15); color: var(--success); padding: 3px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.badge-warning { background: rgba(255,187,51,0.15); color: var(--warning); padding: 3px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.badge-danger { background: rgba(255,68,68,0.15); color: var(--danger); padding: 3px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.badge-info { background: rgba(108,99,255,0.15); color: var(--primary); padding: 3px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }

/* ============================
   Footer
   ============================ */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 60px 0 0;
    margin-top: 80px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { color: var(--text-secondary); margin-top: 12px; font-size: 0.9rem; line-height: 1.7; }
.social-links { display: flex; gap: 12px; margin-top: 16px; }
.social-links a {
    width: 40px; height: 40px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.social-links a:hover { border-color: var(--primary); color: var(--primary); }
.footer-links h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--text-secondary); font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }
.payment-methods-footer { margin-top: 20px; }
.payment-methods-footer h5 { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 8px; }
.payment-icons { display: flex; gap: 8px; flex-wrap: wrap; }
.payment-icons span {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 992px) {
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .features-row { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .cart-layout { grid-template-columns: 1fr; }
    .product-detail { grid-template-columns: 1fr; }
    .account-layout { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: 1fr; }
    .features-row { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .main-nav { display: none; }
    .payment-methods-grid { grid-template-columns: 1fr; }
}

/* ============================
   Utility
   ============================ */
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.d-flex { display: flex; } .align-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-secondary); }
.empty-state i { font-size: 4rem; margin-bottom: 20px; opacity: 0.3; }
.empty-state h3 { font-size: 1.3rem; margin-bottom: 10px; }
.page-header { padding: 40px 0 20px; }
.page-header h1 { font-size: 2rem; }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 8px; }
.breadcrumb a:hover { color: var(--primary); }
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
