:root {
    --primary-color: #4a6bff;
    --primary-dark: #3a5ae8;
    --primary-color-rgb: 74, 107, 255;
    --secondary-color: #f8f9fa;
    --dark-color: #2c3e50;
    --light-color: #ffffff;
    --gray-color: #f5f5f5;
    --text-color: #333333;
    --text-light: #777777;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    overflow-y: scroll;
    width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Tajawal', sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.navbar {
    background-color: var(--light-color);
    box-shadow: 0 6px 18px -6px rgba(var(--primary-color-rgb), 0.15), 0 1.5px 4px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: flex-end; /* This will push the menu button to the right */
    align-items: center;
    position: relative; /* This is crucial for absolute positioning of the logo */
    width: 100%;
    padding: 1rem 15px; /* Control height with padding */
    margin: 0 auto;
    max-width: 1200px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
}

.logo span {
    margin-right: 10px;
}

.nav-links {
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
    padding: 5px 0;
    position: relative;
}

.nav-link.active,
.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1101;
}

.menu-toggle .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    gap: 5px;
    transition: all 0.3s;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.menu-toggle .hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s;
}
.menu-toggle.active .hamburger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .hamburger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


main {
    flex: 1;
    padding: 0px 0;
}

.footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-section ul li {
    margin-bottom: 10px;
}

.contact-info i {
    margin-left: 8px;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: var(--text-light);
}

@media (max-width: 992px) {
    .nav-links {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-links {
        position: fixed;
        top: -100vh;
        opacity: 0;
        right: 0;
        width: 75vw;
        max-width: 320px;
        height: 100vh;
        background-color: var(--light-color);
        padding: 40px 20px 20px 20px;
        box-shadow: 0 0 40px rgba(0,0,0,0.15);
        flex-direction: column;
        align-items: flex-start;
        transition: all 0.35s cubic-bezier(.77,0,.18,1);
        gap: 25px;
        z-index: 1102;
        border-radius: 0 0 0 20px;
    }
    .nav-links.active {
        top: 0;
        right: 0;
        opacity: 1;
        box-shadow: 0 0 40px rgba(0,0,0,0.18);
    }
    .nav-link {
        padding: 14px 0;
        width: 100%;
        font-size: 1.1rem;
        text-align: right;
        border-bottom: 1px solid #f1f1f1;
    }
    .nav-overlay {
        display: none;
    }
    .nav-overlay.active {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.25);
        z-index: 1100;
        animation: fadeInOverlay 0.3s;
    }
    @keyframes fadeInOverlay {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

@media (max-width: 576px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-section {
        margin-bottom: 30px;
    }
    
    .footer-section:last-child {
        margin-bottom: 0;
    }
}

.hero-section {
    background: linear-gradient(var(--primary-color), var(--primary-dark));
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    text-align: center;
    padding: 100px 0;
    margin-bottom: 50px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    min-width: 180px;
    padding: 16px 35px;
    font-size: 1.1rem;
    font-weight: bold;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(var(--primary-color-rgb), 0.15);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-button.ripple-btn {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 4px;
    box-shadow: none;
    font-weight: bold;
    position: relative;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, border 0.2s;
    outline: none;
    overflow: hidden;
}

.cta-button.ripple-btn:hover,
.cta-button.ripple-btn:focus {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-color: #fff;
    box-shadow: 0 4px 18px 0 rgba(0,0,0,0.10);
}

.cta-button.ripple-btn::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-effect 0.6s linear;
    background: rgba(255,255,255,0.7);
    pointer-events: none;
    z-index: 2;
}

@keyframes ripple-effect {
    to {
        transform: scale(3.5);
        opacity: 0;
    }
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2rem;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-subtitle {
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.product-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(var(--primary-color-rgb), 0.1);
}

.product-link {
    display: block;
    color: inherit;
}

.product-image-container {
    height: 250px;
    position: relative;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    transition: transform 0.5s;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.product-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
    min-height: 40px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.product-price {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.view-product {
    color: var(--text-light);
    font-size: 0.9rem;
    transition: var(--transition);
}

.product-card:hover .view-product {
    color: var(--primary-color);
    transform: translateX(-5px);
}

.no-products {
    text-align: center;
    padding: 50px 0;
    color: var(--text-light);
}

.features-section {
    background-color: var(--gray-color);
    padding: 60px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(var(--primary-color-rgb), 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

@media (max-width: 992px) {
    .hero-section {
        padding: 80px 0;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
        background-attachment: scroll;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 50px 0;
    }
    
    .hero-section h1 {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 20px;
    }
    .features-section {
        display: none;
    }
}


.sticky-order-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sticky-order-button.show {
    opacity: 1;
    visibility: visible;
}

.footer-links li a {
    transition: var(--transition);
    display: inline-block;
    padding: 3px 0;
    position: relative;
}

.footer-links li a:hover {
    color: var(--primary-color) !important;
    transform: translateX(-5px);
}

/* .footer-links li a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 1px;
    background-color: var(--primary-color);
} */

.contact-info li a {
    transition: var(--transition);
    display: inline-block;
}

.contact-info li a:hover {
    color: var(--primary-color) !important;
    transform: translateX(-5px);
}

.social-links a {
    transition: var(--transition) !important;
}

.social-links a:hover {
    background-color: var(--primary-color) !important;
    transform: scale(1.15) translateY(-3px) !important;
    box-shadow: 0 3px 10px rgba(var(--primary-color-rgb), 0.3) !important;
}

.categories-filter {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    white-space: nowrap;
    padding-bottom: 0.5rem;
    width: 100%;
}

.categories-filter::-webkit-scrollbar {
    display: none;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    flex: 0 0 auto;
    min-width: max-content;
}

.category-item i {
    font-size: 1.1rem;
}

.category-item:hover {
    background: #e9ecef;
    color: #333;
    transform: translateY(-2px);
}

.category-item.active {
    background: var(--primary-color);
    color: var(--light-color);
    border-color: var(--primary-color);
}

.category-item.active:hover {
    background: var(--primary-dark);
    transform: none;
}

@media (max-width: 768px) {
    .categories-filter {
        padding: 0.75rem;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
        flex-wrap: nowrap;
    }
    
    .category-item {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .category-item i {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .categories-filter {
        padding: 0.5rem;
        gap: 0.4rem;
        flex-wrap: nowrap;
    }
    
    .category-item {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}
