* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #22376a;
    --secondary-color: #3b5998;
    --accent-color: #4a90e2;
    --text-dark: #333333;
    --text-light: #666666;
    --text-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    /* font-family: 'Source Sans Pro', sans-serif; */
    font-family: "Tajawal", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    font-style: normal;
    background-color: var(--bg-white);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 3rem;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-white);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--accent-color);
    color: var(--text-white);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo a {
    font-size: 1.5rem;
    margin-left: 10px;
    font-weight: normal;
    color: var(--primary-color);
    
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu li a {
    color: var(--text-dark);
    font-weight: 600;
    position: relative;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-menu li a:hover::after {
    width: 100%;
}

/* .cart-icon {
    position: relative;
    cursor: pointer;
    color: var(--primary-color);
    transition: var(--transition);
} */

.cart-icon {
    position: relative;
    cursor: pointer;
    color: var(--primary-color);
    transition: var(--transition);
    display: flex;             /* خلي العنصر flex */
    align-items: center;       /* وسط المحتوى عموديًا */
    justify-content: center;   /* وسطه أفقيًا (اختياري) */
}

.cart-icon:hover {
    color: var(--secondary-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-color);
    color: var(--text-white);
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.hero {
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(34, 55, 106, 0.9), rgba(74, 144, 226, 0.8)),
                url('https://images.pexels.com/photos/3768131/pexels-photo-3768131.jpeg?auto=compress&cs=tinysrgb&w=1920') center/cover;
    position: relative;
    margin-top: 70px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-white);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.products {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-color);
    color: var(--text-white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.product-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    color: #ffc107;
    font-size: 1rem;
}

.rating-count {
    color: var(--text-light);
    font-size: 0.875rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.add-to-cart {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.reviews {
    padding: 5rem 0;
    background-color: var(--bg-white);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.review-card {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.review-card:hover {
    box-shadow: var(--shadow-md);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.reviewer-name {
    font-weight: 600;
    color: var(--primary-color);
}

.reviewer-location {
    font-size: 0.875rem;
    color: var(--text-light);
}

.review-rating {
    color: #ffc107;
    font-size: 1.125rem;
}

.review-text {
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.review-date {
    font-size: 0.875rem;
    color: var(--text-light);
}

.review-form-container {
    max-width: 600px;
    margin: 3rem auto 0;
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
}

.review-form-container h3 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 55, 106, 0.1);
}

.star-rating {
    display: flex;
    gap: 0.5rem;
}

.star {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: var(--transition);
}

.star:hover,
.star.active {
    color: #ffc107;
}

.about {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.about-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.contact {
    padding: 5rem 0;
    background-color: var(--bg-white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--text-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 1.125rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-light);
    line-height: 1.6;
}

.contact-form {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
}

.footer {
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--text-white);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-white);
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 1.5rem;
}

.empty-cart {
    text-align: center;
    color: var(--text-light);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-weight: 600;
    color: var(--text-dark);
}

.remove-item {
    background-color: #dc3545;
    color: var(--text-white);
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
}

.remove-item:hover {
    background-color: #c82333;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.modal-success .modal-body {
    text-align: center;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    .logo{
        align-items: center;
    }
    .logo a {
    margin-left: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-white);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transition: var(--transition);
        box-shadow: var(--shadow-md);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .products-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}












/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-white);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transition: var(--transition);
        box-shadow: var(--shadow-md);
        z-index: 1000;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu li a {
        display: block;
        padding: 1rem;
        font-size: 1.125rem;
        border-bottom: 1px solid var(--border-color);
    }

    /* Animation for menu toggle */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}