/* ====================================
   MECHATRONICS STORE - MAIN STYLES
   Complete and Organized CSS File
   ==================================== */

/* ====================================
   1. CSS VARIABLES & ROOT STYLES
   ==================================== */

:root {
    /* Primary Colors */
    --primary-navy: #1a237e;
    --primary-blue: #3f51b5;
    --light-blue: #e3f2fd;
    --accent-blue: #2196f3;
    --dark-navy: #0d47a1;
    --dark-blue: #172554;
    
    /* Status Colors */
    --success-green: #4caf50;
    --warning-orange: #ff9800;
    --error-red: #f44336;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1a237e 0%, #3f51b5 100%);
    --gradient-secondary: linear-gradient(135deg, #2196f3 0%, #1a237e 100%);
    --gradient-light: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    --gradient-hero: linear-gradient(135deg, #1a237e 0%, #3f51b5 50%, #2196f3 100%);
    --gradient-blue: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%);
    
    /* Text Colors */
    --text-dark: #212121;
    --text-light: #757575;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --white: #ffffff;
    
    /* Background Colors */
    --light-gray: #f8fafc;
    --border-color: #e5e7eb;
    
    /* Shadows */
    --shadow-soft: 0 4px 20px rgba(26, 35, 126, 0.1);
    --shadow-strong: 0 8px 30px rgba(26, 35, 126, 0.2);
    --shadow-hero: 0 20px 60px rgba(26, 35, 126, 0.3);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border Radius */
    --border-radius: 12px;
    --border-radius-small: 6px;
    --border-radius-lg: 0.75rem;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====================================
   2. RESET & BASE STYLES
   ==================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

[dir="rtl"] {
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

[dir="ltr"] {
    font-family: 'Inter', sans-serif;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: #f8f9fa;
    overflow-x: hidden;
    padding-top: 80px;
}

/* ====================================
   3. UTILITY CLASSES
   ==================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-en,
.content-ar {
    display: none;
}

[dir="ltr"] .content-en {
    display: contents;
}

[dir="rtl"] .content-ar {
    display: contents;
}

.hidden {
    display: none;
}

/* Loading Skeleton */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ====================================
   4. HEADER STYLES
   ==================================== */

.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-soft);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 12px 0;
    transition: var(--transition);
}

.header.scrolled {
    padding: 8px 0;
    box-shadow: var(--shadow-strong);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: 56px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-navy);
    text-decoration: none;
    transition: var(--transition);
    gap: 10px;
    flex-shrink: 0;
}

.logo:hover {
    color: var(--primary-blue);
    transform: translateY(-1px);
}

.logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
}

.logo-text {
    display: block;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: var(--transition);
    padding: 8px 12px;
    border-radius: var(--border-radius-small);
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--primary-blue);
    background: var(--light-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
    position: relative;
    background: transparent;
    color: var(--primary-navy);
}

.action-btn:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.icon-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--warning-orange);
    color: white;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

[dir="rtl"] .icon-badge {
    right: auto;
    left: -6px;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-btn {
    padding: 8px 14px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    height: 42px;
}

.auth-btn.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-soft);
}

.auth-btn.outline {
    background: transparent;
    color: var(--primary-navy);
    border: 2px solid var(--primary-navy);
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-strong);
}

.auth-btn.outline:hover {
    background: var(--primary-navy);
    color: white;
}

/* Language Toggle */
.lang-toggle {
    padding: 8px 16px;
    border: 2px solid var(--primary-navy);
    border-radius: var(--border-radius);
    background: transparent;
    color: var(--primary-navy);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    height: 42px;
}

.lang-toggle:hover {
    background: var(--primary-navy);
    color: white;
    transform: translateY(-1px);
}

/* User Icon */
.user-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--border-radius);
    background: transparent;
    color: var(--primary-navy);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
    border: none;
    position: relative;
}

.user-icon:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

/* ====================================
   5. DROPDOWN STYLES
   ==================================== */

.dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-strong);
    min-width: 200px;
    z-index: 2000;
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

