/* ═══════════════════════════════════════════════════════════════════════════
   📌 LEPISTESEVI - LAYOUT.CSS
   ═══════════════════════════════════════════════════════════════════════════
   
   Bu dosya sayfa düzeni stillerini içerir:
   - Topbar ve Navigasyon
   - Sidebar
   - Layout temel yapısı
   - Sepet Paneli
   - Footer
   - Alt menü
   
   🔄 Modüler yapıya geçiş: Ocak 2026
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   📐 LAYOUT YAPISI
   ═══════════════════════════════════════════════════════════════════════════ */

.layout {
    display: flex;
    min-height: calc(100vh - 80px);
}

.main-content,
main {
    flex: 1;
    padding: 20px;
    padding-bottom: 150px !important;
    /* Alt boşluk (Tekrar yarıya düşürüldü: 150px) */
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
}

/* 🛒 Sipariş Ver Butonu Özel Tasarım */
.checkout-fancy-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px;
    padding: 10px 16px !important;
    /* Increased padding for consistent height */
    line-height: 1.2 !important;
    text-align: center !important;
    min-width: auto !important;
    width: 100% !important;
    /* Full width within flex container */
    min-height: 48px;
    /* Ensure consistent minimum height */
    box-sizing: border-box;
}

.checkout-fancy-btn .icon-zone {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    flex-shrink: 0;
    /* Prevent icon from shrinking */
}

.checkout-fancy-btn .text-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.1;
}


/* ═══════════════════════════════════════════════════════════════════════════
   📚 SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */

.sidebar {
    width: 250px;
    background: var(--card);
    padding: 20px;
    border-right: 1px solid var(--border-medium);
}

.sidebar h2 {
    font-size: 1.1rem;
    color: var(--accent);
    margin-top: 0;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

.sidebar li {
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 6px;
    transition: background .2s;
}

.sidebar li:hover {
    background: var(--hover-bg);
}

.sidebar li.active {
    background: var(--accent);
    color: var(--text-primary);
}

.menu-toggle {
    display: none;
    font-size: 1.6rem;
    color: var(--text);
    background: none;
    border: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   🔝 TOPBAR & NAVİGASYON
   ═══════════════════════════════════════════════════════════════════════════ */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 24px;
    /* Glassmorphism Background (About Popup ile aynı) */
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

/* ☀️ Light Theme Brand Color */
[data-theme="light"] .topbar .brand {
    color: #4db8ff !important;
}

.topbar .brand img {
    width: 78px;
    /* 62px + %25 */
    height: 62px;
    object-fit: fill;
    /* Yayarak genişlet */
    border-radius: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: var(--hover-bg);
    color: var(--accent);
}

.navbar {
    display: flex;
    gap: 10px;
}

.navbar a {
    text-decoration: none;
    color: var(--text);
    padding: 6px 12px;
    border-radius: 6px;
}

.navbar a.active,
.navbar a:hover {
    background: var(--accent);
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   🛒 SEPET PANELİ (Modern Glassmorphism)
   ═══════════════════════════════════════════════════════════════════════════ */

.cart-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 380px;
    max-height: 70vh;
    /* Glassmorphism Background (daha açık ton) */
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-strong);
    overflow-y: auto;
    z-index: 9999;
}

.cart-panel.hidden {
    display: none;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-stronger);
}

.cart-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.cart-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   🛒 MODERN SEPET ÖĞESİ (Cart Item) - Kompakt Layout
   ═══════════════════════════════════════════════════════════════════════════ */

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
    /* Ürün kodu ile aynı koyu arka fon */
    background: var(--surface-card);
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.cart-item:hover {
    background: var(--surface-hover);
    border-color: rgba(77, 184, 255, 0.2);
}

/* Sol Taraf - Ürün Bilgileri */
.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    justify-content: center;
    overflow: hidden;
    text-align: left;
}

/* Ürün Başlığı */
.cart-item-info .cart-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.cart-item-info .cart-item-title:hover {
    color: #4db8ff;
}

