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

:root {
    --primary-color: #d4a574;
    --primary-dark: #b8935f;
    --secondary-color: #f5e6d3;
    --accent-color: #8b7355;
    --text-dark: #2c2c2c;
    --text-light: #666;
    --white: #ffffff;
    --light-bg: #faf8f5;
    --border-color: #e8e0d5;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.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-hover);
}

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

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

.btn-outline {
    background-color: var(--white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

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

/* Navigation */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 28px;
}

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

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

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

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

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

.nav-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.icon-btn {
    font-size: 20px;
    color: var(--text-dark);
    transition: var(--transition);
    position: relative;
}

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

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

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background-color: var(--text-dark);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
    align-items: center;
    min-height: 80vh;
}

.hero-content h1 {
    font-size: 56px;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.hero-content p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: 20px;
    box-shadow: var(--shadow-hover);
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

/* Categories */
.categories {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.category-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
}

.category-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--white);
}

.category-overlay h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

/* Products */
.featured-products {
    padding: 80px 20px;
    background-color: var(--light-bg);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

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

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

.product-image {
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.product-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

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

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--primary-color);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.product-name {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.product-name-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: var(--transition);
}

.product-name-link:hover .product-name {
    color: var(--primary-color);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.original-price {
    font-size: 16px;
    color: var(--text-light);
    text-decoration: line-through;
}

.add-to-cart {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.add-to-cart:hover {
    background-color: var(--primary-dark);
}

/* Promo Banner */
.promo-banner {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--light-bg) 100%);
    padding: 80px 20px;
    text-align: center;
}

.promo-content {
    max-width: 600px;
    margin: 0 auto;
}

.promo-tag {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.promo-content h2 {
    font-size: 42px;
    margin-bottom: 15px;
}

.promo-content p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Benefits */
.benefits {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
}

.benefit-item {
    text-align: center;
    padding: 30px;
}

.benefit-item i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.benefit-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.benefit-item p {
    color: var(--text-light);
}

/* Testimonials */
.testimonials {
    padding: 80px 20px;
    background-color: var(--light-bg);
}

.testimonial-slider {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-card {
    background-color: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.stars {
    color: #ffc107;
    margin-bottom: 20px;
}

.testimonial-card p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.testimonial-author h4 {
    font-size: 16px;
    margin-bottom: 3px;
}

.testimonial-author span {
    font-size: 14px;
    color: var(--text-light);
}

/* Newsletter */
.newsletter {
    padding: 80px 20px;
    background-color: var(--primary-color);
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    color: var(--white);
}

.newsletter-content h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.newsletter-content p {
    margin-bottom: 30px;
    opacity: 0.9;
}

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

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
}

.newsletter-form button {
    padding: 15px 30px;
    background-color: var(--text-dark);
    color: var(--white);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background-color: var(--white);
    color: var(--text-dark);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
    line-height: 1.8;
}

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

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

.social-links a:hover {
    background-color: var(--primary-color);
}

.footer-links h4,
.footer-contact h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-contact p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact i {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
}

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

/* Products Page */
.page-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--light-bg) 100%);
    padding: 60px 20px;
    text-align: center;
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

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

.breadcrumb a {
    color: var(--primary-color);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.products-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
}

.sidebar {
    background-color: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    height: fit-content;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group h4 {
    margin-bottom: 15px;
    font-size: 18px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.price-range {
    display: flex;
    gap: 10px;
    align-items: center;
}

.price-range input {
    width: 80px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Cart Page */
.cart-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.cart-items {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    padding: 30px;
}

.cart-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    margin-bottom: 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-product img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-product h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.cart-product span {
    font-size: 14px;
    color: var(--text-light);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

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

.quantity-control span {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.remove-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}

.remove-btn:hover {
    transform: scale(1.1);
}

.cart-summary {
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    padding: 30px;
    height: fit-content;
}

.cart-summary h3 {
    margin-bottom: 20px;
    font-size: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.summary-row.total {
    border-bottom: none;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 20px;
}

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

.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart i {
    font-size: 80px;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-cart h2 {
    margin-bottom: 15px;
}

.empty-cart p {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 60px 20px;
    }
    
    .hero-content h1 {
        font-size: 42px;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-image {
        order: -1;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .benefits {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonial-slider {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-section {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cart-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .cart-header {
        display: none;
    }
    
    .cart-item {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
    
    .cart-product {
        flex-direction: column;
    }
    
    .quantity-control {
        justify-content: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card,
.category-card,
.testimonial-card,
.benefit-item {
    animation: fadeInUp 0.6s ease forwards;
}

/* RTL Support */
[dir="rtl"] .product-badge {
    left: auto;
    right: 15px;
}

[dir="rtl"] .product-actions {
    right: auto;
    left: 15px;
}

[dir="rtl"] .cart-count {
    right: auto;
    left: -8px;
}

[dir="rtl"] .nav-links a::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .logo {
    font-family: 'Cairo', serif; /* Or keep Playfair if English brand name is desired, but user said translate everything */
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
    font-family: 'Cairo', serif;
}

[dir="rtl"] .benefit-item i {
    /* Flipping icons if needed, but mostly they are fine */
}

[dir="rtl"] .newsletter-form input {
    /* text-align: right is default in RTL context for input usually, but we can force it */
    text-align: right;
    border-radius: 0 30px 30px 0;
}

[dir="rtl"] .newsletter-form button {
    border-radius: 30px 0 0 30px;
}

[dir="rtl"] .page-header {
    /* alignments usually handle themselves with 'text-align: center' */
}

/* Fix product grid and other grids if they rely on order */
/* Grid handles RTL automatically for column order usually */

/* Fix absolute positions in headers or specific items */

/* Flip margins for specific directional spacing if found */
[dir="rtl"] .logo {
    gap: 10px; /* gap is direction independent */
}

[dir="rtl"] .nav-links {
    gap: 30px;
}

[dir="rtl"] .testimonial-author {
    text-align: right;
}

[dir="rtl"] .footer-links ul {
    padding-right: 0; /* Clear default padding if any */
    padding-left: 0;
}

/* Ensure font is applied everywhere */
[dir="rtl"] * {
    font-family: 'Cairo', sans-serif;
}
