/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');

:root {
    /* Colors - Matching SAHEL SHOP Logo */
    --primary-color: #1e3a8a;
    /* Deep Blue from logo */
    --secondary-color: #2563eb;
    /* Bright Blue from logo */
    --accent-color: #f5f5f5;
    --text-color: #333;
    --light-text: #666;
    --white: #ffffff;
    --danger: #e74c3c;
    --success: #2ecc71;
    --border-color: #e0e0e0;
    --dark-gray: #374151;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    background-color: var(--white);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

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

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.flex {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.flex-col {
    flex-direction: column;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.align-center {
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

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

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

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

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Header */
header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

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

.nav-icons {
    display: flex;
    gap: var(--spacing-sm);
    font-size: 1.2rem;
}

.cart-icon {
    position: relative;
}

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

/* Hero Section */
.hero {
    background: var(--accent-color);
    padding: var(--spacing-lg) 0;
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.hero p {
    color: var(--light-text);
    margin-bottom: var(--spacing-md);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Products */
.products-section {
    padding: var(--spacing-md) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-md);
    font-size: 1.8rem;
    color: var(--primary-color);
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.product-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.product-info {
    padding: var(--spacing-sm);
    text-align: center;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.price {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.footer-col h4 {
    margin-bottom: var(--spacing-sm);
    color: var(--secondary-color);
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

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

/* Responsive Design */

/* Tablet (1024px and down) */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-md);
    }

    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 2.2rem;
    }
}

/* Mobile (768px and down) */
@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .hamburger-menu {
        display: block;
    }

    .hero {
        padding: var(--spacing-md) 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .product-image {
        height: 250px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .summary-box {
        margin-right: 0;
        margin: 0 auto;
    }

    /* Ensure forms are full width on mobile */
    input,
    select,
    textarea {
        width: 100%;
        max-width: 100%;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

/* Hamburger Menu & Off-Canvas */
.hamburger-menu {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-color);
    z-index: 1002;
}

.off-canvas-menu {
    position: fixed;
    top: 0;
    right: -300px;
    /* Hidden off-screen right */
    width: 250px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transition: right 0.3s ease-in-out;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.off-canvas-menu.active {
    right: 0;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

.close-btn {
    align-self: flex-end;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav-links a {
    font-size: 1.1rem;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.mobile-nav-links a:hover {
    color: var(--secondary-color);
    padding-left: 10px;
    /* Slight movement on hover */
}

/* Show Hamburger on Mobile */
@media (max-width: 768px) {
    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
        padding: 0 var(--spacing-sm);
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }

    .nav-icons {
        display: flex;
        position: static;
        order: 1;
    }

    .nav-links {
        display: none;
    }

    .hamburger-menu {
        display: block;
        order: -1;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* Contact Form Enhancements */
.contact-container {
    padding: var(--spacing-lg) 0;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
}

.contact-card {
    background: var(--white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(30, 58, 138, 0.05);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.contact-info-icon {
    background: rgba(30, 58, 138, 0.1);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-info-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.contact-info-content p {
    color: var(--light-text);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-gray);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #f9fafb;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    resize: none;
}

.btn-primary.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.2);
}

.btn-primary.btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(30, 58, 138, 0.3);
}

/* Mobile Adjustments for Contact */
@media (max-width: 768px) {
    .contact-container {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .contact-card {
        padding: var(--spacing-sm);
    }
}