:root {
    /* User Defined */
    --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);

    /* Mappings */
    --primary-color: var(--primary);
    --primary-dark: var(--secondary);
    --text-color: var(--text-dark);
    --light-bg: #f9f9f9;
    --white: #fff;
    --footer-bg: var(--secondary);
    --red: #e74c3c;
    --green: #2ecc71;
    --font-main: 'Cairo', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--white);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-padding {
    padding: 60px 0;
}

.bg-light {
    background-color: var(--light-bg);
}

.text-center {
    text-align: center;
}

/* Tipography & Buttons */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    margin-bottom: 15px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--text-color);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outlined {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outlined:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Header */
.main-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--text-color);
}

.logo span {
    color: var(--primary-color);
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.search-bar form {
    display: flex;
    background: var(--light-bg);
    border-radius: 30px;
    padding: 5px 15px;
}

.search-bar input {
    border: none;
    background: transparent;
    flex: 1;
    padding: 8px;
    outline: none;
    font-family: var(--font-main);
}

.search-bar button {
    border: none;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
}

.user-actions {
    display: flex;
    gap: 20px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9rem;
    position: relative;
}

.action-btn i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.action-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--red);
    color: var(--white);
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px 0;
}

.main-nav a {
    font-weight: 600;
    font-size: 1.1rem;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Slider */
.hero-slider .swiper-slide {
    height: 500px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.hero-slider .slide-content {
    position: absolute;
    top: 50%;
    right: 18%;
    /* Starts from right due to RTL */
    transform: translateY(-50%);
    width: 40%;
    color: var(--text-color);
    /* Adjust based on bg */
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: var(--radius);
}

.hero-slider h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

/* Categories Brief */
.cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.cat-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

.cat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.cat-card .icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Products Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
    transition: 0.3s;
    margin: 10px;
}

.product-card:hover .prod-img img {
    transform: scale(1.05);
}

.prod-img {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.prod-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.badge-new,
.badge-sale {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--green);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 2;
}

.badge-sale {
    background: var(--red);
}

.actions {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    transition: 0.3s;
    padding-bottom: 10px;
}

.product-card:hover .actions {
    bottom: 0;
}

.btn-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--white);
    border: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-icon:hover {
    background: var(--primary-color);
    color: var(--white);
}

.prod-info {
    padding: 15px;
    text-align: center;
}

.cat-name {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.prod-info h4 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.price .old {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
    margin-right: 10px;
}

/* Promo Section */
.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.promo-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
}

.promo-img {
    width: 50%;
    position: relative;
}

.promo-content {
    width: 50%;
    padding: 20px;
}

/* Reviews */
.review-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    margin: 20px;
    box-shadow: var(--shadow);
}

.review-card .stars {
    color: gold;
    margin-bottom: 15px;
}

.review-card .comment {
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
}

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.blog-img {
    height: 200px;
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-content {
    padding: 20px;
}

.blog-content h3 {
    font-size: 1.1rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 10px;
    display: inline-block;
}

/* Footer */
.main-footer {
    background: var(--footer-bg);
    color: #ccc;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li i {
    margin-left: 10px;
    color: var(--primary-color);
}

.social-links a {
    color: var(--white);
    margin-left: 15px;
    font-size: 1.2rem;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
    }

    .search-bar {
        order: 3;
        width: 100%;
        margin: 15px 0 0;
        max-width: none;
    }

    .main-nav {
        display: none;
        background: var(--white);
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        padding: 0;
    }

    .main-nav a {
        display: block;
        padding: 15px;
        border-bottom: 1px solid #eee;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-slider .slide-content {
        width: 90%;
        right: 5%;
    }

    .hero-slider h2 {
        font-size: 1.5rem;
    }

    .promo-card {
        flex-direction: column;
    }

    .promo-img,
    .promo-content {
        width: 100%;
    }
}

/* Inner Pages Styles */

/* Breadcrumb */
.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.breadcrumb li::after {
    content: '/';
    margin-right: 10px;
    color: #ccc;
}

.breadcrumb li:last-child::after {
    display: none;
}

/* Products Grid generic */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* Product Details */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.prod-title {
    font-size: 2rem;
    margin-bottom: 15px;
}

.prod-price-box {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.prod-desc {
    margin-bottom: 30px;
    color: #666;
}

.prod-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.quantity-control {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 30px;
    overflow: hidden;
}

.qty-btn {
    background: #f5f5f5;
    border: none;
    width: 40px;
    font-size: 1.2rem;
    cursor: pointer;
}

.qty-input {
    width: 50px;
    border: none;
    text-align: center;
    font-weight: 600;
}

.btn-lg {
    padding: 12px 40px;
    font-size: 1.1rem;
}

.prod-meta p {
    margin-bottom: 10px;
    color: #777;
}

@media (max-width: 768px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
}

/* Article Page */
.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}