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

:root {
    /* ألوان الشربجي */
    --primary-color: #1a472a; /* أخضر داكن أنيق */
    --secondary-color: #d4af37; /* ذهبي أنيق */
    --accent-color: #2d5016; /* أخضر أعمق */
    --gold-light: #f4e4bc; /* ذهبي فاتح */
    --gold-dark: #b8941f; /* ذهبي داكن */
    --text-dark: #2c3e2d;
    --text-light: #666;
    --bg-light: #f8f9f6;
    --white: #ffffff;
    --shadow: rgba(26, 71, 42, 0.1);
    --shadow-hover: rgba(26, 71, 42, 0.2);
}

body {
    font-family: 'Segoe UI', 'Cairo', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9f6 0%, #e8ede4 50%, #f8f9f6 100%);
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
    color: var(--text-dark);
}

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    padding: 25px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 20px var(--shadow);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.header-logo-title {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

header h1 {
    color: var(--white);
    font-size: 2.2em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    margin: 0;
}

nav {
    position: relative;
    z-index: 1;
}

nav a {
    text-decoration: none;
    color: var(--white);
    margin: 0 8px;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

nav a:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cart-link {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: bold;
    border: 2px solid var(--primary-color);
}

main {
    max-width: 1200px;
    margin: 0 auto;
}

.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px var(--shadow-hover);
    border-color: var(--secondary-color);
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--gold-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image:empty::before {
    content: 'لا توجد صورة';
    color: var(--text-light);
    font-size: 0.9em;
}

.product-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.product-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--gold-light) 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: bold;
    margin-bottom: 8px;
    align-self: flex-start;
}

/* فلترة المنتجات */
.products-filter {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1em;
}

.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: var(--primary-color);
}

.category-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
}

.category-filter label {
    font-weight: bold;
    color: var(--text-dark);
}

.category-filter select {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1em;
    background: white;
    color: var(--text-dark);
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-width: 150px;
}

.category-filter select:hover {
    border-color: var(--primary-color);
}

.category-filter select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.1);
}

/* أيقونة السلة العائمة */
.floating-cart-icon {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: cartIconPulse 2s infinite;
}

.floating-cart-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.floating-cart-icon-content {
    font-size: 32px;
    position: relative;
    z-index: 2;
}

.floating-cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 3;
}

.floating-cart-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.6;
    animation: cartPulse 2s infinite;
    z-index: 1;
}

@keyframes cartIconPulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 8px 35px rgba(26, 71, 42, 0.5);
    }
}

@keyframes cartPulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0.6;
    }
}

.cart-icon-bounce {
    animation: cartBounce 0.6s ease;
}

@keyframes cartBounce {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.15);
    }
    50% {
        transform: scale(0.95);
    }
    75% {
        transform: scale(1.05);
    }
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .floating-cart-icon {
        width: 60px;
        height: 60px;
        bottom: 20px;
        left: 20px;
    }
    
    .floating-cart-icon-content {
        font-size: 28px;
    }
    
    .floating-cart-badge {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}

.product-price-container {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-price {
    font-size: 1.5em;
    color: var(--primary-color);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-price::before {
    content: '';
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--gold-dark) 100%);
    border-radius: 50%;
    display: inline-block;
}

.product-original-price {
    font-size: 1.1em;
    color: #999;
    text-decoration: line-through;
    font-weight: normal;
}

.product-discount-badge {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
    margin-top: 5px;
    align-self: flex-start;
}

.product-description {
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.product-quantity {
    color: #28a745;
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-sold-out-badge {
    display: inline-block;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 10px;
    align-self: flex-start;
}

.btn-sold-out {
    width: 100%;
    padding: 12px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1em;
    font-weight: bold;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-add-to-cart {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--gold-dark) 100%);
    color: var(--primary-color);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    box-shadow: 0 4px 10px var(--shadow);
    position: relative;
    overflow: hidden;
}

.btn-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-hover);
}

.btn-order {
    width: 100%;
}

.btn-order {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    box-shadow: 0 4px 10px var(--shadow);
    position: relative;
    overflow: hidden;
}

.btn-order::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    transition: left 0.5s;
}

.btn-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-hover);
}

.btn-order:hover::before {
    left: 100%;
}

/* نموذج الطلب */
.order-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 35px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 30px var(--shadow-hover);
    position: relative;
    border: 2px solid var(--secondary-color);
}

.close {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    left: 20px;
    top: 20px;
}

.close:hover {
    color: #000;
}

#selectedProductInfo {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s;
    background: var(--bg-light);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 4px 10px var(--shadow);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-hover);
}

.success-message {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    padding: 18px 30px;
    border-radius: 10px;
    box-shadow: 0 6px 20px var(--shadow-hover);
    z-index: 2000;
    font-weight: 600;
    border: 2px solid var(--secondary-color);
}

/* صفحة الإدارة */
.admin-main {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow);
    border: 2px solid var(--gold-light);
}

