* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

:root {
    --primary-color: #a89b8e;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --white: #ffffff;
    --black: #000000;
    --gray-light: #f8f8f8;
    --gray-border: #e0e0e0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --success-color: #4CAF50;
    --error-color: #f44336;
}

body {
    background-color: var(--white);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* شريط التنقل العلوي */
.top-bar {
    background: var(--white);
    color: var(--text-dark);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--gray-border);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 500;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.action-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.3rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--gray-light);
}

.notification-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: var(--primary-color);
    color: var(--white);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* شريط البحث */
.search-section {
    padding: 25px 0 15px;
}

.search-bar {
    display: flex;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-border);
    transition: var(--transition);
}

.search-bar:focus-within {
    box-shadow: 0 4px 15px rgba(168, 155, 142, 0.2);
    border-color: var(--primary-color);
}

.search-input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
    color: var(--text-dark);
}

.search-input::placeholder {
    color: var(--text-light);
}

.filter-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.95rem;
}

.filter-btn:hover {
    background: #9a8e82;
}

/* بانر العرض الترويجي */
.promo-banner {
    background: linear-gradient(135deg, var(--primary-color), #b8a99a);
    color: var(--white);
    border-radius: 16px;
    padding: 35px 30px;
    margin: 20px 0 30px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.promo-banner::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.promo-banner::after {
    content: '';
    position: absolute;
    bottom: -60px;
    right: -60px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.promo-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.promo-title {
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.3;
}

.promo-text {
    font-size: 1.05rem;
    opacity: 0.95;
    margin-bottom: 20px;
    max-width: 80%;
    text-align: right;
}

.shop-now-btn {
    background: var(--white);
    color: var(--primary-color);
    border: none;
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    align-self: flex-end;
    font-size: 1rem;
}

.shop-now-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* شريط الفئات */
.category-section {
    margin: 30px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    position: relative;
    padding-right: 18px;
}

.section-title::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -8px;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.view-all-btn {
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    background: rgba(168, 155, 142, 0.1);
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
}

.view-all-btn:hover {
    color: #9a8e82;
    background: rgba(168, 155, 142, 0.15);
}

.category-tabs {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 15px;
    scrollbar-width: thin;
}

.category-tabs::-webkit-scrollbar {
    height: 5px;
}

.category-tabs::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

.category-tab {
    min-width: 130px;
    height: 140px;
    background: var(--white);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    padding: 20px 15px;
    flex-shrink: 0;
    border: 1px solid var(--gray-border);
    position: relative;
    overflow: hidden;
}

.category-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transition: var(--transition);
    opacity: 0;
}

.category-tab:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.category-tab:hover::before {
    opacity: 1;
}

.category-tab.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.category-tab.active::before {
    background: var(--white);
    opacity: 1;
}

.category-icon {
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    transition: var(--transition);
}

.category-tab.active .category-icon {
    background: rgba(255, 255, 255, 0.25);
}

.category-name {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

/* قسم المنتجات */
.products-section {
    margin: 35px 0 100px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--gray-border);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.product-image {
    height: 190px;
    background: linear-gradient(135deg, #f9f9f9, #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-image img {
    max-width: 75%;
    max-height: 75%;
    object-fit: contain;
    transition: var(--transition);
}

.product-image i {
    font-size: 3.2rem;
    color: var(--primary-color);
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.wishlist-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
    color: var(--text-dark);
    font-size: 0.9rem;
    transition: var(--transition);
    z-index: 2;
}

.wishlist-btn.active {
    color: var(--primary-color);
}

.wishlist-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.product-info {
    padding: 18px;
}

.product-name {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-dark);
}

.product-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-price::before {
    content: 'دينار';
    font-size: 0.85rem;
    color: var(--text-light);
}

.add-to-cart {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    font-size: 0.95rem;
}

.add-to-cart:hover {
    background: #9a8e82;
    transform: translateY(-2px);
}

/* شريط التنقل السفلي */
.bottom-nav {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    background: var(--white);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.08);
    padding: 12px 0;
    z-index: 1000;
    border-top: 1px solid var(--gray-border);
}

.nav-items {
    display: flex;
    justify-content: space-around;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    padding: 6px 12px;
    border-radius: 12px;
}

.nav-item.active {
    color: var(--primary-color);
    transform: translateY(-5px);
}

.nav-item.active .nav-icon {
    color: var(--primary-color);
}

.nav-icon {
    font-size: 1.5rem;
    transition: var(--transition);
}

.nav-label {
    font-size: 0.8rem;
    font-weight: 600;
}

/* صفحة المفضلة */
.favorites-section {
    margin: 20px 0 100px;
}

.empty-favorites {
    text-align: center;
    padding: 60px 0;
    color: var(--text-dark);
}

.empty-favorites i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    opacity: 0.7;
}

.empty-favorites p {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--text-light);
}

