/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2e7d32;
    --primary-dark: #1b5e20;
    --primary-light: #4caf50;
    --secondary-color: #ff9800;
    --secondary-dark: #f57c00;
    --text-color: #333;
    --text-light: #666;
    --background: #f8f9fa;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray: #e0e0e0;
    --gray-dark: #757575;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: 16px;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

.btn-lg {
    padding: 14px 32px;
    font-size: 18px;
}

/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

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

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

.logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 600;
    position: relative;
    padding: 5px 0;
}

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

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

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.lang-btn {
    background: none;
    border: none;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 150px 0 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e9 100%);
    margin-top: 80px;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-content {
    flex: 1;
}

.hero-title {
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
}

.hero-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

/* Featured Products */
.featured-products {
    padding: 80px 0;
    background-color: var(--white);
}

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

.section-title {
    color: var(--primary-dark);
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
}

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

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

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

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

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

.product-image {
    width: 100%;
    height: 200px;
    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-info {
    padding: 20px;
}

.product-category {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

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

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.star {
    color: #ffd700;
    font-size: 1.2rem;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--gray);
}

.product-weight {
    color: var(--gray-dark);
    font-size: 0.9rem;
}

.product-export {
    background-color: var(--primary-light);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

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

/* Features Section */
.features {
    padding: 80px 0;
    background-color: var(--gray-light);
}

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

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

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--white);
}

.feature-card h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: var(--white);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.stats {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--gray);
}

.stat {
    text-align: center;
}

.stat h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 5px;
}

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

/* Contact Section */
.contact {
    padding: 80px 0;
    background-color: var(--gray-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.info-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    flex-shrink: 0;
}

.info-content h3 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--primary-dark);
}

.info-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

.contact-map {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.map-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Footer */
.footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 60px 0 30px;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

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

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

.social-link:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
}

.facebook:hover {
    background: #1877f2;
}

.whatsapp:hover {
    background: #25d366;
}

.youtube:hover {
    background: #ff0000;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul {
    list-style: none;
}

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

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--white);
    padding-right: 5px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: var(--border-radius);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--white);
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Market Page Styles */
.market-hero {
    padding: 150px 0 80px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--white);
    margin-top: 80px;
    text-align: center;
}

.market-hero-content h1 {
    color: var(--white);
    margin-bottom: 15px;
}

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

.search-bar {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
}

.categories {
    padding: 30px 0;
    background-color: var(--white);
    box-shadow: var(--shadow);
}

.categories-filter {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.categories-filter h3 {
    margin: 0;
    color: var(--primary-dark);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--gray);
    background: none;
    border-radius: 25px;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.products-market {
    padding: 60px 0;
    background-color: var(--background);
}

.market-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.sort-options select {
    padding: 10px 15px;
    border: 2px solid var(--gray);
    border-radius: var(--border-radius);
    font-family: 'Cairo', sans-serif;
    background-color: var(--white);
    color: var(--text-color);
    font-weight: 600;
}

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

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

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

.market-product-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.market-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.market-product-card:hover .product-overlay {
    opacity: 1;
}

.overlay-buttons {
    display: flex;
    gap: 10px;
}

.market-product-info {
    padding: 20px;
}

.market-product-title {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

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

.product-specs {
    background: var(--gray-light);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.spec {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.spec:last-child {
    margin-bottom: 0;
}

.spec-label {
    color: var(--text-light);
}

.spec-value {
    color: var(--primary-dark);
    font-weight: 600;
}

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

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

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--gray);
    background: none;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover,
.page-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.contact-banner {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: var(--white);
    text-align: center;
}

.banner-content h2 {
    color: var(--white);
    margin-bottom: 15px;
}

.banner-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.banner-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-success {
    background-color: #25d366;
    color: var(--white);
}

.btn-success:hover {
    background-color: #1da851;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero .container,
    .about-content {
        flex-direction: column;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav-buttons {
        display: none;
    }
    
    .navbar.active .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--white);
        padding: 20px;
        box-shadow: var(--shadow-lg);
    }
    
    .navbar.active .nav-buttons {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 120px);
        right: 0;
        left: 0;
        background: var(--white);
        padding: 20px;
        box-shadow: var(--shadow-lg);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    .features-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .market-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .categories-filter {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .banner-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .products-container {
        grid-template-columns: 1fr;
    }
}

/* Star Rating */
.star-rating {
    display: flex;
    gap: 2px;
}

.star-rating .star {
    font-size: 1rem;
}

.star-rating .star.filled {
    color: #ffd700;
}

.star-rating .star.half {
    position: relative;
}

.star-rating .star.half::before {
    content: '★';
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
    color: #ffd700;
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    transform: translateX(100%);
    opacity: 0;
    transition: var(--transition);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    background: var(--primary-color);
}

.toast.error {
    background: #f44336;
}