/* Ürün Kodu */
.cart-item-code-badge {
    font-size: 0.76rem;
    color: var(--text-faint);
}

.cart-item-code-badge a,
.cart-item-code {
    color: var(--code-color) !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cart-item-code-badge a:hover,
.cart-item-code:hover {
    color: var(--code-hover-color) !important;
    text-decoration: underline;
}

/* Renk Bilgisi - Basit stil, ikon korunur */
.cart-item-color {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #ffa04d;
}

.cart-item-color::before {
    content: '🎨';
    font-size: 0.68rem;
}

/* İndirim Bilgisi - Basit stil, ikon korunur */
.cart-item-discount {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #4db8ff;
}

.cart-item-discount::before {
    content: '💰';
    font-size: 0.62rem;
}

/* Sağ Taraf - Resim, Fiyat, Sil Butonu (Alt Alta) */
.cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 65px;
}

/* Ürün Thumbnail */
.cart-item-right img,
.cart-item-right .cart-item-thumb {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-strong);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-item-right img:hover,
.cart-item-right .cart-item-thumb:hover {
    border-color: rgba(77, 184, 255, 0.4);
    transform: scale(1.05);
}

/* Fiyat */
.cart-item-price {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    text-align: center;
    white-space: nowrap;
}

/* Çöp Kutusu Silme Butonu - Kırmızı/Beyaz */
.cart-item-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--danger-btn);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.cart-item-delete svg {
    width: 13px;
    height: 13px;
    fill: var(--text-primary);
}

.cart-item-delete:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   💰 TOPLAM TUTAR BÖLÜMLERİ (Cart Summary)
   ═══════════════════════════════════════════════════════════════════════════ */

.cart-total {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin-top: 14px;
}

/* Toplam Özet Kartı - Aynı koyu arka fon */
.cart-summary-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
}

/* Tutar Satırları */
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.cart-summary-row:last-child {
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--border-medium);
}

.cart-summary-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cart-summary-label .icon {
    font-size: 0.85rem;
}

.cart-summary-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Brüt Tutar */
.cart-summary-row.brut .cart-summary-value {
    color: var(--text-muted);
}

/* İndirim Satırı */
.cart-summary-row.discount .cart-summary-label {
    color: #4db8ff;
}

.cart-summary-row.discount .cart-summary-value {
    color: #4db8ff;
}

/* Net Tutar - Sarı Renk, Aynı Font Boyutu */
.cart-summary-row.net .cart-summary-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffa04d;
}

.cart-summary-row.net .cart-summary-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffa04d;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
}

/* Sepet Panel Butonları - Pill Style */
.cart-actions .btn {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 6px;
    border-radius: 50px;
    cursor: pointer;
    border: 2px solid;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 48px;
    /* Ensure all buttons have same height */
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* 🗑️ Boşalt - Kırmızı/Beyaz, Hover: Gri/Beyaz */
.cart-actions #clearCart,
.cart-actions .btn.danger {
    background: var(--danger-btn);
    border-color: var(--danger-btn);
    color: var(--text-primary);
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.3);
}

.cart-actions #clearCart:hover,
.cart-actions .btn.danger:hover {
    background: var(--gray-btn);
    border-color: var(--gray-btn);
    color: var(--text-primary);
}

/* 🛒 Sipariş Ver - Mavi/Beyaz, Hover: Beyaz/Mavi */
.cart-actions #checkoutBtn {
    background: #4db8ff;
    border-color: #4db8ff;
    color: #fff;
    box-shadow: 0 3px 8px rgba(77, 184, 255, 0.3);
}

.cart-actions #checkoutBtn:hover {
    background: #fff;
    border-color: #4db8ff;
    color: #4db8ff;
}

/* Kapat - Gri/Beyaz, Hover: Mavi/Beyaz */
.cart-actions #closeCartBtn,
.cart-actions .btn.close {
    background: var(--gray-btn);
    border-color: var(--gray-btn);
    color: var(--text-primary);
    box-shadow: 0 3px 8px rgba(108, 117, 125, 0.3);
}

