:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --success: #10b981;
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #334155;
    --text-muted: #64748b;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--bg-main);
}

.site-container {
    max-width: 1280px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    box-sizing: border-box;
}

.cart-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

.desktop-table-view { display: block; }
.mobile-card-view { display: none; }

/* Kurumsal Başlık Kutusu */
.cart-page-header-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius);
    padding: 24px 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-md);
    border-left: 6px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-page-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

/* Stok & Bilgi Rozetleri */
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    margin-top: 6px;
    border: 1px solid var(--border-color);
}

/* Tablo Stilleri (Masaüstü) */
.desktop-table-view table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.desktop-table-view th {
    background: var(--primary);
    color: #fff;
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 3px solid var(--accent);
}

.desktop-table-view td {
    padding: 18px 20px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.desktop-table-view tr:last-child td {
    border-bottom: none;
}

.desktop-table-view tr {
    transition: background-color 0.15s ease;
}

.desktop-table-view tr:hover {
    background-color: #fafbfc;
}

/* Premium Silme Butonu ve SVG İkonu */
.btn-remove-item {
    background-color: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-remove-item svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    transition: var(--transition);
}

.btn-remove-item:hover {
    background-color: var(--danger);
    color: #fff;
    border-color: var(--danger);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    transform: translateY(-1px);
}

/* Aksiyon Butonları */
.btn-primary-custom {
    background: var(--primary); 
    color: #fff; 
    border: none; 
    padding: 14px 24px; 
    border-radius: 8px; 
    font-weight: 700; 
    cursor: pointer; 
    font-size: 14px; 
    width: 100%; 
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.btn-primary-custom:hover { 
    background: var(--primary-light); 
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-success-custom {
    display: block; 
    background: var(--accent); 
    color: #fff; 
    text-align: center; 
    padding: 16px; 
    border-radius: 8px; 
    text-decoration: none; 
    font-weight: 700; 
    font-size: 15px;
    margin-top: 20px; 
    box-shadow: 0 4px 14px rgba(37,99,235,0.3);
    transition: var(--transition);
}
.btn-success-custom:hover { 
    background: var(--accent-hover); 
    box-shadow: 0 6px 20px rgba(37,99,235,0.4);
    transform: translateY(-2px);
}

.alert-warning-custom {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Sağ Masaüstü Sidebar Özeti */
.desktop-summary-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    position: sticky;
    top: 20px;
    box-shadow: var(--shadow-md);
}

.desktop-summary-sidebar h4 {
    margin-top: 0;
    color: var(--primary);
    font-size: 18px;
    font-weight: 700;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 12px;
    margin-bottom: 18px;
}

/* Güvenlik Kuralları */
.protected-image, .protected-link {
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
.protected-link { pointer-events: auto; }

/* Adet Input Tasarımı */
.qty-input {
    width: 75px;
    text-align: center;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    background: #f8fafc;
    transition: var(--transition);
}
.qty-input:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.qty-warning-text {
    font-size: 11px;
    color: var(--danger);
    margin-top: 4px;
    font-weight: 700;
    display: none;
}

/* Mobil Uyum ve Kart Görünümü */
@media (max-width: 992px) {
    .site-container { margin: 15px auto; padding: 0 12px; }
    .cart-grid { grid-template-columns: 1fr; gap: 20px; }
    .desktop-table-view { display: none; }
    .mobile-card-view { display: flex; flex-direction: column; gap: 16px; }
    .desktop-summary-sidebar { display: none !important; }

    .mobile-top-summary-bar {
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
        border: 2px solid var(--accent);
        border-radius: var(--radius);
        padding: 16px;
        margin-bottom: 10px;
        box-shadow: var(--shadow-md);
    }
    .mobile-top-summary-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: #fff;
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 12px;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        padding-bottom: 10px;
    }
    .mobile-top-summary-row span:last-child {
        color: #60a5fa;
        font-size: 20px;
    }
    .mobile-top-summary-bar .btn-success-custom {
        margin: 0;
        padding: 14px;
        font-size: 15px;
    }
}

@media (min-width: 993px) {
    .mobile-top-summary-bar { display: none !important; }
}

.mobile-cart-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.mobile-card-top { display: flex; align-items: center; gap: 14px; }
.mobile-card-img { width: 65px; height: 65px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-color); flex-shrink: 0; }
.mobile-card-title { font-size: 15px; font-weight: 700; color: var(--primary); margin: 0; line-height: 1.35; }
.mobile-card-details { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; padding: 12px 0; }
.mobile-card-footer { display: flex; justify-content: space-between; align-items: center; }

@media (max-width: 768px) {
    input[type="number"] {
        font-size: 16px !important;
    }
}