[dir="rtl"] .dropdown {
    right: auto;
    left: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-fast);
    gap: 10px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: var(--light-blue);
}

/* Cart & Wishlist Dropdown */
.cart-dropdown,
.wishlist-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-strong);
    min-width: 350px;
    max-width: 400px;
    z-index: 2000;
    border: 1px solid rgba(0,0,0,0.05);
    max-height: 500px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.cart-dropdown.show,
.wishlist-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

[dir="rtl"] .cart-dropdown,
[dir="rtl"] .wishlist-dropdown {
    right: auto;
    left: 0;
}

.dropdown-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-navy);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-empty {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-light);
}

.dropdown-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.dropdown-items {
    padding: 0;
}

.dropdown-item-card {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    gap: 1rem;
    transition: var(--transition-fast);
    cursor: pointer;
}

.dropdown-item-card:hover {
    background: #f8f9fa;
}

.dropdown-item-card:last-child {
    border-bottom: none;
}

.item-image {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-small);
    background: var(--light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-small);
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-price {
    color: var(--accent-blue);
    font-weight: 700;
    font-size: 0.85rem;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-input {
    width: 50px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 0.85rem;
}

.remove-btn {
    background: var(--error-red);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

.dropdown-total {
    padding: 1rem 1.5rem;
    border-top: 2px solid #f0f0f0;
    background: #f8f9fa;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-navy);
}

.dropdown-actions {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
}

.btn-view {
    background: var(--gradient-primary);
    color: white;
}

.btn-checkout {
    background: var(--success-green);
    color: white;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

/* ====================================
   6. MOBILE MENU
   ==================================== */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--primary-navy);
    cursor: pointer;
    width: 42px;
    height: 42px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 2500;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    transform: translateX(-100%);
    color: var(--text-dark);
}

.mobile-menu-overlay.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

[dir="rtl"] .mobile-menu-overlay {
    transform: translateX(100%);
}

[dir="rtl"] .mobile-menu-overlay.show {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
}

.mobile-menu-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-navy);
    font-size: 1.2rem;
    font-weight: 700;
}

.mobile-menu-logo img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

.mobile-menu-close {
    background: var(--light-blue);
    border: none;
    color: var(--primary-navy);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition-fast);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close:hover {
    background: var(--primary-blue);
    color: white;
}

.mobile-menu-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px 0;
}

.mobile-nav-section {
    padding: 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 1rem;
    font-weight: 500;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.mobile-nav-link:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
}

.mobile-nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--primary-navy);
}

.mobile-user-action {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    color: var(--text-dark);
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition-fast);
    font-size: 0.95rem;
    font-weight: 500;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.mobile-user-action:hover {
    color: var(--primary-blue);
}

.mobile-user-action.danger {
    color: var(--error-red);
}

.mobile-user-action.danger:hover {
    color: #d32f2f;
}

.mobile-auth-section {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    background: #f8f9fa;
}

.mobile-auth-message {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
}

.mobile-auth-btn.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
}

.mobile-auth-btn.outline {
    background: transparent;
    color: var(--primary-navy);
    border: 2px solid var(--primary-navy);
}

.mobile-auth-btn:hover {
    transform: translateY(-1px);
}

.mobile-auth-btn.outline:hover {
    background: var(--primary-navy);
    color: white;
}

/* ====================================
   7. SEARCH OVERLAY
   ==================================== */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 35, 126, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.search-overlay.show {
    opacity: 1;
    visibility: visible;
}

.search-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-strong);
    max-width: 600px;
    width: 90%;
    padding: 2rem;
    transform: translateY(-30px);
    transition: var(--transition);
}

.search-overlay.show .search-container {
    transform: translateY(0);
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.search-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-navy);
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.search-close:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
}

.search-input-container {
    position: relative;
    margin-bottom: 1rem;
}

.search-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: #fafafa;
}

[dir="rtl"] .search-input {
    padding: 16px 20px 16px 50px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: white;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.search-btn {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius-small);
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--transition);
}

[dir="rtl"] .search-btn {
    right: auto;
    left: 15px;
}