.back-to-shop {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 28px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.back-to-shop:hover {
    background: #9a8e82;
}

/* صفحة السلة */
.cart-section {
    margin: 20px 0 100px;
}

.cart-items {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border: 1px solid var(--gray-border);
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.cart-item:hover {
    background: #fafafa;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 85px;
    height: 85px;
    background: #f5f5f5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 18px;
}

.cart-item-image img {
    max-width: 75%;
    max-height: 75%;
    object-fit: contain;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
}

.cart-item-quantity {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 6px 0;
}

.cart-item-subtotal {
    color: var(--text-dark);
    font-weight: 700;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 6px;
    transition: var(--transition);
}

.cart-item-remove:hover {
    color: #9a8e82;
    transform: scale(1.1);
}

.cart-summary {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-border);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.cart-total-amount {
    color: var(--primary-color);
}

.checkout-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: 'Tajawal', sans-serif;
    transition: var(--transition);
    font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(168, 155, 142, 0.2);
}

.checkout-btn {
    width: 100%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 12px;
    font-size: 1.05rem;
}

.checkout-btn:hover {
    background: #9a8e82;
}

.checkout-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* إضافة أنماط جديدة للإشعارات */
.notification-toast {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 16px 26px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s ease;
    max-width: 400px;
}

.notification-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-toast.success {
    background: var(--success-color);
}

.notification-toast.error {
    background: var(--error-color);
}

.notification-toast i {
    font-size: 1.5rem;
}

/* تأثيرات عامة */
.hidden {
    display: none !important;
}

/* صفحة تأكيد الطلب */
.order-confirmation {
    text-align: center;
    padding: 40px 20px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin: 20px 0;
    border: 1px solid var(--gray-border);
}

.order-confirmation i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.order-confirmation h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.order-confirmation p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-light);
}

.order-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 15px 0;
    padding: 10px 20px;
    background: rgba(168, 155, 142, 0.1);
    border-radius: 10px;
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .promo-title {
        font-size: 1.6rem;
    }

    .promo-text {
        font-size: 0.95rem;
        max-width: 90%;
    }

    .shop-now-btn {
        padding: 12px 26px;
    }

    .category-tab {
        min-width: 110px;
        height: 120px;
    }

    .category-icon {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }

    .product-image {
        height: 160px;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-item-image {
        margin-left: 0;
        margin-bottom: 18px;
    }

    .notification-toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .logo-main {
        font-size: 1.1rem;
    }
    
    .logo-subtitle {
        font-size: 0.7rem;
    }

    .search-input {
        padding: 14px 16px;
    }

    .filter-btn {
        padding: 0 18px;
        font-size: 0.9rem;
    }

    .promo-banner {
        padding: 25px 20px;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .view-all-btn {
        font-size: 0.9rem;
        padding: 8px 14px;
    }

    .nav-icon {
        font-size: 1.3rem;
    }

    .nav-label {
        font-size: 0.75rem;
    }
}