/**
 * E-Ticaret Frontend - Ana CSS
 * modamizbir.com Tasarımı - Mobile-First
 */

/* ========== CSS VARIABLES ========== */
:root {
    --primary: #e53935;
    --primary-dark: #c62828;
    --secondary: #2c3e50;
    --accent: #ff6b35;
    
    --text-primary: #2c3e50;
    --text-secondary: #666;
    --text-light: #999;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    
    --border-color: #eee;
    
    --header-height: 55px;
    --search-height: 50px;
    --bottom-nav-height: 60px;
    --top-bar-height: 36px; /* her zaman 36px */
    --page-top-margin: 141px; /* top-bar(36) + header(55) + search(50) */
    
    --transition: all 0.3s ease;
}

/* ========== RESET & BASE ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    padding-bottom: 0;
}

/* Footer bottom-nav için yer açsın */
.site-footer {
    margin-bottom: var(--bottom-nav-height);
}

@media (min-width: 768px) {
    .site-footer {
        margin-bottom: 0;
    }
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

ul, ol {
    list-style: none;
}

/* ========== HEADER ========== */
.site-header {
    position: fixed;
    top: var(--top-bar-height); /* top-bar'ın altında */
    left: 0;
    right: 0;
    background: var(--bg-primary);
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
}

.menu-toggle {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text-primary);
}

.site-logo {
    flex: 1;
    text-align: center;
}

.site-logo img {
    height: 28px;
    margin: 0 auto;
}

.site-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.site-logo-text span {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-primary);
    border-radius: 50%;
    position: relative;
}

.header-action-btn .badge,
.header-action-btn .action-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    background: #e53935;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.header-action-btn .favori-badge {
    background: #e91e63;
}

.header-action-btn .sepet-badge {
    background: #e53935;
}

/* Search Bar */
.search-bar {
    padding: 8px 16px 10px;
    background: var(--bg-primary);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.search-input-wrapper i {
    position: absolute;
    left: 12px;
    color: var(--text-light);
    font-size: 18px;
}

.search-input {
    width: 100%;
    padding: 12px 12px 12px 42px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-light);
}

/* ========== BOTTOM NAVIGATION ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -1px 10px rgba(0,0,0,0.08);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
    border-top: 1px solid var(--border-color);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 12px;
    color: var(--text-light);
    transition: var(--transition);
    position: relative;
    min-width: 60px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item i {
    font-size: 22px;
}

.nav-item span {
    font-size: 10px;
    font-weight: 500;
}

.nav-item .badge {
    position: absolute;
    top: 2px;
    right: 10px;
    min-width: 16px;
    height: 16px;
    background: var(--primary);
    color: white;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== SIDE MENU ========== */
.side-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.side-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85%;
    background: var(--bg-primary);
    z-index: 2001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.side-menu.active {
    transform: translateX(0);
}

.side-menu-header {
    padding: 20px 16px;
    background: var(--primary);
    color: white;
}

.side-menu-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.side-menu-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.side-menu-user-info h4 {
    font-size: 15px;
    font-weight: 600;
}

.side-menu-user-info p {
    font-size: 12px;
    opacity: 0.8;
}

.side-menu-content {
    flex: 1;
    padding: 12px 0;
}

.menu-category-title {
    padding: 12px 16px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 1px;
}

.menu-list {
    padding: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #f5f5f5;
}

.menu-item i {
    width: 22px;
    font-size: 18px;
    color: var(--text-secondary);
}

.menu-item .arrow {
    margin-left: auto;
    font-size: 14px;
    color: var(--text-light);
}

/* ========== UTILITIES ========== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.hidden { display: none !important; }

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== RESPONSIVE ========== */
@media (min-width: 768px) {
    :root {
        --header-height: 60px;
        --bottom-nav-height: 0px;
    }
    
    .bottom-nav {
        display: none;
    }
    
    body {
        padding-bottom: 0;
    }
    
    .header-top {
        padding: 16px 24px;
    }
    
    .site-logo-text {
        font-size: 24px;
    }
}

@media (min-width: 1024px) {
    .search-bar {
        max-width: 500px;
        margin: 0 auto;
    }
}