.search-btn:hover {
    background: var(--gradient-secondary);
}

/* Search Suggestions Enhanced */
.search-suggestions-enhanced {
    margin-top: 20px;
    animation: slideDown 0.3s ease-out;
}

.suggestions-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-navy);
}

.suggestions-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-navy);
}

.suggestions-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.suggestions-list::-webkit-scrollbar {
    width: 6px;
}

.suggestions-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.suggestions-list::-webkit-scrollbar-thumb {
    background: var(--primary-navy);
    border-radius: 3px;
}

.suggestions-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-item:hover {
    background: #f9fafb;
    border-color: var(--primary-navy);
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.1);
}

[dir="rtl"] .suggestion-item:hover {
    transform: translateX(4px);
}

.suggestion-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.suggestion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggestion-image .placeholder-icon {
    font-size: 1.5rem;
    color: var(--primary-navy);
    opacity: 0.4;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-name {
    margin: 0 0 6px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion-category {
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.suggestion-category i {
    font-size: 0.75rem;
}

.suggestion-price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.price-sale {
    color: var(--success-green);
    font-size: 1rem;
}

.price-original {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-decoration: line-through;
}

.price-current {
    color: var(--primary-navy);
    font-size: 1rem;
}

.suggestion-arrow {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-navy);
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.suggestion-item:hover .suggestion-arrow {
    transform: translateX(4px);
}

[dir="rtl"] .suggestion-item:hover .suggestion-arrow {
    transform: translateX(-4px);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Results */
.search-results {
    max-height: 400px;
    overflow-y: auto;
}

.search-results-header {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-results-header h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-navy);
}

.results-count {
    color: var(--text-light);
    font-size: 0.8rem;
}

.search-product-list {
    max-height: 320px;
    overflow-y: auto;
}

.search-product-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: var(--transition-fast);
    gap: 12px;
}

.search-product-item:hover {
    background: var(--light-blue);
}

.search-product-item:last-child {
    border-bottom: none;
}

.search-product-item .product-image {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-small);
    background: var(--light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.search-product-item .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-small);
}

.search-product-item .product-info {
    flex: 1;
    min-width: 0;
}

.search-product-item .product-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-product-item .product-category {
    color: var(--text-light);
    font-size: 0.8rem;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-product-item .product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.search-product-item .sale-price {
    color: var(--accent-blue);
    font-weight: 700;
    font-size: 0.85rem;
}

.search-product-item .original-price {
    color: var(--text-light);
    font-size: 0.8rem;
    text-decoration: line-through;
}

.search-product-item .current-price {
    color: var(--accent-blue);
    font-weight: 700;
    font-size: 0.85rem;
}

.view-all-results,
.view-all-suggestions {
    padding: 16px;
    border-top: 1px solid #f0f0f0;
    background: #f8f9fa;
    text-align: center;
}

.btn-view-all {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    width: 100%;
}

.btn-view-all:hover {
    background: var(--gradient-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: var(--text-light);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ====================================
   8. OVERLAY
   ==================================== */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background: transparent;
}

/* ====================================
   9. HERO SECTION
   ==================================== */

.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(../images/Mechatronics_blog.png);
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
    z-index: 0;
    transition: transform 0.6s ease;
}

[dir="rtl"] .hero-background {
    transform: scaleX(-1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(23, 37, 84, 0.95) 0%, rgba(23, 37, 84, 0.7) 50%, transparent 100%);
    z-index: 1;
}

[dir="rtl"] .hero-overlay {
    background: linear-gradient(to left, rgba(23, 37, 84, 0.95) 0%, rgba(23, 37, 84, 0.7) 50%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 50px;
}

.content-wrapper {
    max-width: 600px;
}

[dir="rtl"] .content-wrapper {
    margin-right: 0;
    text-align: right;
}

.subtitle {
    color: var(--light-blue);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: fadeInUp 0.8s ease;
}

h1 {
    color: var(--white);
    font-size: 56px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 25px;
    animation: fadeInUp 1s ease;
}

.description {
    color: #b8d4e8;
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 40px;
    animation: fadeInUp 1.2s ease;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    animation: fadeInUp 1.4s ease;
}

[dir="rtl"] .cta-buttons {
    flex-direction: row;
}

.btn {
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-blue);
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(30, 58, 138, 0.3), 0 10px 10px -5px rgba(30, 58, 138, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--light-blue);
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================
   10. CATEGORIES SECTION (CAROUSEL)
   ==================================== */

.categories-section {
    padding: 80px 0;
    background: white;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Categories Carousel Container */
.categories-carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    padding: 0 10px; /* إضافة padding لمنع القص */
}

.categories-carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s ease;
    padding: 20px 0;
    direction: ltr; /* فرض اتجاه LTR للـ carousel */
}

/* إصلاح اتجاه الكروت في RTL */
[dir="rtl"] .categories-carousel-track {
    direction: ltr; /* الـ track نفسه يبقى LTR */
}

[dir="rtl"] .category-card {
    direction: rtl; /* المحتوى داخل الكارد RTL */
}

/* Category Card */
.category-card {
    flex: 0 0 300px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    contain: layout style paint;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

.category-card:active {
    transform: translateY(-4px);
    transition: transform 0.1s ease;
}

.category-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-image i {
    font-size: 4rem;
    color: var(--primary-navy);
    opacity: 0.3;
    display: none;
}

.category-info {
    padding: 24px;
}

.category-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 12px;
    transition: var(--transition);
}

.category-card:hover .category-name {
    color: var(--primary-blue);
}

.category-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-arrow {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: var(--primary-blue);
    font-size: 1.2rem;
    transition: var(--transition);
}

.category-card:hover .category-arrow {
    transform: translateX(5px);
}

[dir="rtl"] .category-card:hover .category-arrow {
    transform: translateX(-5px);
}

/* Category Card Skeleton */
.category-card-skeleton {
    flex: 0 0 300px;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.skeleton-category-image {
    width: 100%;
    height: 200px;
}

.skeleton-category-content {
    padding: 24px;
}

.skeleton-line {
    height: 16px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

/* Categories Navigation */
.categories-nav {
    margin-top: 40px;
}

/* View All Categories Button */
.view-all-categories-btn-container {
    text-align: center;
    margin-top: 40px;
    animation: fadeInUp 0.8s ease;
}

.btn-view-all-categories {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 40px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

.btn-view-all-categories:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
    background: var(--gradient-secondary);
}

.btn-view-all-categories:active {
    transform: translateY(-1px);
}

/* ====================================
   11. FEATURED PRODUCTS SECTION
   ==================================== */

.featured-section {
    padding: 80px 0;
    background: var(--gradient-light);
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    padding: 0 10px; /* إضافة padding لمنع القص */
}

.carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s ease;
    padding: 20px 0;
    contain: layout;
    direction: ltr; /* فرض اتجاه LTR للـ carousel */
}

/* إصلاح اتجاه الكروت في RTL */
[dir="rtl"] .carousel-track {
    direction: ltr; /* الـ track نفسه يبقى LTR */
}

[dir="rtl"] .product-card {
    direction: rtl; /* المحتوى داخل الكارد RTL */
}

/* Product Card */
.product-card {
    flex: 0 0 300px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
    contain: layout style paint;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

.product-card:active {
    transform: translateY(-4px);
    transition: transform 0.1s ease;
}

.product-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    content-visibility: auto;
    will-change: transform;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--success-green);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 2;
}

.wishlist-btn:hover {
    background: var(--light-blue);
    color: var(--primary-blue);
    transform: scale(1.1);
}

.wishlist-btn.active {
    background: var(--primary-blue);
    color: var(--white);
}

.wishlist-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.product-info {
    padding: 24px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover .product-name {
    color: var(--primary-blue);
}

.product-category {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ffc107;
    font-size: 0.9rem;
}

.star.empty {
    color: #e0e0e0;
}

.rating-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.current-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.original-price {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.currency {
    font-size: 1rem;
    color: var(--text-light);
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.stock-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.in-stock {
    background: var(--success-green);
}

.out-of-stock {
    background: #f44336;
}

.add-to-cart-btn {
    width: 100%;
    padding: 14px 20px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.add-to-cart-btn.loading {
    pointer-events: none;
}

.btn-text {
    transition: var(--transition);
}

.btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: var(--transition);
}

.add-to-cart-btn.loading .btn-text {
    opacity: 0;
}

.add-to-cart-btn.loading .btn-spinner {
    opacity: 1;
}

/* Carousel Navigation */
.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    color: var(--primary-blue);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.nav-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ====================================
   CAROUSEL NAVIGATION - SLIDING DOTS
   ==================================== */

.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--white);
    color: var(--primary-blue);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
    flex-shrink: 0;
}

.nav-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* الـ container للنقاط - يتسع لـ 5 نقاط بالضبط */
.carousel-dots {
    display: flex;
    gap: 7px;
    align-items: center;
    overflow: hidden;
    max-width: 88px; /* 5 × 10px + 4 × 7px = 78px + مساحة للـ active */
    min-width: 0;
    position: relative;
    flex-shrink: 0;
}

/* النقطة العادية */
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #c8cfe8;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    padding: 0;
    outline: none;
}

/* النقطة النشطة */
.dot.active {
    background: var(--primary-blue);
    transform: scale(1.4);
    width: 12px;
    height: 12px;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.2);
}

/* نقاط الأطراف الصغيرة - تدل على وجود نقاط خارج النافذة */
.dot.dot-edge {
    width: 6px;
    height: 6px;
    opacity: 0.4;
    transform: scale(0.8);
}

@media (max-width: 768px) {
    .carousel-dots { gap: 6px; max-width: 76px; }
    .dot { width: 9px; height: 9px; }
    .dot.active { width: 11px; height: 11px; }
    .dot.dot-edge { width: 5px; height: 5px; }
}

.dot.active {
    background: var(--primary-blue);
    transform: scale(1.2);
}

/* Skeleton Loading */
.skeleton-card {
    flex: 0 0 300px;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    padding: 0;
}

.skeleton-image {
    height: 220px;
}

.skeleton-content {
    padding: 24px;
}

.skeleton-button {
    height: 48px;
    border-radius: var(--border-radius-small);
    margin-top: 16px;
}

/* Empty & Error States */
.empty-state,
.error-state {
    text-align: center;
    padding: 60px 20px;
    width: 100%;
}

.empty-state i,
.error-state i {
    font-size: 4rem;
    margin-bottom: 20px;
}

.empty-state i {
    color: var(--text-light);
}

.error-state i {
    color: #f44336;
}

.empty-state h3,
.error-state h3 {
    margin-bottom: 12px;
}

.empty-state p,
.error-state p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.retry-btn {
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
}

/* View All Products Button */
.view-all-products-btn-container {
    text-align: center;
    margin-top: 40px;
    animation: fadeInUp 0.8s ease;
}

.btn-view-all-products {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 40px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

.btn-view-all-products:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
    background: var(--gradient-secondary);
}

.btn-view-all-products:active {
    transform: translateY(-1px);
}

/* ====================================
   12. FEATURES SECTION
   ==================================== */

.features {
    padding: 80px 0;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    contain: content;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--gradient-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: var(--primary-navy);
}

.feature-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ====================================
   13. TESTIMONIALS SECTION
   ==================================== */

.testimonials {
    padding: 6rem 0;
    background: var(--light-gray);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    contain: content;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30, 58, 138, 0.05), transparent);
    transition: left 0.6s;
}