.cart-actions #closeCartBtn:hover,
.cart-actions .btn.close:hover {
    background: #4db8ff;
    border-color: #4db8ff;
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   📱 ALT MENÜ (BOTTOM FIXED MENU)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   📱 ALT MENÜ (BOTTOM FIXED MENU)
   ═══════════════════════════════════════════════════════════════════════════ */

.bottom-fixed-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    /* Glassmorphism Background (About Popup ile aynı) */
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    /* Butonlar arası boşluk */
    padding: 0 20px;
    z-index: 9998;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--border);
}

.bottom-fixed-menu button {
    flex: 1;
    max-width: 300px;
    height: 40px;
    background: #4db8ff;
    border: 2px solid #4db8ff;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    /* Modern Island/Pill Style */
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(77, 184, 255, 0.3);
}

.bottom-fixed-menu button:hover {
    transform: translateY(-3px) scale(1.02);
    /* Ada hover efekti + Renk değişimi (Geri yüklendi) */
    background: #fff;
    color: #4db8ff;
    border-color: #4db8ff;
    box-shadow: 0 10px 25px rgba(77, 184, 255, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════
   🛒 SAĞ ALT SABİT SEPET BUTONU
   ═══════════════════════════════════════════════════════════════════════════ */

.cart-button {
    position: fixed;
    bottom: 70px;
    /* Alt menünün hemen üstünde */
    right: 20px;
    background: #4db8ff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(77, 184, 255, 0.4);
    cursor: pointer;
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease;
    border: 2px solid #4db8ff;
    /* Add border base */
    box-sizing: border-box;
    /* Prevent size shift */
}

.cart-button:hover {
    transform: translateY(-2px);
    /* Match user menu transform */
    background: #fff;
    /* Hoverda beyaz */
    color: #4db8ff;
    /* Yazı mavi */
    border-color: #4db8ff;
    box-shadow: 0 4px 10px rgba(77, 184, 255, 0.3);
    /* Match user menu shadow */
}

.cart-count {
    background: #fff;
    color: #4db8ff;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 0.85rem;
    min-width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.cart-button:hover .cart-count {
    background: #4db8ff;
    /* Hoverda badge ters renk */
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   🦶 FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.footer {
    text-align: center;
    color: var(--muted);
    padding: 20px;
    font-size: .9rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   👤 KULLANICI MENÜSÜ (USER MENU)
   ═══════════════════════════════════════════════════════════════════════════ */

.user-menu-wrapper {
    position: relative;
    display: inline-block;
}

/* Kullanıcı ve Giriş Butonları - Sepet butonu stili */
.user-btn,
.login-btn {
    background: #4db8ff;
    /* Mavi arka plan */
    color: #fff;
    border: 2px solid #4db8ff;
    padding: 8px 20px;
    border-radius: 30px;
    /* Yuvarlak köşe */
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(77, 184, 255, 0.3);
    min-width: 140px;
    /* Sabit genişlik */
}

.user-btn:hover,
.login-btn:hover {
    background: #fff;
    /* Hoverda beyaz */
    color: #4db8ff;
    /* Yazı mavi */
    border-color: #4db8ff;
    transform: translateY(-2px);
}

.user-menu {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    min-width: 240px;
    /* Modern Gri Glassmorphism */
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    z-index: 1001;
}

.user-menu.show {
    display: flex;
}

.user-menu .menu-item,
.user-menu .user-menu-item {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: right;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.user-menu .menu-item:last-child {
    border-bottom: none;
}

.user-menu .menu-item:hover,
.user-menu .user-menu-item:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.user-menu .menu-item.hidden,
.user-menu .user-menu-item.hidden {
    display: none;
}

/* Eski Login Buton stilini override ettik, gerekirse temizle */
.login-btn.hidden {
    display: none;
}