/**
 * Abouhamar Mall - Modern CSS File
 */

/* ==================== General Styles ==================== */
:root {
    --primary-color: #122B40;
    --secondary-color: #F8A156;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --white-color: #fff;
    --gray-color: #6c757d;
    --border-color: #e9ecef;
    --orange-color: #E84C3D;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
    padding-top: 0; /* Remove padding to fix header overlap */
}

.rtl {
    font-family: 'Cairo', sans-serif;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--orange-color);
    color: var(--white-color);
}

.btn-primary:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--white-color);
    color: var(--white-color);
}

.btn-outline:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== Header Styles ==================== */
/* Top Bar */
.top-bar {
    background-color: #fff;
    color: #333;
    padding: 8px 0;
    font-size: 12px;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid #eee;
}

.top-bar-item {
    margin-right: 20px;
    color: #333;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.rtl .top-bar-item {
    margin-right: 0;
    margin-left: 20px;
}

.top-bar-item i {
    margin-right: 6px;
    color: var(--orange-color);
}

.rtl .top-bar-item i {
    margin-right: 0;
    margin-left: 6px;
}

/* Language Switcher */
.language-switcher {
    position: relative;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    padding: 0;
    font-size: 13px;
}

.lang-btn i {
    margin-left: 5px;
    font-size: 10px;
}

.rtl .lang-btn i {
    margin-left: 0;
    margin-right: 5px;
}

/* Main Header */
.site-header {
    background-color: #fff;
    padding: 15px 0;
    position: relative;
    z-index: 9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    max-height: 50px;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: #122B40;
}

/* Search Form */
.search-form {
    width: 100%;
}

.search-form .form-control {
    height: 40px;
    border-radius: 0;
    border: 1px solid #ddd;
    padding: 0 15px;
    font-size: 14px;
}

.search-form .form-select {
    height: 40px;
    border-radius: 0;
    border: 1px solid #ddd;
    border-left: none;
    padding: 0 15px;
    font-size: 14px;
    background-color: #f8f9fa;
    min-width: 120px;
}

.search-form .btn {
    height: 40px;
    border-radius: 0;
    padding: 0 15px;
    background-color: var(--orange-color);
}

.search-form .btn:hover {
    background-color: var(--primary-color);
}

.rtl .search-form .form-control {
    border-radius: 0;
}

.rtl .search-form .form-select {
    border-left: 1px solid #ddd;
    border-right: none;
}

.rtl .search-form .btn {
    border-radius: 0;
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
}

.user-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    color: var(--text-color);
    position: relative;
    text-decoration: none;
    font-size: 12px;
}

.rtl .user-action-btn {
    margin-left: 0;
    margin-right: 15px;
}

.user-action-btn i {
    font-size: 20px;
    margin-bottom: 4px;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--orange-color);
    color: var(--white-color);
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rtl .cart-count {
    right: auto;
    left: -5px;
}

/* Main Navigation */
.main-nav {
    background-color: #e84c3d;
    padding: 0;
    position: relative;
    z-index: 8;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
    position: relative;
}

.nav-link {
    color: var(--white-color);
    font-weight: 500;
    padding: 12px 20px;
    display: block;
    position: relative;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--white-color);
}

.nav-link.active {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--white-color);
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #fff;
    display: block;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
}

/* Show mobile menu toggle on mobile devices */
@media (max-width: 768px) {
    .mobile-menu-toggle,
    .sticky-header .mobile-menu-toggle {
        display: block;
    }
}

.rtl .mobile-menu-toggle {
    margin-left: 0;
    margin-right: 15px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--white-color);
    z-index: 1001;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    overflow-y: auto;
}

.rtl .mobile-nav {
    right: auto;
    left: -300px;
    transition: left 0.3s ease;
}

.mobile-nav.active {
    right: 0;
}

.rtl .mobile-nav.active {
    right: auto;
    left: 0;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-header .logo img {
    height: 30px;
}

.mobile-nav-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    font-size: 20px;
}

.mobile-menu {
    list-style: none;
    margin: 0;
    padding: 15px;
}

.mobile-menu-item {
    margin-bottom: 10px;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    color: var(--text-color);
    font-weight: 500;
    padding: 10px;
    border-radius: 4px;
}

.mobile-menu-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.rtl .mobile-menu-link i {
    margin-right: 0;
    margin-left: 10px;
}

.mobile-menu-link:hover, .mobile-menu-link.active {
    background-color: var(--light-color);
    color: var(--orange-color);
}

.mobile-nav-footer {
    padding: 15px;
    border-top: 1px solid var(--border-color);
}

.language-switcher-mobile {
    display: flex;
    justify-content: center;
}

.lang-btn-mobile {
    padding: 5px 15px;
    margin: 0 5px;
    border-radius: 4px;
    font-weight: 500;
}

.lang-btn-mobile.active {
    background-color: var(--light-color);
    color: var(--orange-color);
}

body.menu-open {
    overflow: hidden;
}