.testimonial-card:hover::before {
    left: 100%;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.testimonial-rating {
    margin-bottom: 1rem;
}

.testimonial-card blockquote {
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text-primary);
    position: relative;
}

.testimonial-card blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--light-blue);
    position: absolute;
    top: -1rem;
    left: -0.5rem;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: var(--transition-fast);
}

.testimonial-card:hover .testimonial-author img {
    border-color: var(--primary-blue);
}

.author-info cite {
    font-weight: 600;
    color: var(--text-primary);
    font-style: normal;
    display: block;
}

.author-role {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

[dir="rtl"] .testimonial-card blockquote::before {
    right: -0.5rem;
    left: auto;
}

/* ====================================
   14. CONTACT SECTION
   ==================================== */

.contact {
    padding: 6rem 0;
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    color: var(--primary-blue);
    font-size: 1.25rem;
}

.contact-details h3 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    display: block;
    margin-bottom: 0.25rem;
}

.contact-link:hover {
    color: var(--primary-blue);
}

.contact-link.whatsapp {
    color: var(--success-green);
}

.contact-link.whatsapp:hover {
    color: var(--success-green);
    text-decoration: underline;
}

.hours {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hour-item {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.map-container {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
}

/* ====================================
   15. FOOTER
   ==================================== */

footer {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
    padding: 60px 20px 20px;
    position: relative;
    overflow: hidden;
}

.footer-container {
    margin: 0 auto;
    position: relative;
    z-index: 2;
    max-width: 1200px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 100px;
    margin-bottom: 40px;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 20px;
}

.footer-description {
    margin-bottom: 20px;
    line-height: 1.6;
    opacity: 0.9;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 10px;
}

[dir="rtl"] .footer-links a:hover {
    padding-left: 0;
    padding-right: 10px;
}

.hours-list {
    list-style: none;
}

.hours-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hours-day {
    opacity: 0.9;
}

.hours-time {
    font-weight: 600;
}

.contact-item-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.contact-icon-footer {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    backdrop-filter: blur(10px);
}

.contact-text {
    opacity: 0.9;
    line-height: 1.4;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    font-size: 14px;
}

.copyright a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
}

.copyright a:hover {
    color: var(--white);
}

/* ====================================
   16. TOAST NOTIFICATIONS
   ==================================== */

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--success-green);
    color: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-strong);
    transform: translateX(400px);
    transition: var(--transition);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 300px;
}

