@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&display=swap');

:root {
    /* Colors */
    --primary: #2C3E50;
    --secondary: #D4AF37;
    --accent: #8B4513;
    --background: #F8F9FA;
    --surface: #FFFFFF;
    --text-primary: #2C3E50;
    --text-secondary: #6C757D;
    --text-light: #ADB5BD;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Header adjustments */
    --header-height: 70px; /* Adjust this value based on your header's actual height */
    --gold-rgb: 190, 147, 49;
    --gold-dark: #9e7a26;
    --bg-light: #f8f9fa;
    --text-align: right;
    --float: right;
    --transform-direction: 1;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    padding-top: var(--header-height);
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    width: 120px;
    height: auto;
}

.logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: var(--spacing-xl);
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary);
    background: rgba(212, 175, 55, 0.1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.nav-actions button,
.nav-actions a {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.nav-actions button:hover,
.nav-actions a:hover {
    color: var(--secondary);
    background: rgba(212, 175, 55, 0.1);
}

.cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.cart-btn .cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cart-btn.bounce {
    animation: cartBounce 0.5s cubic-bezier(0.36, 0, 0.66, -0.56) forwards;
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1.4); }
    75% { transform: scale(1.2); }
}

.toggle-btn {
    display: none;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    padding: 6rem 2rem 2rem;
    display: flex;
    align-items: center;
    background: linear-gradient(to bottom, var(--bg-gradient-start), var(--bg-gradient-end));
    overflow: hidden;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.hero-text {
    padding-right: var(--spacing-2xl);
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-lg);
    color: var(--primary);
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
}

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

.btn-primary:hover {
    background: #C19B2E;
    transform: translateY(-2px);
}

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

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

.hero-image {
    position: relative;
    width: 100%;
    height: 600px;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.floating-elements img {
    position: absolute;
    width: 150px;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.float-1 {
    top: 10%;
    right: -50px;
    transform: rotate(10deg);
}

.float-2 {
    bottom: 20%;
    right: -30px;
    transform: rotate(-5deg);
}

.float-3 {
    top: 50%;
    left: -30px;
    transform: rotate(5deg);
}

/* Products Section */
.products {
    padding: var(--spacing-2xl) var(--spacing-lg);
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

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

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

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

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

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

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

.product-info {
    padding: var(--spacing-lg);
    text-align: center;
}

.product-info h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
    color: var(--primary);
}

.product-info p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.price {
    display: block;
    color: var(--secondary);
    font-size: 1.2rem;
    font-weight: 700;
}

.view-all {
    text-align: center;
    margin-top: var(--spacing-2xl);
}

/* About Section */
.about {
    background: var(--surface);
    padding: var(--spacing-2xl) var(--spacing-lg);
}

.about-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.about-text {
    padding-right: var(--spacing-2xl);
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: var(--spacing-lg);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

.about-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.feature {
    text-align: center;
}

.feature i {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: var(--spacing-sm);
}

.feature h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: var(--spacing-xs);
}

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

.about-image {
    position: relative;
    height: 500px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

/* Contact Section */
.contact {
    padding: 80px 0;
    background: linear-gradient(to bottom, var(--bg-light) 0%, #fff 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.contact-info {
    text-align: var(--text-align);
}

.contact-info h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 600;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contact-method {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: var(--text-align);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 200px;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.contact-method:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--gold-color);
}

.contact-method i {
    font-size: 2.5rem;
    color: var(--gold-color);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.contact-method:hover i {
    transform: scale(1.1);
}

.contact-method h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 600;
}

.contact-method a,
.footer-contact a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    padding: 8px 15px;
    border-radius: 8px;
    background: rgba(var(--gold-rgb), 0.1);
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-method a:hover,
.footer-contact a:hover {
    color: var(--gold-color);
    background: rgba(var(--gold-rgb), 0.15);
    transform: translateY(-2px);
}

.contact-method p,
.footer-contact p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    width: 100%;
    justify-content: center;
}

.contact-method i,
.footer-contact i {
    color: var(--gold-color);
    width: 24px;
    text-align: center;
}

.contact-form {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--gold-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.1);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.contact-form .btn-primary {
    width: 100%;
    padding: 15px 30px;
    font-size: 1.2rem;
    margin-top: 10px;
    border-radius: 10px;
    background: #D4AF37;  /* Static gold color */
    color: #000000;  /* Black text for better contrast */
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;  /* Bolder text */
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);  /* Permanent shadow for depth */
}

.contact-form .btn-primary:hover {
    background: #C5A028;  /* Slightly darker on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.contact-form .btn-primary:active {
    transform: translateY(0);
    background: #B89020;  /* Even darker when clicked */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Footer */
.footer {
    background: var(--primary);
    color: white;
    padding: var(--spacing-2xl) var(--spacing-lg) var(--spacing-lg);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
}

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

.footer-logo {
    width: 150px;
    margin-bottom: var(--spacing-md);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: color var(--transition-fast);
}

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

.footer-links h4,
.footer-contact h4 {
    color: var(--secondary);
    margin-bottom: var(--spacing-lg);
    font-size: 1.2rem;
}

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

.footer-links a {
    color: white;
    text-decoration: none;
    display: block;
    padding: var(--spacing-xs) 0;
    transition: color var(--transition-fast);
}

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

.footer-contact p {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

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

.footer-bottom {
    max-width: 1400px;
    margin: var(--spacing-xl) auto 0;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: var(--text-light);
}

/* Messages */
.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    background: white;
    box-shadow: var(--shadow-md);
    animation: slideDown 0.3s ease;
}

.message.success {
    border-left: 4px solid #28a745;
}

.message.error {
    border-left: 4px solid #dc3545;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.message-content i {
    font-size: 1.5rem;
}

.message.success i {
    color: #28a745;
}

.message.error i {
    color: #dc3545;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.85); /* Darker, themed background */
    backdrop-filter: blur(8px);
    display: flex; /* Always flex, control with opacity */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none; /* Block clicks only when active */
    transition: opacity 0.3s ease-in-out;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #FFFFFF; /* White text for contrast */
}

.loading-content .spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.2); /* Faint white track */
    border-top-color: var(--secondary); /* Gold accent for spinner */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* Success Overlay */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.success-overlay.active {
    display: flex;
    opacity: 1;
}

.success-content {
    background-color: var(--surface);
    padding: 2rem 3rem;
    border-radius: var(--radius-lg);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-lg);
    max-width: 90%;
    width: 400px;
}

