/* ==============================================
   Tanzeem Book Stall - Main Stylesheet
   Modern, Clean, Mobile-Friendly Design
   ============================================== */

/* Google Fonts loaded in HTML */

:root {
    /* Colors */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;

    /* Neutrals */
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Radius */
    --radius: 8px;
    --radius-lg: 12px;

    /* Transitions */
    --transition: all 0.2s ease;
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Urdu Font for Book Names */
.book-name,
.book-name-input,
.book-card-name,
.book-name-display {
    font-family: 'Noto Nastaliq Urdu', 'Inter', sans-serif;
    font-size: 1.1em;
    line-height: 2.2;
}

/* Book name display - Urdu and English on separate lines */
.book-name,
.book-card-name,
.book-name-display,
.public-book-name {
    line-height: 1.6;
}

.book-name-urdu {
    font-family: 'Noto Nastaliq Urdu', serif !important;
    display: block !important;
    direction: rtl !important;
    text-align: right !important;
    font-size: 1.2em;
    line-height: 2;
    color: #1e293b;
    width: 100%;
}

.book-name-english {
    font-family: 'Inter', sans-serif !important;
    display: block !important;
    direction: ltr !important;
    text-align: left !important;
    font-size: 0.95em;
    color: #475569;
    margin-top: 0.25rem;
    width: 100%;
}

/* ============================================== 
   Navigation
   ============================================== */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
}

.nav-brand .logo {
    font-size: 1.75rem;
}