[dir="rtl"] .toast {
    right: auto;
    left: 20px;
    transform: translateX(-400px);
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: var(--error-red);
}

/* ====================================
   17. BACK TO TOP BUTTON
   ==================================== */

.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-strong);
    transition: var(--transition);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
}

[dir="rtl"] .back-to-top-btn {
    right: auto;
    left: 30px;
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hero);
}

.back-to-top-btn:active {
    transform: translateY(-2px);
}

.back-to-top-btn i {
    animation: bounceUpDown 2s ease-in-out infinite;
}

@keyframes bounceUpDown {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.back-to-top-btn:hover i {
    animation: none;
}

/* ====================================
   18. ANIMATION CLASSES
   ==================================== */

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible,
.fade-in-left.visible,
.fade-in-right.visible,
.scale-in.visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

.stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-animation.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-animation.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-animation.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-animation.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-animation.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-animation.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-animation.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ====================================
   19. RESPONSIVE STYLES
   ==================================== */

@media (max-width: 1200px) {
    .header-content {
        gap: 0.75rem;
        padding: 0 10px;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
    
    .nav-actions {
        gap: 6px;
    }
    
    .action-btn {
        width: 38px;
        height: 38px;
    }
    
    .lang-toggle {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .auth-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .header {
        padding: 8px 0;
    }
    
    .header-content {
        height: auto;
        min-height: 56px;
        gap: 0.5rem;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .logo img {
        width: 80px;
        height: 80px;
    }
    
    .logo-text {
        display: none;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
    
    .nav-actions {
        flex: 1;
        justify-content: flex-end;
        gap: 4px;
        align-items: center;
    }
    
    .auth-buttons {
        display: none;
    }
    
    .action-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .lang-toggle {
        display: flex;
        width: 55px;
        height: 36px;
        padding: 0;
        font-size: 0.9rem;
        justify-content: center;
    }
    
    .lang-toggle span {
        display: none;
    }
    
    .lang-toggle i {
        display: block;
    }
    
    .user-icon {
        display: flex;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .cart-dropdown,
    .wishlist-dropdown {
        position: fixed;
        top: 70px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: calc(100% - 20px);
        min-width: 0;
        transform: translateY(0);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    .search-container {
        width: calc(100% - 20px);
        max-width: 500px;
        padding: 1rem;
    }
    
    .search-input {
        padding: 12px 40px 12px 15px;
        font-size: 0.9rem;
    }
    
    .search-btn {
        right: 10px;
        padding: 6px 10px;
    }
    
    [dir="rtl"] .search-btn {
        left: 10px;
    }
    
    .hero-content {
        padding: 0 30px;
    }
    
    h1 {
        font-size: 36px;
    }
    
    .description {
        font-size: 16px;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .categories-section {
        padding: 60px 0;
    }
    
    .category-card {
        flex: 0 0 280px;
    }
    
    .categories-carousel-track {
        gap: 16px;
    }
    
    .category-image {
        height: 180px;
    }
    
    .category-info {
        padding: 20px;
    }
    
    .btn-view-all-categories {
        padding: 14px 32px;
        font-size: 1rem;
    }
    
    .product-card {
        flex: 0 0 310px;
    }
    
    .carousel-track {
        gap: 16px;
    }
    
    .nav-btn {
        width: 44px;
        height: 44px;
    }
    
    .btn-view-all-products {
        padding: 14px 32px;
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .contact {
        padding: 4rem 0;
    }
    
    .contact-item {
        gap: 0.75rem;
    }
    
    .contact-icon {
        width: 45px;
        height: 45px;
    }
    
    .toast {
        right: 16px;
        bottom: 16px;
        left: 16px;
        transform: translateY(100%);
    }
    
    .toast.show {
        transform: translateY(0);
    }
    
    .back-to-top-btn {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1.1rem;
    }
    
    [dir="rtl"] .back-to-top-btn {
        right: auto;
        left: 20px;
    }
    
    .suggestion-item {
        gap: 12px;
        padding: 10px;
    }
    
    .suggestion-image {
        width: 50px;
        height: 50px;
    }
    
    .suggestion-name {
        font-size: 0.9rem;
    }
    
    .suggestion-category {
        font-size: 0.8rem;
    }
    
    .suggestion-arrow {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 6px 0;
    }
    
    .header-content {
        gap: 0.25rem;
        padding: 0 5px;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .logo img {
        width: 80px;
        height: 80px;
    }
    
    .mobile-menu-toggle {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
        order: -1;
    }
    
    .action-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .lang-toggle {
        width: 55px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .categories-section {
        padding: 40px 0;
    }
    
    .category-card {
        flex: 0 0 308px;
    }
    
    .category-name {
        font-size: 1.1rem;
    }
    
    .category-description {
        font-size: 0.85rem;
    }
    
    .view-all-categories-btn-container {
        margin-top: 30px;
    }
    
    .btn-view-all-categories {
        padding: 12px 28px;
        font-size: 0.95rem;
    }
    
    .contact {
        padding: 3rem 0;
    }
    
    .cart-dropdown,
    .wishlist-dropdown {
        top: 60px;
        max-height: calc(100vh - 70px);
    }
    
    .search-container {
        padding: 0.75rem;
    }
    
    .search-input {
        padding: 10px 35px 10px 12px;
        font-size: 0.85rem;
    }
    
    .search-btn {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .testimonial-card blockquote::before {
        font-size: 3rem;
        top: -0.5rem;
    }
    
    .back-to-top-btn {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        font-size: 1rem;
    }
    
    [dir="rtl"] .back-to-top-btn {
        right: auto;
        left: 15px;
    }
}

@media (max-width: 360px) {
    .logo {
        font-size: 1rem;
    }
    
    .logo img {
        width: 60px;
        height: 60px;
    }
    
    .mobile-menu-toggle {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .action-btn {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
    
    .lang-toggle {
        width: 55px;
        height: 30px;
        font-size: 0.75rem;
    }
}

/* ====================================
   20. PRINT STYLES
   ==================================== */

@media print {
    .header,
    .nav-actions,
    .mobile-menu-toggle,
    .back-to-top-btn,
    .toast,
    .overlay {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
}

/* ====================================
   END OF CSS FILE
   ==================================== */