/* Mobile search form improvements */
.mobile-search-form {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-search-form .input-group {
    position: relative;
    display: flex;
    width: 100%;
}

.mobile-search-form .form-control {
    border-radius: 0;
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    width: 100%;
    height: 40px;
    border-right: 0;
}

.mobile-search-form .btn {
    border-radius: 0;
    padding: 0;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    background-color: var(--orange-color);
}

.mobile-search-form .btn i {
    font-size: 16px;
}

.rtl .mobile-search-form .form-control {
    border-radius: 0;
    border-right: 1px solid var(--border-color);
    border-left: 0;
}

.rtl .mobile-search-form .btn {
    border-radius: 0;
}

/* Slide-in Cart */
.slide-in-cart {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    max-width: 90vw;
    height: 100vh;
    background-color: #fff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.slide-in-cart.active {
    right: 0;
}

.rtl .slide-in-cart {
    right: auto;
    left: -400px;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
}

.rtl .slide-in-cart.active {
    left: 0;
}

.slide-in-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1049;
    display: none;
}

.slide-in-cart-overlay.active {
    display: block;
}

.slide-in-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.slide-in-cart-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.slide-in-cart-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #333;
    padding: 5px;
}

.slide-in-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.slide-in-cart-items {
    margin-bottom: 20px;
}

.slide-in-cart-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.slide-in-cart-item-image {
    width: 60px;
    height: 60px;
    margin-right: 15px;
}

.rtl .slide-in-cart-item-image {
    margin-right: 0;
    margin-left: 15px;
}

.slide-in-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-in-cart-item-details {
    flex: 1;
}

.slide-in-cart-item-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.slide-in-cart-item-price {
    font-size: 14px;
    color: #666;
}

.slide-in-cart-item-remove {
    background: none;
    border: none;
    color: #ff5252;
    cursor: pointer;
    padding: 5px;
    font-size: 14px;
}

.slide-in-cart-footer {
    padding: 15px;
    border-top: 1px solid #eee;
}

.slide-in-cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: 600;
}

.slide-in-cart-buttons {
    display: flex;
    gap: 10px;
}

.slide-in-cart-buttons .btn {
    flex: 1;
}

.slide-in-cart-empty {
    text-align: center;
    padding: 30px 15px;
}

.slide-in-cart-empty p {
    margin-bottom: 20px;
    color: #666;
}

/* ==================== Hero Banner ==================== */
.hero-banner {
    position: relative;
    padding: 100px 0;
    background-color: #f5f5f5;
    text-align: center;
    overflow: hidden;
}

.hero-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.7;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #122B40;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #555;
}




/* ==================== Footer Styles ==================== */
.site-footer {
    margin-top: 50px;
}

.footer-top {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 50px 0;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.rtl .widget-title::after {
    left: auto;
    right: 0;
}

.quick-links, .category-links, .contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-links li, .category-links li {
    margin-bottom: 10px;
}

.quick-links a, .category-links a {
    color: var(--white-color);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.quick-links a:hover, .category-links a:hover {
    opacity: 1;
    color: var(--secondary-color);
    padding-left: 5px;
}

.rtl .quick-links a:hover, .rtl .category-links a:hover {
    padding-left: 0;
    padding-right: 5px;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.contact-info li i {
    margin-right: 10px;
    margin-top: 5px;
}

.rtl .contact-info li i {
    margin-right: 0;
    margin-left: 10px;
}

.contact-info a {
    color: var(--white-color);
    opacity: 0.8;
}

.contact-info a:hover {
    opacity: 1;
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white-color);
    border-radius: 50%;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.rtl .social-link {
    margin-right: 0;
    margin-left: 10px;
}

.social-link:hover {
    background-color: var(--secondary-color);
    color: var(--white-color);
    transform: translateY(-3px);
}

.payment-methods {
    margin-top: 20px;
}

.footer-bottom {
    background-color: var(--white-color);
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.footer-bottom-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.copyright p {
    margin: 0;
    font-size: 14px;
}

.footer-links a {
    margin-left: 15px;
    color: var(--text-color);
    font-size: 14px;
}

.rtl .footer-links a {
    margin-left: 0;
    margin-right: 15px;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: var(--secondary-color);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.rtl .back-to-top {
    right: auto;
    left: 30px;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-color);
}

/* ==================== Responsive Styles ==================== */
@media (max-width: 1200px) {
    .container {
        max-width: 992px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 768px;
    }
    
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 576px;
    }
    
    body {
        padding-top: 0; /* Remove padding for mobile */
    }
    
    /* Hide main navigation on mobile */
    .main-nav {
        display: none;
    }
    
    /* Top bar adjustments for mobile */
    .top-bar {
        padding: 5px 0;
        text-align: center;
    }
    
    .top-bar .row {
        justify-content: center;
    }
    
    .top-bar-item {
        margin: 0 8px;
        font-size: 11px;
    }
    
    /* Header adjustments for mobile */
    .site-header {
        padding: 10px 0;
    }
    
    .logo img {
        max-height: 35px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .user-action-btn {
        margin-left: 15px;
    }
    
    .rtl .user-action-btn {
        margin-left: 0;
        margin-right: 15px;
    }
    
    /* Hide text labels in action buttons */
    .action-text {
        display: none;
    }
    
    /* Adjust user action buttons for mobile */
    .user-action-btn i {
        font-size: 18px;
        margin-bottom: 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        margin-top: 10px;
    }
    
    .footer-links a {
        margin: 0 7px;
    }
}

@media (max-width: 576px) {
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .hero-banner {
        height: 400px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .user-action-btn {
        margin-left: 10px;
    }
    
    .rtl .user-action-btn {
        margin-left: 0;
        margin-right: 10px;
    }
    
    /* Further optimize top bar for small screens */
    .top-bar-contact {
        justify-content: center;
    }
    
    .top-bar-actions {
        justify-content: center;
        margin-top: 5px;
    }
} 