.success-overlay.active .success-content {
    transform: scale(1);
}

.success-content i.fa-check-circle {
    font-size: 4rem;
    color: #28a745;
}

.success-content h2 {
    font-size: 1.75rem;
    margin: 1rem 0 0.5rem;
    color: var(--primary);
}

.success-content p {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Toast Notification System */
#toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    align-items: center;
}

.toast {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 22px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    background-color: var(--surface);
    color: var(--text-primary);
    border-left: 5px solid;
    min-width: 320px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.21, 1.02, 0.73, 1);
}

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

.toast i {
    font-size: 1.5rem;
}

.toast p {
    margin: 0;
    font-weight: 500;
}

.toast.success { border-color: #28a745; }
.toast.success i { color: #28a745; }

.toast.error { border-color: #dc3545; }
.toast.error i { color: #dc3545; }

.toast.info { border-color: #17a2b8; }
.toast.info i { color: #17a2b8; }


.order-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.order-success-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.order-success-content i {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.order-success-content h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.order-success-content p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.order-success-content button {
    margin-top: 1.5rem;
}

/* Cart Quantity Buttons */
.quantity-btn {
    width: 35px;
    height: 35px;
    border: 2px solid var(--secondary);
    background: white;
    color: var(--secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

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

.quantity-btn i {
    font-size: 0.9rem;
}

/* Add to Cart Animation */
@keyframes addedToCart {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.add-to-cart.added {
    animation: addedToCart 1s ease;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .about-image {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 8rem; /* Increased padding to account for fixed navbar */
        min-height: calc(100vh - var(--header-height));
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-text {
        order: 1;
        width: 100%;
        padding: 0;
    }

    .hero-image {
        order: 2;
        width: 100%;
        margin-top: 2rem;
    }

    .hero-text h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .hero-text p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .floating-elements {
        display: none; /* Hide floating elements on mobile for better performance */
    }

    .toggle-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        align-items: center;
        padding: var(--spacing-xl);
        transition: right var(--transition-normal);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
    }

    /* Header adjustments for mobile */
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: var(--bg-color);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .navbar {
        padding: 1rem;
    }

    /* Ensure the content doesn't hide under fixed header */
    body {
        padding-top: var(--header-height);
    }

    main {
        position: relative;
        z-index: 1;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        height: 250px;
    }
}

/* RTL Specific Styles */
.lang-toggle {
    display: none !important;
}

/* Remove RTL-specific styles since we're only using RTL */
[dir="rtl"] {
    --text-align: right;
    --float: right;
    --transform-direction: 1;
}

[dir="rtl"] .hero-text {
    padding-right: 0;
    padding-left: var(--spacing-2xl);
}

[dir="rtl"] .nav-links {
    padding-right: 0;
}

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

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

[dir="rtl"] .contact-method,
[dir="rtl"] .contact-method i {
    margin-right: 0;
    margin-left: var(--spacing-md);
}

[dir="rtl"] .contact-method i {
    margin-left: var(--spacing-md);
}

[dir="rtl"] .contact-form input,
[dir="rtl"] .contact-form textarea {
    text-align: right;
}

[dir="rtl"] .toast-container {
    left: auto;
    right: var(--spacing-lg);
}

[dir="rtl"] .toast {
    padding-right: var(--spacing-lg);
    padding-left: var(--spacing-md);
}

[dir="rtl"] .toast.success {
    border-right: 4px solid #28a745;
}

[dir="rtl"] .toast.error {
    border-right: 4px solid #dc3545;
}

[dir="rtl"] .toast {
    animation: slideInRtl 0.3s ease forwards;
}

[dir="rtl"] .toast[style*="animation: slideOut"] {
    animation: slideOutRtl 0.3s ease forwards;
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-10px) rotate(5deg); }
    100% { transform: translateY(0) rotate(0); }
}

.float-1, .float-2, .float-3 {
    animation: float 6s ease-in-out infinite;
}

.float-2 {
    animation-delay: -2s;
}

.float-3 {
    animation-delay: -4s;
}

/* Search Styles */
.search-wrapper {
    position: relative;
    margin-right: 1rem;
}

.search-toggle-btn {
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.2rem;
}

.search-container {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem;
    display: none;
    z-index: 1000;
}

.search-container.active {
    display: block;
}

.search-form {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
}

.search-input {
    flex: 1;
    border: none;
    background: none;
    padding: 0.5rem;
    font-size: 14px;
    color: #333;
    outline: none;
}

.search-input::placeholder {
    color: #718096;
}

.search-clear,
.search-submit {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #718096;
}

.search-clear {
    display: none;
}

.search-clear.visible {
    display: block;
}

.search-results {
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.search-loading {
    display: none;
    padding: 1rem;
    text-align: center;
}

.search-loading.active {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #D4B08C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.search-results-header {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}

.search-result-item {
    display: flex;
    padding: 1rem;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}

.search-result-item:hover,
.search-result-item[aria-selected="true"] {
    background-color: #f8f9fa;
}

.search-result-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.search-result-info {
    flex: 1;
}

.search-result-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.search-result-category {
    color: #718096;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.search-result-price {
    color: #D4B08C;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.search-result-features {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-result-feature {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #64748b;
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: #718096;
}

.search-no-results i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.search-recent {
    padding: 1rem;
}

.search-recent h3 {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #718096;
}

.search-recent ul {
    list-style: none;
    padding: 0;
}

.search-recent-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    text-align: right;
}

.search-recent-item:hover {
    background-color: #f8f9fa;
}

mark {
    background-color: rgba(212, 176, 140, 0.2);
    color: inherit;
    padding: 0 0.25rem;
    border-radius: 2px;
}

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

@media (max-width: 768px) {
    .search-container {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        width: 100%;
        margin: 0;
        border-radius: 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
}

/* Language Toggle Styles */
.lang-toggle {
    background: none;
    border: 2px solid var(--secondary);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.lang-toggle:hover {
    background: var(--secondary);
    color: white;
}

.lang-toggle i {
    font-size: 1rem;
}

/* RTL Language Toggle Adjustments */
[dir="rtl"] .lang-toggle {
    margin-left: 0;
    margin-right: 1rem;
}

/* Responsive styles for contact section */
@media (max-width: 1024px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-methods {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .contact {
        padding: 60px 0;
    }
    
    .contact-content {
        padding: 0 15px;
    }
    
    .contact-info h2 {
        font-size: 2rem;
    }
    
    .contact-method {
        padding: 25px;
        min-height: 180px;
    }
    
    .contact-form {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .contact-method {
        min-height: 160px;
    }
    
    .contact-method a {
        font-size: 1rem;
        padding: 6px 12px;
    }
    
    .contact-info h2 {
        font-size: 1.8rem;
    }
    
    .contact-form .btn-primary {
        font-size: 1.1rem;
        padding: 12px 25px;
    }
}

/* RTL specific adjustments for contact section */
[dir="rtl"] .contact-method i {
    margin-left: 8px;
    margin-right: 0;
}

[dir="rtl"] .contact-form input,
[dir="rtl"] .contact-form textarea {
    text-align: right;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s forwards;
    min-width: 300px;
    max-width: 400px;
}

.toast.success {
    border-right: 4px solid #4CAF50;
}

.toast.error {
    border-right: 4px solid #F44336;
}

.toast i {
    font-size: 20px;
}

.toast.success i {
    color: #4CAF50;
}

.toast.error i {
    color: #F44336;
}

.toast-message {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

[dir="rtl"] .toast-container {
    right: auto;
    left: 20px;
}

[dir="rtl"] .toast {
    border-right: none;
    border-left: 4px solid transparent;
}

[dir="rtl"] .toast.success {
    border-left-color: #4CAF50;
}

[dir="rtl"] .toast.error {
    border-left-color: #F44336;
}

@keyframes slideInRtl {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRtl {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

[dir="rtl"] .toast {
    animation-name: slideInRtl;
}

[dir="rtl"] .toast[style*="animation: slideOut"] {
    animation-name: slideOutRtl;
}