/* التبويبات */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-size: 1em;
    cursor: pointer;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #667eea;
    background: #f5f5f5;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
    font-weight: bold;
    background: var(--gold-light);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* الداشبورد */
.dashboard-section {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
    border-radius: 15px;
    border: 2px solid var(--gold-light);
}

.dashboard-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.8em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

.stat-card.stat-new {
    border-left: 4px solid #2196F3;
}

.stat-card.stat-processing {
    border-left: 4px solid #FF9800;
}

.stat-card.stat-shipped {
    border-left: 4px solid #9C27B0;
}

.stat-card.stat-delivered {
    border-left: 4px solid #4CAF50;
}

.stat-card.stat-cancelled {
    border-left: 4px solid #F44336;
}

.stat-card.stat-total {
    border-left: 4px solid var(--secondary-color);
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--white) 100%);
}

.stat-icon {
    font-size: 2.5em;
    opacity: 0.8;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9em;
}

.filters-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gold-light);
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-top: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: bold;
    color: #333;
}

.filter-group input,
.filter-group select {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    background: var(--bg-light);
    transition: all 0.3s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.btn-filter,
.btn-export {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
    height: fit-content;
    box-shadow: 0 4px 10px var(--shadow);
}

.btn-filter:hover,
.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-hover);
}

.btn-export {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--gold-dark) 100%);
    color: var(--primary-color);
}

.orders-section h2 {
    color: #333;
    margin-bottom: 20px;
}

.orders-table-container {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.orders-table th,
.orders-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.orders-table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    font-weight: bold;
}

.orders-table tr:hover {
    background-color: var(--gold-light);
    transition: background 0.3s;
}

/* حالات الطلبات */
.status-select {
    padding: 6px 12px;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--white);
    color: var(--text-dark);
    min-width: 140px;
}

.status-select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.status-select.status-new {
    background: #E3F2FD;
    color: #1976D2;
    border-color: #2196F3;
}

.status-select.status-processing {
    background: #FFF3E0;
    color: #F57C00;
    border-color: #FF9800;
}

.status-select.status-shipped {
    background: #F3E5F5;
    color: #7B1FA2;
    border-color: #9C27B0;
}

.status-select.status-delivered {
    background: #E8F5E9;
    color: #388E3C;
    border-color: #4CAF50;
}

.status-select.status-cancelled {
    background: #FFEBEE;
    color: #C62828;
    border-color: #F44336;
}

.btn-delete {
    background: #dc3545;
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(220, 53, 69, 0.3);
}

.btn-delete:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

.empty-orders {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.2em;
}

/* إدارة المنتجات */
.products-management-section {
    margin-top: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-add {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--gold-dark) 100%);
    color: var(--primary-color);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 10px var(--shadow);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-hover);
}

.products-table-container {
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.products-table th,
.products-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.products-table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    font-weight: bold;
}

.products-table tr:hover {
    background-color: var(--gold-light);
    transition: background 0.3s;
}

.btn-edit {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--gold-dark) 100%);
    color: var(--primary-color);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    margin-left: 5px;
    transition: all 0.3s;
    box-shadow: 0 2px 5px var(--shadow);
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-hover);
}

/* نموذج المنتج */
.product-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.product-modal .modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.btn-cancel {
    background: #999;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
    margin-top: 10px;
    transition: opacity 0.3s;
}

.btn-cancel:hover {
    opacity: 0.9;
}

/* معاينة الصورة */
.image-preview {
    margin-top: 10px;
    display: none;
}

.image-preview.active {
    display: block;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 4px 10px var(--shadow);
}

.image-preview-container {
    position: relative;
    display: inline-block;
}

.image-preview-remove {
    position: absolute;
    top: -10px;
    left: -10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.image-preview-remove:hover {
    background: #c82333;
}

/* إعدادات الموقع */
.settings-section {
    max-width: 600px;
}

.settings-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.btn-save {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 4px 10px var(--shadow);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-hover);
}

/* الفوتر */
.site-footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    margin-top: 40px;
    padding: 25px 20px 15px;
    border-top: 2px solid var(--secondary-color);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    color: var(--secondary-color);
    font-size: 1.1em;
    margin-bottom: 12px;
    font-weight: bold;
}

.footer-section p {
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85em;
    margin: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    transition: all 0.3s;
}

.contact-item:hover {
    transform: translateX(-3px);
}

.contact-icon {
    font-size: 1.2em;
    min-width: 25px;
    text-align: center;
    opacity: 0.9;
}

.contact-label {
    font-weight: 600;
    color: var(--secondary-color);
    min-width: 100px;
    font-size: 0.85em;
}

.contact-value {
    flex: 1;
    color: var(--white);
    font-size: 0.85em;
    word-break: break-word;
    line-height: 1.4;
    opacity: 0.95;
}

