/* Global Styles */
:root {
    --primary: #50C878;
    --secondary: #333;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background-color: #3da766;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

section {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
}

.section-title h2 {
    font-size: 28px;
    color: var(--secondary);
    display: inline-block;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

/* New Header Styles */
.top-bar {
    background-color: var(--dark);
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.language-currency-selector select {
    background: transparent;
    color: white;
    border: 1px solid #555;
    padding: 5px 8px;
    margin-right: 10px;
    border-radius: 4px;
    cursor: pointer;
}

.language-currency-selector select option {
    color: var(--dark);
}

.user-actions a {
    color: white;
    margin-left: 15px;
    text-decoration: none;
    transition: color 0.3s;
}

.user-actions a:hover {
    color: var(--primary);
}

.user-actions i {
    margin-right: 5px;
}

.main-header {
    background-color: white;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
}

.logo-text {
    margin-left: 10px;
}

.logo-text h1 {
    font-size: 20px;
    color: var(--primary);
    line-height: 1.2;
}

.logo-text span {
    font-size: 12px;
    color: var(--gray);
    display: block;
}

.contact-info a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.main-menu {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-top: 1px solid #eee;
}

.main-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu li {
    position: relative;
}

.main-menu li:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
}

.main-menu a {
    display: block;
    padding: 15px 20px;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 15px;
}

.main-menu a:hover {
    color: var(--primary);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    width: 100%;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.product-image {
    height: 250px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    position: relative;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary);
    flex-grow: 1;
}

.product-price {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 18px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--gray);
    margin-top: auto;
}

/* Product Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background-color: white;
    max-width: 900px;
    margin: 30px auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--primary);
    color: white;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s;
}

.close-modal:hover {
    transform: scale(1.2);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}

.product-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.main-image {
    grid-column: span 3;
    height: 350px;
    background-color: #f9f9f9;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid #eee;
    border-radius: 4px;
}

.thumbnail {
    height: 100px;
    background-color: #f9f9f9;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 1px solid #eee;
    border-radius: 4px;
    transition: all 0.3s;
}

.thumbnail:hover {
    border: 1px solid var(--primary);
    transform: scale(1.02);
}

.product-details h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--secondary);
}

.product-price {
    font-size: 24px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 20px;
}

.product-description {
    margin-bottom: 20px;
    color: var(--gray);
    line-height: 1.7;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.specs-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.specs-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.spec-label {
    font-weight: 600;
    color: var(--gray);
    width: 150px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.quantity-selector {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.quantity-selector input {
    width: 80px;
    text-align: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Footer */
footer {
    background-color: var(--secondary);
    color: white;
    padding: 30px 0 15px;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-links a {
    color: white;
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    font-size: 14px;
    color: #bbb;
}

/* Responsive Styles */
@media (max-width: 1600px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1400px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .product-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .main-image {
        grid-column: span 4;
        height: 300px;
    }
}

@media (max-width: 992px) {
    .main-menu ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-menu li {
        margin-bottom: 5px;
    }
    
    .main-menu a {
        padding: 10px 15px;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .main-image {
        grid-column: span 3;
        height: 250px;
    }
    
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .language-currency-selector, .user-actions {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        height: 250px;
    }
    
    .modal-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .quantity-selector {
        margin-bottom: 15px;
        margin-right: 0;
        width: 100%;
    }
    
    .quantity-selector input {
        width: 100%;
    }
    
    .btn, .btn-outline {
        width: 100%;
        text-align: center;
    }
}
/* Add to your CSS */
[lang="ar"] body {
    direction: rtl;
    text-align: right;
}

[lang="ar"] .product-meta {
    flex-direction: row-reverse;
}

[lang="ar"] .modal-actions {
    flex-direction: row-reverse;
}