.nav-brand .brand-name {
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    transition: var(--transition);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.nav-links .logout-btn {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

.nav-links .logout-btn:hover {
    background: rgba(239, 68, 68, 0.4);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 1rem;
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 1rem;
    }
}

/* ============================================== 
   Container & Layout
   ============================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.75rem;
    color: var(--text);
}

.date-display {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ============================================== 
   Buttons
   ============================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border-light);
}

.btn-full {
    width: 100%;
}

.btn-small {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.btn-edit {
    background: linear-gradient(135deg, #ffcb46 0%, #ffedcf 100%);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.btn-edit:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.4);
}

.btn-delete {
    background: linear-gradient(135deg, #ff4f4f 0%, #ffa9a9 100%);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.btn-delete:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
}

/* ============================================== 
   Forms
   ============================================== */
.form-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.book-name-input {
    font-family: 'Noto Nastaliq Urdu', 'Inter', sans-serif !important;
    font-size: 1.1rem !important;
    line-height: 2 !important;
    padding: 1rem !important;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ============================================== 
   Alerts
   ============================================== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

/* ============================================== 
   Login Page
   ============================================== */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .logo {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.login-header p {
    color: var(--text-light);
}

.login-form {
    margin-top: 1.5rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.setup-info {
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #1e40af;
}

/* ============================================== 
   KPI Cards
   ============================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.kpi-card.today {
    background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 100%);
    border-color: transparent;
}

.kpi-card.total {
    background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
    border-color: transparent;
}

.kpi-icon {
    font-size: 2rem;
}

.kpi-content {
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.kpi-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ============================================== 
   Quick Actions
   ============================================== */
.quick-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.15rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    transition: var(--transition);
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 1.5rem;
}

/* ============================================== 
   Tables
   ============================================== */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
    background: var(--border-light);
}

.data-table .sale-price {
    color: var(--secondary);
    font-weight: 600;
}

.data-table .actions {
    display: flex;
    gap: 0.5rem;
}

/* Stock Badges */
.stock-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.stock-ok {
    background: #dcfce7;
    color: #16a34a;
}

.stock-low {
    background: #fef3c7;
    color: #d97706;
}

.stock-zero {
    background: #fee2e2;
    color: #dc2626;
}

.out-of-stock {
    opacity: 0.6;
}

/* ============================================== 
   Search
   ============================================== */
.search-container {
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    font-family: 'Noto Nastaliq Urdu', 'Inter', sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-count {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.search-results {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    box-shadow: var(--shadow-lg);
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    background: var(--bg);
}

.search-result-item:last-child {
    border-bottom: none;
}

/* ============================================== 
   Dashboard Sections
   ============================================== */
.dashboard-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.dashboard-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.dashboard-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.empty-message {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

.empty-message a {
    color: var(--primary);
}

/* ============================================== 
   Sales Page
   ============================================== */
.sale-form-card {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.book-search-section {
    margin-bottom: 1.5rem;
}

.book-search-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.selected-book-info {
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.selected-book-info h3 {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.book-details {
    display: grid;
    gap: 0.25rem;
}

.book-name-display {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.sale-total {
    background: var(--bg);
    padding: 1rem;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.sale-total strong {
    font-size: 1.5rem;
    color: var(--secondary);
}

.quick-select-section {
    margin-top: 2rem;
}

.quick-select-section h2 {
    margin-bottom: 1rem;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.book-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.book-card:hover:not(.out-of-stock) {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.book-card.selected {
    border-color: var(--secondary);
    background: #f0fdf4;
}

.book-card.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
}

.book-card-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.book-card-price {
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.book-card-stock {
    font-size: 0.85rem;
}

/* ============================================== 
   History Page
   ============================================== */
.filters-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-light);
}

.filter-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
}

.summary-cards {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.summary-card {
    flex: 1;
    min-width: 200px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.summary-card.highlight {
    background: linear-gradient(135deg, var(--secondary) 0%, #047857 100%);
    color: white;
}

.summary-card.highlight .summary-label {
    color: rgba(255, 255, 255, 0.85);
}

.summary-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.history-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.history-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* ============================================== 
   Responsive Design
   ============================================== */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kpi-card {
        padding: 1rem;
    }

    .kpi-value {
        font-size: 1.25rem;
    }

    .dashboard-sections {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .quick-actions {
        flex-direction: column;
    }

    .action-btn {
        justify-content: flex-start;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .filters-form {
        flex-direction: column;
    }

    .filter-actions {
        width: 100%;
    }

    .filter-actions .btn {
        flex: 1;
    }
}

/* ==============================================
   Bulk Operations Styles
   ============================================== */

/* Bulk Toolbar */
.bulk-toolbar {
    position: sticky;
    top: 60px;
    z-index: 100;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bulk-toolbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.bulk-count {
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.bulk-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.bulk-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.bulk-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.bulk-actions .btn-delete {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

.bulk-actions .btn-delete:hover {
    background: rgba(239, 68, 68, 0.5);
}

/* Checkbox Column */
.checkbox-col {
    width: 40px;
    text-align: center !important;
}

.checkbox-col input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.book-checkbox:checked+td {
    background: #eff6ff;
}

tr:has(.book-checkbox:checked) {
    background: #eff6ff !important;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: var(--text);
}

.modal-subtitle {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Duplicate Comparison */
.duplicate-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.existing-book,
.new-book {
    background: var(--bg);
    padding: 1rem;
    border-radius: var(--radius);
}

.existing-book {
    border-left: 3px solid #f59e0b;
}

.new-book {
    border-left: 3px solid #10b981;
}

.existing-book h4,
.new-book h4 {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 600px) {
    .duplicate-comparison {
        grid-template-columns: 1fr;
    }

    .bulk-toolbar-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }
}

/* ==============================================
   Sale Cart
   ============================================== */
.sale-cart {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.sale-cart h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.cart-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-family: 'Noto Nastaliq Urdu', 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    line-height: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.8rem;
    color: var(--text-light);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.cart-qty-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    line-height: 1;
}

.cart-qty-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #eff6ff;
}

.cart-qty-input {
    width: 50px;
    text-align: center;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 0.3rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
}

.cart-qty-input:focus {
    outline: none;
    border-color: var(--primary);
}

.cart-item-total {
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.95rem;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

.cart-remove-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.cart-remove-btn:hover {
    background: #dc2626;
    color: white;
}

.cart-grand-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: var(--radius);
    border: 1px solid #86efac;
    font-size: 1.05rem;
}

.cart-grand-total strong {
    font-size: 1.35rem;
    color: #059669;
}

/* Cart Toast */
.cart-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 0.6rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.cart-toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Mobile cart */
@media (max-width: 600px) {
    .cart-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .cart-item-info {
        width: 100%;
        flex: none;
    }

    .cart-item-controls {
        flex: 1;
    }

    .cart-item-total {
        min-width: auto;
    }
}