:root {
    --primary-color: #4CAF50;
    --secondary-color: #8BC34A;
    --dark-color: #2E7D32;
    --light-color: #F7FFF7;
    --accent-color: #FFC107;
    --gray-color: #6C757D;
    --light-gray: #F8F9FA;
    --border-radius: 12px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

body {
    background-color: var(--light-gray);
    color: var(--dark-color);
    line-height: 1.6;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* شريط التنقل العلوي */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-icon {
    margin-left: 10px;
    font-size: 1.5rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.search-box input {
    border: none;
    padding: 10px 15px;
    width: 250px;
    font-size: 1rem;
    outline: none;
}

.search-box button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--dark-color);
}

.cart-icon {
    position: relative;
    background: var(--primary-color);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.cart-icon:hover {
    transform: translateY(-3px);
}

.cart-count {
    position: absolute;
    top: -5px;
    left: -5px;
    background: var(--accent-color);
    color: var(--dark-color);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
    font-weight: bold;
}

/* شريط التصنيفات */
.categories-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.category-filter {
    background: white;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    white-space: nowrap;
}

.category-filter:hover {
    background: var(--primary-color);
    color: white;
}

.category-filter.active {
    background: var(--primary-color);
    color: white;
}

.category-filter i {
    font-size: 1rem;
}

/* بطاقات المنتجات */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: var(--dark-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 1;
}

.product-image {
    height: 400px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.product-description {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.add-to-cart {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.add-to-cart:hover {
    background: var(--dark-color);
}

.add-to-cart i {
    font-size: 0.8rem;
}

/* سلة التسوق العائمة */
.floating-cart {
    position: fixed;
    top: 0;
    left: -400px;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: var(--box-shadow);
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.floating-cart.active {
    left: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
}

.close-cart {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--gray-color);
    transition: var(--transition);
}

.close-cart:hover {
    color: var(--primary-color);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 10px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: #f0f0f0;
}

.remove-item {
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.remove-item:hover {
    color: var(--primary-color);
}

.cart-footer {
    padding: 70px;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    font-size: 1.1rem;
    font-weight: bold;
}

.total-price {
    color: var(--primary-color);
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.checkout-btn:hover {
    background: var(--dark-color);
}

/* تأثيرات الطبقات الخلفية عند فتح السلة */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* تصميم متجاوب */
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .top-nav {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .floating-cart {
        width: 320px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .category-filter {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--box-shadow);
    transform: translateX(150%);
    transition: transform 0.3s ease;
    z-index: 1100;
}

.notification.show {
    transform: translateX(0);
}

.notification i {
    font-size: 1.2rem;
}

.empty-cart {
    text-align: center;
    color: var(--gray-color);
    margin-top: 50px;
}

.no-scroll {
    overflow: hidden;
}


/* تصميم الشريط السفلي المتميز */
.elegant-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 82px;
    z-index: 1000;
    font-family: 'Tajawal', sans-serif;
}

.nav-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(76, 175, 80, 0.15);
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.08);
}

.nav-items {
    position: relative;
    display: flex;
    justify-content: space-around;
    height: 100%;
    padding: 0 10px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-decoration: none;
    color: #555;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 2;
}

.floating-cart {
    z-index: 1100; /* أعلى من شريط التنقل السفلي */
}

.elegant-bottom-nav {
    z-index: 1000; /* أقل من سلة التسوق */
}
.nav-icon-container {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-icon {
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.nav-label {
    font-size: 0.75rem;
    margin-top: 4px;
    font-weight: 500;
    opacity: 0.8;
    transition: all 0.3s ease;
}

/* تأثيرات العنصر النشط */
.nav-item[data-active] .nav-icon-container,
.nav-item:hover .nav-icon-container {
    transform: translateY(-10px);
}

.nav-item[data-active] .nav-icon-container::before,
.nav-item:hover .nav-icon-container::before {
    content: '';
    position: absolute;
    bottom: -8px;
    width: 5px;
    height: 5px;
    background: var(--primary-color);
    border-radius: 50%;
}

.nav-item[data-active] .nav-icon,
.nav-item:hover .nav-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

.nav-item[data-active] .nav-label,
.nav-item:hover .nav-label {
    color: var(--primary-color);
    opacity: 1;
    font-weight: 600;
}

/* زر السلة */
.cart-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: #FF5722;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(255, 87, 34, 0.3);
}

/* القائمة المنسدلة */
.expanded-menu {
    position: fixed;
    bottom: 82px;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.12);
    padding: 15px 0;
    transform: translateY(120%);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
}

.expanded-menu.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.expanded-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    text-decoration: none;
    color: #444;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.expanded-item i {
    width: 30px;
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.expanded-item span {
    flex: 1;
    font-weight: 500;
}

.expanded-item::after {
    content: '';
    position: absolute;
    right: -100%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
    transition: all 0.4s ease;
}

.expanded-item:hover {
    background: rgba(76, 175, 80, 0.05);
    padding-right: 30px;
}

.expanded-item:hover::after {
    right: 0;
}

.expanded-item:hover i {
    transform: scale(1.2);
    color: var(--dark-color);
}

/* تأثيرات الحركة */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.nav-cart-btn .nav-icon-container {
    animation: float 3s ease-in-out infinite;
}

/* تعديلات للشاشات الكبيرة */
@media (min-width: 992px) {
    .elegant-bottom-nav {
        display: none;
    }
}

/* تعديل الهيكل الرئيسي */
.main-content-wrapper {
    padding-bottom: 180px !important; /* نزيد المساحة لأسفل */
}

@media (min-width: 992px) {
    .main-content-wrapper {
        padding-bottom: 0 !important;
    }
}


/* تنسيق زر المتجر */
/* زر المتجر الدائري */
 .store-btn {
            position: fixed;
            left: 15px;
            top: 35%;
            transform: translateY(-50%);
            width: 80px;
            height: 80px;
            background-color: #4CAF50;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
            z-index: 999;
            transition: all 0.3s ease;
            animation: pulse 2s infinite;
            text-decoration: none;
        }

        .store-btn:hover {
            background-color: #3e8e41;
            transform: translateY(-50%) scale(1.1);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
        }

        @keyframes pulse {
            0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
            70% { box-shadow: 0 0 0 15px rgba(76, 175, 80, 0); }
            100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
        }

        @media (max-width: 768px) {
            .store-btn {
                width: 50px;
                height: 50px;
                font-size: 1.2rem;
                left: 10px;
            }
        }
        