/* Base Styles */
:root {
    --primary: #92c23b;
    --secondary: #3c5242;
    --background: #ffffff;
    --text-dark: #333333;
    --text-light: #777777;
    --border-color: #e5e5e5;
    --radius: 0.5rem;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
    direction: rtl;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    font-family: 'Cairo', sans-serif;
}

section {
    margin: 2rem 0;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 20px auto;
    border-radius: 50%;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary);
    animation: spin 1s infinite linear;
}

.loading-text {
    position: absolute;
    bottom: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Top Bar */
.top-bar {
    background-color: #f7f7f7;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: var(--secondary);
}

/* Header/Navbar */
.header {
    background-color: var(--background);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo img {
    height: 40px;
}

.main-nav {
    display: none;
}

.main-nav ul {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    font-weight: 500;
    color: var(--secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-btn {
    position: relative;
    color: var(--secondary);
    font-size: 1.25rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle {
    font-size: 1.5rem;
    color: var(--secondary);
}

.mobile-menu {
    display: none;
    background: white;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
}

.mobile-menu li {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu a {
    display: block;
    padding: 0.5rem 0;
}

/* Hero Slider */
.hero-slider {
    margin-top: 1rem;
}

.slider-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}

.slider-item {
    display: none;
    width: 100%;
}

.slider-item.active {
    display: block;
}

.slider-item img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--secondary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.slider-nav:hover {
    background: white;
}

.slider-nav.prev {
    right: 15px;
}

.slider-nav.next {
    left: 15px;
}

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--primary);
}

/* Special Offers */
.special-offers {
    margin-top: 2rem;
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.section-header {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-right: 4px solid var(--secondary);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.view-all {
    color: var(--secondary);
    text-decoration: none;
    display: none;
    background: #fff;
    padding: 2px 5px;
    border-radius: 4px;
    border-left: 2px solid var(--secondary);
}

.offers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.offer-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}

.offer-container {
    position: relative;
}

.countdown-timer {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1;
    align-items: center;
}

.expiry-text {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: bold;
    margin-left: 8px;
}

.timer-item {
    text-align: center;
}

.timer-item span {
    font-size: 1.25rem;
    font-weight: bold;
    color: #c2185b;
    display: block;
}

.timer-label {
    font-size: 0.7rem;
    color: var(--text-dark);
}

/* Products Section */
.products-section {
    margin: 2rem auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.product-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 0.5rem;
    height: 100%;
    border: 1px solid var(--border-color);
}

.product-image {
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 1/1;
    margin-bottom: 0.5rem;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-image img:hover {
    transform: scale(1.05);
}

.product-title {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    height: 2.8rem;
    overflow: hidden;
    text-align: center;
}

.product-price {
    color: var(--primary);
    font-weight: bold;
    text-align: center;
    margin-bottom: 0.3rem;
}

.product-rating {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.3rem;
}

.rating-stars {
    color: #f7c32e;
}

.rating-count {
    font-size: 0.7rem;
    color: var(--text-light);
}

.product-loading {
    background: white;
    border-radius: 20px;
    height: 250px;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.9;
    }
    100% {
        opacity: 0.6;
    }
}

.view-all-mobile {
    text-align: center;
    margin-top: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.primary-btn {
    background: var(--primary);
    color: white;
}

.primary-btn:hover {
    background: #7eab2c;
    color: white;
}

/* Reviews Section */
.reviews-section {
    background-color: #f7f7f7;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.reviews-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.review-card {
    background: white;
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.reviewer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

.reviewer-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.review-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

.review-text {
    margin-bottom: 1rem;
}

.review-image {
    margin: 0.5rem 0;
}

.review-image img {
    border-radius: 10px;
    width: 100px;
    height: auto;
}

.review-product {
    display: flex;
    align-items: center;
    border: 1px dashed var(--primary);
    border-radius: var(--radius);
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.review-product-image {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    overflow: hidden;
    margin-left: 0.5rem;
    border: 1px solid var(--primary);
}

.review-product-info {
    flex: 1;
}

.review-product-id {
    font-weight: bold;
    font-size: 0.8rem;
}

.review-product-title {
    font-size: 0.9rem;
    margin: 0;
}

.review-loading {
    height: 250px;
    background: white;
    border-radius: var(--radius);
    animation: pulse 1.5s infinite ease-in-out;
}

/* Blog Section */
.blog-section {
    margin: 2rem auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.blog-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 100%;
}

.blog-image {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-image img:hover {
    transform: scale(1.05);
}

.blog-content {
    padding: 0.75rem;
    text-align: center;
}

.blog-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
    height: 2.5rem;
}

.blog-loading {
    height: 200px;
    border-radius: var(--radius);
    background: white;
    animation: pulse 1.5s infinite ease-in-out;
}

/* Newsletter Section */
.newsletter-section {
    background-color: #f7f7f7;
    padding: 2rem 0;
    margin-bottom: 0;
}

.newsletter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.newsletter-form {
    text-align: center;
}

.newsletter-form h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.input-group {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
}

.input-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius) 0 0 var(--radius);
    font-family: 'Cairo', sans-serif;
    outline: none;
}

.input-group button {
    padding: 0.75rem 1rem;
    background: var(--primary);
    color: white;
    border-radius: 0 var(--radius) var(--radius) 0;
    white-space: nowrap;
}

#success-message {
    display: none;
    color: var(--primary);
    background-color: rgba(146, 194, 59, 0.1);
    border: 1px solid var(--primary);
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
}

.newsletter-info p {
    text-align: center;
    line-height: 1.8;
}

.newsletter-info a {
    color: #0d6efd;
}

/* Footer */
.footer {
    background-color: var(--secondary);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.footer-about p {
    margin: 1rem 0;
    color: #d1d1d1;
}

.footer-logo img {
    height: 3rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary);
}

.footer h3 {
    position: relative;
    font-size: 1.25rem;
    padding-right: 1rem;
    margin-bottom: 1.5rem;
    border-right: 4px solid var(--primary);
}

.footer-links ul,
.footer-contact ul,
.footer-hours ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-contact li {
    display: flex;
    align-items: start;
    gap: 1rem;
}

.footer-contact i {
    margin-top: 0.25rem;
}

.footer-hours li {
    display: flex;
    justify-content: space-between;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #4c624f;
}

.footer-bottom p {
    color: #a0a0a0;
    font-size: 0.9rem;
}

.footer-policies {
    display: flex;
    gap: 1.5rem;
}

.footer-policies a {
    color: #a0a0a0;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-policies a:hover {
    color: var(--primary);
}

.footer-credit {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #888;
}

.footer-credit i {
    color: #e25555;
    margin: 0 0.25rem;
}

/* Hover Light Effect */
.hover-light-effect {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hover-light-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x) var(--y), 
        rgba(255,255,255,0.3) 0%, 
        rgba(255,255,255,0) 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.hover-light-effect:hover::before {
    opacity: 1;
}

/* Media Queries */
@media (min-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .main-nav {
        display: block;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .view-all {
        display: block;
    }
    
    .view-all-mobile {
        display: none;
    }
    
    .offers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .newsletter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
/* MARGINS */
.m-0  { margin: 0 !important; }
.m-1  { margin: 0.25rem !important; }
.m-2  { margin: 0.5rem !important; }
.m-3  { margin: 1rem !important; }
.m-4  { margin: 1.5rem !important; }
.m-5  { margin: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.ms-0 { margin-left: 0 !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.ms-4 { margin-left: 1.5rem !important; }
.ms-5 { margin-left: 3rem !important; }

.me-0 { margin-right: 0 !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.me-4 { margin-right: 1.5rem !important; }
.me-5 { margin-right: 3rem !important; }

.mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
.mx-1 { margin-left: 0.25rem !important; margin-right: 0.25rem !important; }
.mx-2 { margin-left: 0.5rem !important; margin-right: 0.5rem !important; }
.mx-3 { margin-left: 1rem !important; margin-right: 1rem !important; }
.mx-4 { margin-left: 1.5rem !important; margin-right: 1.5rem !important; }
.mx-5 { margin-left: 3rem !important; margin-right: 3rem !important; }

.my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
.my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }
.my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; }

.m-auto  { margin: auto !important; }
.mt-auto { margin-top: auto !important; }
.mb-auto { margin-bottom: auto !important; }
.ms-auto { margin-left: auto !important; }
.me-auto { margin-right: auto !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.my-auto { margin-top: auto !important; margin-bottom: auto !important; }

/* PADDINGS */
.p-0  { padding: 0 !important; }
.p-1  { padding: 0.25rem !important; }
.p-2  { padding: 0.5rem !important; }
.p-3  { padding: 1rem !important; }
.p-4  { padding: 1.5rem !important; }
.p-5  { padding: 3rem !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pt-4 { padding-top: 1.5rem !important; }
.pt-5 { padding-top: 3rem !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.pb-5 { padding-bottom: 3rem !important; }

.ps-0 { padding-left: 0 !important; }
.ps-1 { padding-left: 0.25rem !important; }
.ps-2 { padding-left: 0.5rem !important; }
.ps-3 { padding-left: 1rem !important; }
.ps-4 { padding-left: 1.5rem !important; }
.ps-5 { padding-left: 3rem !important; }

.pe-0 { padding-right: 0 !important; }
.pe-1 { padding-right: 0.25rem !important; }
.pe-2 { padding-right: 0.5rem !important; }
.pe-3 { padding-right: 1rem !important; }
.pe-4 { padding-right: 1.5rem !important; }
.pe-5 { padding-right: 3rem !important; }

.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.px-5 { padding-left: 3rem !important; padding-right: 3rem !important; }

.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
