:root {
    --primary-color: #2c3e50; ;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --light-bg: #f8f9fa;
    --dark-bg: #2c3e50;
    --text-light: #ffffff;
    --text-dark: #333333;
    --border-color: #e0e0e0;
    /* لون خط نصوص الهيدر*/
    --light-color: #ecf0f1;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    --shadow-light: 0 5px 15px rgba(0,0,0,0.08);
    --shadow-medium: 0 10px 25px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
}
        .lang-switch {
    font-size: 13px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    display: flex;
    gap: 6px;
    align-items: center;
}

.lang-switch span {
    opacity: 0.7;
    transition: 0.2s ease;
}

.lang-switch span:hover {
    opacity: 1;
}
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            padding-top: 120px;
        }
        
        .navbar {
            background-color: var(--primary-color);
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        .navbar-brand {
            margin-left: 10px;
            font-weight: bold;
            font-size: 1.5rem;
        }
        
        .nav-link {
            color: var(--light-color) !important;
            transition: color 0.3s;
        }
        
        .nav-link:hover {
            color: var(--secondary-color) !important;
        }
        
        .dropdown-menu {
            border: none;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            border-radius: 8px;
        }
        
        .dropdown-item {
            padding: 8px 15px;
            transition: all 0.3s;
        }
        
        .dropdown-item:hover {
            background-color: var(--secondary-color);
            color: white;
        }
        
        .search-form {
            position: relative;
        }
        
        .search-btn {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: var(--primary-color);
        }
        
        .cart-badge {
            position: absolute;
            top: -29px;
            right: -8px;
            background-color: var(--accent-color);
            color: white;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            font-size: 0.7rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .brands-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 10px;
            max-height: 300px;
            overflow-y: auto;
        }
        
        .brand-item {
            text-align: center;
            padding: 10px;
            border-radius: 5px;
            transition: all 0.3s;
        }
        
        .brand-item:hover {
            background-color: var(--light-color);
        }
        
        .category-icon {
            width: 24px;
            height: 24px;
            margin-left: 5px;
            object-fit: contain;
        }
        
        .mega-dropdown {
            position: static !important;
        }
        
        .mega-menu {
            width: 100%;
            left: 0;
            right: 0;
            padding: 20px;
            max-height: 70vh;
            overflow-y: auto;
        }
        
        .department-title {
            font-weight: bold;
            border-bottom: 2px solid var(--secondary-color);
            padding-bottom: 5px;
            margin-bottom: 10px;
            color: var(--primary-color);
        }
        
        .subcategory-item {
            padding-right: 20px;
            font-size: 0.9rem;
            color: #666;
        }
        
        .subcategory-item:hover {
            color: var(--secondary-color);
        }
        
        @media (max-width: 991.98px) {
            .mega-menu {
                position: static !important;
                width: 100%;
            }
            
            body {
                padding-top: 80px;
            }
        }
        
        .offcanvas-body {
            padding: 0;
        }
        
        .mobile-nav-item {
            padding: 12px 20px;
            border-bottom: 1px solid #eee;
            display: block;
            color: #333;
            text-decoration: none;
            transition: all 0.3s;
        }
        
        .mobile-nav-item:hover {
            background-color: #f8f9fa;
            color: var(--secondary-color);
        }
        
        .mobile-submenu {
            background-color: #f8f9fa;
        }
        
        .mobile-category-item {
            padding-right: 40px;
        }
        
        .mobile-subcategory-item {
            padding-right: 60px;
            font-size: 0.9rem;
            color: #666;
        }
        
        .nav-arrow {
            transition: transform 0.3s;
        }
        
        .nav-arrow.rotated {
            transform: rotate(180deg);
        }
       /* ========== SEARCH BOX STYLES ========== */
.search-container {
    max-width: 400px;
    position: relative;
}

.search-btn {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.1rem;
    cursor: pointer;
}

.search-results {
    position: absolute;
    top: 105%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
    max-height: 350px;
    overflow-y: auto;
}

.search-results .item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f1f1;
}

