:root {
    --primary: #4361ee;
    --secondary: #3a0ca3;
    --accent: #4cc9f0;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4bb543;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

body {
    background-color: #f5f7fb;
    color: var(--dark);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px;
}

.container {
    padding: 20px;
}

/* الهيدر والهيرو */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 30px 20px;
    border-radius: 0 0 30px 30px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.profile-container {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
}

.profile-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: var(--shadow);
}

.verified-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: var(--accent);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 2px solid white;
}

.hero h1 {
    font-size: 24px;
    margin-bottom: 5px;
    font-weight: 700;
}

.hero p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.welcome-label {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

/* التبويبات */
.tabs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    background-color: white;
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow);
}

.tab {
    flex: 1;
    text-align: center;
    padding: 12px 5px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--gray);
}

.tab.active {
    background-color: var(--primary);
    color: white;
}

/* المنتجات */
.products-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.view-all {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.product-card {
    background-color: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.product-info {
    padding: 12px;
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
    height: 40px;
    overflow: hidden;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.buy-btn {
    display: block;
    width: 100%;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.buy-btn:hover {
    background-color: var(--secondary);
}

/* الفوتر */
footer {
    background-color: var(--dark);
    color: white;
    text-align: center;
    padding: 20px;
    position: absolute;
    bottom: 0;
    width: 100%;
}

.footer-content {
    max-width: 500px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.footer-link {
    color: var(--accent);
    text-decoration: none;
}

.footer-text {
    font-size: 14px;
    opacity: 0.8;
}

/* إخفاء المحتوى */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* نافذة وصف المنتج */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.product-modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    position: relative;
}

.modal-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
}

.modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--dark);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: white;
    transform: scale(1.1);
}

.modal-body {
    padding: 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.modal-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.modal-description {
    margin-bottom: 20px;
    line-height: 1.7;
    color: var(--dark);
}

.features-list {
    margin-bottom: 20px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.feature-icon {
    color: var(--success);
    margin-left: 10px;
    margin-top: 3px;
    flex-shrink: 0;
}

.feature-text {
    flex: 1;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-buy-btn {
    flex: 2;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-buy-btn:hover {
    background-color: var(--secondary);
}

.modal-wishlist-btn {
    flex: 1;
    background-color: var(--light-gray);
    color: var(--dark);
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-wishlist-btn:hover {
    background-color: #d8d8d8;
}

/* التجاوب */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 {
        font-size: 22px;
    }
    
    .profile-img {
        width: 90px;
        height: 90px;
    }
    
    .modal-content {
        max-width: 100%;
    }
}

@media (max-width: 360px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}