.footer-bottom {
    max-width: 1200px;
    margin: 15px auto 0;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8em;
    margin: 0;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
    }

    .products-container {
        grid-template-columns: 1fr;
    }

    .filter-controls {
        flex-direction: column;
    }

    .orders-table {
        font-size: 0.9em;
    }

    .orders-table th,
    .orders-table td {
        padding: 8px;
    }

    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-section {
        width: 100%;
    }

    .contact-item {
        justify-content: center;
        gap: 8px;
    }

    .contact-label {
        min-width: auto;
        font-size: 0.8em;
    }

    .contact-value {
        font-size: 0.8em;
    }

    .contact-icon {
        font-size: 1.1em;
    }

    .footer-section h3 {
        font-size: 1em;
        margin-bottom: 10px;
    }

    .footer-section p {
        font-size: 0.8em;
    }
}

/* سلة التسوق */
.cart-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.cart-modal-content {
    background-color: var(--white);
    margin: 3% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 8px 30px var(--shadow-hover);
    position: relative;
    border: 2px solid var(--secondary-color);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 10px;
    margin-bottom: 15px;
    border: 2px solid var(--gold-light);
    transition: all 0.3s;
}

.cart-item:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 4px 10px var(--shadow);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gold-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-placeholder {
    font-size: 2.5em;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 1.1em;
}

.cart-item-price {
    color: var(--text-light);
    font-size: 0.9em;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    padding: 8px;
    border-radius: 8px;
    border: 2px solid var(--gold-light);
}

.quantity-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.quantity-value {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
}

.cart-item-total {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1em;
    min-width: 100px;
    text-align: center;
}

.cart-item-remove {
    background: #dc3545;
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 1.2em;
}

.cart-summary {
    border-top: 2px solid var(--gold-light);
    padding-top: 20px;
    margin-top: 20px;
}

.cart-total {
    text-align: center;
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding: 15px;
    background: var(--gold-light);
    border-radius: 10px;
}

.btn-checkout {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 4px 10px var(--shadow);
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-hover);
}

@media (max-width: 768px) {
    .cart-item {
        flex-wrap: wrap;
    }
    
    .cart-item-image {
        width: 60px;
        height: 60px;
    }
    
    .cart-item-quantity {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .cart-item-total {
        order: 2;
    }
    
    .cart-item-remove {
        order: 4;
    }
}

/* صفحة تسجيل الدخول */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9f6 0%, #e8ede4 50%, #f8f9f6 100%);
}

.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--shadow-hover);
    width: 100%;
    max-width: 450px;
    border: 2px solid var(--secondary-color);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: bold;
}

.login-header p {
    color: var(--text-light);
    font-size: 1.1em;
}

.login-box form {
    position: relative;
    z-index: 1;
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 4px 10px var(--shadow);
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-hover);
}

.error-message {
    display: none;
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    font-size: 0.9em;
    border: 1px solid #ef5350;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.login-footer p {
    color: var(--text-light);
    font-size: 0.85em;
    padding: 10px;
    background: var(--gold-light);
    border-radius: 8px;
}

.logout-link {
    color: #ff6b6b !important;
    border-color: #ff6b6b !important;
}

.logout-link:hover {
    background: #ff6b6b !important;
    color: var(--white) !important;
}

/* البروفايل */
.profile-section {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px var(--shadow);
    color: var(--white);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--secondary-color);
}

.avatar-icon {
    font-size: 3em;
}

.profile-info h2 {
    color: var(--white);
    margin-bottom: 10px;
    font-size: 1.8em;
}

.profile-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
    margin: 0;
}

.profile-info span {
    color: var(--secondary-color);
    font-weight: bold;
}

.profile-content {
    margin-top: 20px;
}

.profile-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow);
    border: 2px solid var(--gold-light);
}

.profile-card h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.5em;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gold-light);
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .avatar-icon {
        font-size: 2.5em;
    }
}

/* إعدادات الثيم */
.theme-settings-section {
    max-width: 1000px;
    margin: 0 auto;
}

.theme-description {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 1.1em;
}

.theme-group {
    background: var(--white);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px var(--shadow);
    border: 2px solid var(--gold-light);
}

.theme-group h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.4em;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gold-light);
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.color-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.color-item label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95em;
}

.color-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-input-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid var(--gold-light);
    border-radius: 8px;
    cursor: pointer;
}

.color-input-group .color-text-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9em;
}

.color-preview {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    border: 2px solid var(--gold-light);
    box-shadow: 0 2px 5px var(--shadow);
}

input[type="range"] {
    width: 100%;
    margin-top: 5px;
}

.theme-preview {
    margin-top: 20px;
}

.preview-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid var(--gold-light);
    box-shadow: 0 4px 15px var(--shadow);
    text-align: center;
}

.preview-card h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5em;
}

.preview-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.preview-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 10px var(--shadow);
}

.preview-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-hover);
}

.theme-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-reset {
    background: #dc3545;
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-reset:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-preview {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--gold-dark) 100%);
    color: var(--primary-color);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px var(--shadow);
}

@media (max-width: 768px) {
    .color-grid {
        grid-template-columns: 1fr;
    }
    
    .theme-actions {
        flex-direction: column;
    }
    
    .theme-actions button {
        width: 100%;
    }
}