.search-results .item:hover {
    background: #f8f9fa;
}

.search-results .title {
    font-weight: bold;
    font-size: 0.95rem;
    color: #555;
}

.search-results .type {
    font-size: 0.8rem;
    color: #888;
}

.search-results .no-results {
    padding: 15px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}



.notification {
            position: fixed;
            top: 100px;
            right: 20px;
            background: white;
            padding: 15px 20px;
            border-radius: 10px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.15);
            z-index: 9999;
            transform: translateX(100%);
            opacity: 0;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            max-width: 350px;
            border-right: 4px solid;
        }
        .notification.show {
            transform: translateX(0);
            opacity: 1;
        }
        .notification-success {
            border-right-color: #2ecc71;
            background: #d4edda;
            color: #155724;
        }
        .notification-info {
            border-right-color: #3498db;
            background: #d1ecf1;
            color: #0c5460;
        }








/* liked products the rest of the code is in the header the js part and the html part in the footer */

.btn-like-header {
    position: relative;
    background: transparent;
    border: none;
    color: #ff6b8b;
    font-size: 1.2rem;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.btn-like-header:hover {
    color: #ff4757;
    transform: scale(1.1);
}

.like-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff4757;
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(30%, -30%);
    display: none; /* Hidden by default */
}

.like-badge.show {
    display: flex;
    animation: badgePop 0.3s ease;
}

@keyframes badgePop {
    0% { transform: translate(30%, -30%) scale(0); }
    70% { transform: translate(30%, -30%) scale(1.2); }
    100% { transform: translate(30%, -30%) scale(1); }
}

/* Liked Products Offcanvas Styles */
#likedProductsContainer {
    min-height: calc(100vh - 180px);
}

.liked-product-item {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 15px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    gap: 15px;
    align-items: center;
}

.liked-product-item:hover {
    border-color: #ff6b8b;
    box-shadow: 0 3px 10px rgba(255, 107, 139, 0.1);
    transform: translateX(-5px);
}

.liked-product-item.deleted {
    opacity: 0.6;
    background: #f8f9fa;
    border-color: #dee2e6;
}

.liked-product-item.deleted .product-info h6 {
    text-decoration: line-through;
    color: #6c757d;
}

.liked-product-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.liked-product-info {
    flex: 1;
    min-width: 0; /* Important for text truncation */
}

.liked-product-info h6 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.liked-product-info .price {
    color: #e74c3c;
    font-weight: 700;
    font-size: 0.9rem;
}

.liked-product-info .brand {
    font-size: 0.8rem;
    color: #6c757d;
}

.liked-product-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.liked-product-actions .btn {
    padding: 4px 12px;
    font-size: 0.8rem;
}

.delete-liked-item {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgba(255, 71, 87, 0.1);
    border: none;
    color: #ff4757;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.liked-product-item:hover .delete-liked-item {
    opacity: 1;
}

.delete-liked-item:hover {
    background: #ff4757;
    color: white;
    transform: scale(1.1);
}

.deleted-product-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 10px;
}

.deleted-product-notice button {
    background: none;
    border: none;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: 0.8rem;
}

/* Loading animation for products */
#likedProductsContainer.loading {
    position: relative;
    min-height: 200px;
}

#likedProductsContainer.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ff6b8b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Offcanvas custom width */
@media (min-width: 576px) {
    #likedProductsOffcanvas {
        max-width: 400px;
    }
}

/* Empty state */
#noLikedProducts {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
}

#noLikedProducts i {
    opacity: 0.3;
    margin-bottom: 20px;
}

/* Notification for product deletion */
.product-deleted-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ff6b8b;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.product-deleted-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.product-deleted-notification .btn-sm {
    margin-right: 10px;
    background: rgba(255,255,255,0.2);
    border: none;
}

.product-deleted-notification .btn-sm:hover {
    background: rgba(255,255,255,0.3);
}



