:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --dark: #1e1e2f;
    --gray: #64748b;
    --light: #f8fafc;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --radius: 20px;
    --radius-sm: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

.container { width: 90%; max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ========== Loading Spinner ========== */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading-spinner.show {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== Navbar ========== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active { color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 1rem; }

.cart-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--dark);
    transition: color 0.3s;
}

.cart-btn:hover { color: var(--primary); }

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
}

.hamburger { display: none; cursor: pointer; }
.bar { width: 25px; height: 3px; margin: 5px 0; background: var(--dark); transition: 0.3s; }

/* ========== Cart Sidebar ========== */
.cart-sidebar {
    position: fixed;
    top: 0;
    left: -400px;
    width: 380px;
    height: 100%;
    background: var(--white);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open { left: 0; }

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--gray);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.empty-cart {
    text-align: center;
    padding: 3rem;
    color: var(--gray);
}

.empty-cart i { font-size: 3rem; margin-bottom: 1rem; }

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-item-info h4 { font-size: 1rem; margin-bottom: 0.2rem; }
.cart-item-info p { color: var(--primary); font-weight: 600; }

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remove-item {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.3s;
}

.checkout-btn:hover { transform: translateY(-2px); }

/* ========== Hero ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 5% 60px;
    background: linear-gradient(135deg, #fff 0%, #f0f9ff 100%);
}

.hero-content { flex: 1; max-width: 600px; }
.hero-badge { display: inline-block; background: rgba(99, 102, 241, 0.1); color: var(--primary); padding: 0.5rem 1rem; border-radius: 50px; font-size: 0.8rem; margin-bottom: 1.5rem; }
.hero-title { font-size: 3.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; }
.highlight { color: var(--primary); }
.hero-description { font-size: 1.1rem; color: var(--gray); margin-bottom: 2rem; line-height: 1.8; }
.hero-buttons { display: flex; gap: 1rem; margin-bottom: 2rem; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 2rem; border-radius: 50px; text-decoration: none; font-weight: 600; transition: all 0.3s; cursor: pointer; border: none; }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-3px); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.hero-stats { display: flex; gap: 2rem; }
.stat { text-align: center; }
.stat-number { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.8rem; color: var(--gray); }

.hero-image { flex: 1; position: relative; min-height: 400px; }
.floating-cards { position: relative; }
.card { position: absolute; background: white; padding: 0.8rem 1.5rem; border-radius: 50px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px; font-weight: 600; animation: float 3s infinite; }
.card i { font-size: 1.2rem; }
.card-1 { top: 20%; right: 10%; animation-delay: 0s; }
.card-2 { bottom: 30%; left: 10%; animation-delay: 1s; }
.card-3 { top: 50%; left: 20%; animation-delay: 2s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

/* ========== Products ========== */
.products-section { padding: 80px 0; background: var(--white); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag { display: inline-block; background: rgba(99, 102, 241, 0.1); color: var(--primary); padding: 0.3rem 1rem; border-radius: 50px; font-size: 0.8rem; margin-bottom: 1rem; }
.section-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }
.section-subtitle { color: var(--gray); }

.product-filters { display: flex; justify-content: center; gap: 1rem; margin-bottom: 3rem; flex-wrap: wrap; }
.filter-btn { padding: 0.7rem 1.5rem; background: var(--light); border: none; border-radius: 50px; font-weight: 500; cursor: pointer; transition: all 0.3s; }
.filter-btn:hover, .filter-btn.active { background: var(--primary); color: white; }

.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid #eee;
    position: relative;
}

.product-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-content { padding: 1.5rem; }
.product-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.product-price { font-size: 1.8rem; font-weight: 800; color: var(--primary); margin: 0.5rem 0; }
.product-price span { font-size: 0.9rem; font-weight: normal; color: var(--gray); }
.product-duration { color: var(--gray); font-size: 0.9rem; margin-bottom: 1rem; }
.add-to-cart { width: 100%; padding: 0.8rem; background: var(--primary); color: white; border: none; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.add-to-cart:hover { background: var(--primary-dark); }

/* ========== Features ========== */
.features-section { padding: 80px 0; background: var(--light); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.feature-card { background: var(--white); padding: 2rem; border-radius: var(--radius); text-align: center; transition: all 0.3s; }
.feature-card:hover { transform: translateY(-5px); }
.feature-icon { width: 70px; height: 70px; background: rgba(99, 102, 241, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.feature-icon i { font-size: 2rem; color: var(--primary); }
.feature-card h3 { margin-bottom: 0.5rem; }
.feature-card p { color: var(--gray); }

/* ========== Testimonials ========== */
.testimonials-section { padding: 80px 0; background: var(--white); }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.testimonial-card { background: var(--light); padding: 1.5rem; border-radius: var(--radius); }
.stars { color: #fbbf24; margin-bottom: 1rem; }
.testimonial-card p { margin-bottom: 1rem; line-height: 1.7; }
.client strong { display: block; }
.client span { font-size: 0.8rem; color: var(--gray); }

/* ========== Contact ========== */
.contact-section { padding: 80px 0; background: var(--light); }
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.contact-info { background: var(--primary); padding: 3rem; color: white; }
.contact-info h2 { font-size: 2rem; margin-bottom: 1rem; }
.contact-info .highlight { color: white; text-decoration: underline; }
.contact-methods { margin: 2rem 0; }
.contact-method { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.contact-method i { font-size: 1.5rem; }
.support-buttons { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.whatsapp-large { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.8rem 1.5rem; border-radius: 50px; text-decoration: none; font-weight: 600; transition: transform 0.3s; }
.whatsapp-large.primary-wa { background: #25D366; color: white; }
.whatsapp-large.secondary-wa { background: #075E54; color: white; }
.whatsapp-large:hover { transform: translateY(-3px); }
.contact-form { padding: 3rem; }
.form-group { position: relative; margin-bottom: 2rem; }
.form-group input, .form-group textarea { width: 100%; padding: 1rem; border: 2px solid #eee; border-radius: 12px; font-family: 'Tajawal'; font-size: 1rem; transition: all 0.3s; background: transparent; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-group label { position: absolute; top: 1rem; right: 1rem; color: var(--gray); transition: all 0.3s; pointer-events: none; background: white; padding: 0 5px; }
.form-group input:focus ~ label, .form-group input:valid ~ label, .form-group textarea:focus ~ label, .form-group textarea:valid ~ label { top: -0.6rem; right: 0.8rem; font-size: 0.8rem; color: var(--primary); }

/* ========== Legal Links Section ========== */
.legal-links-section {
    padding: 2rem 0;
    background: var(--light);
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.legal-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.legal-links a {
    text-decoration: none;
    color: var(--gray);
    transition: color 0.3s;
    font-size: 0.9rem;
}

.legal-links a:hover {
    color: var(--primary);
}

/* ========== Footer ========== */
.footer { background: var(--dark); color: white; padding: 3rem 0 1rem; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; }
.footer-section p { color: #aaa; line-height: 1.7; }
.footer-section h4 { margin-bottom: 1rem; }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 0.5rem; }
.footer-section ul li a { color: #aaa; text-decoration: none; transition: color 0.3s; }
.footer-section ul li a:hover { color: var(--primary); }
.social-links { display: flex; gap: 1rem; }
.social-links a { width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; transition: all 0.3s; }
.social-links a:hover { background: var(--primary); transform: translateY(-3px); }
.footer-bottom { text-align: center; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); color: #888; }

/* ========== Modal ========== */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 2000; align-items: center; justify-content: center; }
.modal-content { background: white; border-radius: var(--radius); padding: 2rem; max-width: 450px; width: 90%; text-align: center; position: relative; animation: modalIn 0.3s; }
@keyframes modalIn { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
.close-modal { position: absolute; top: 1rem; left: 1rem; font-size: 1.5rem; cursor: pointer; color: var(--gray); }
.modal-icon i { font-size: 4rem; color: var(--primary); margin-bottom: 1rem; }

/* ========== Page Styles (Legal Pages) ========== */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 120px 0 60px;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    opacity: 0.9;
}

.page-content {
    padding: 60px 0;
    background: var(--light);
}

.content-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.content-card h2 {
    color: var(--primary);
    margin: 1.5rem 0 1rem;
    font-size: 1.5rem;
}

.content-card h2:first-of-type {
    margin-top: 0;
}

.content-card h3 {
    margin: 1rem 0 0.5rem;
    font-size: 1.2rem;
}

.content-card p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--gray);
}

.content-card ul, .content-card ol {
    margin: 1rem 0;
    padding-right: 1.5rem;
}

.content-card li {
    margin-bottom: 0.5rem;
    color: var(--gray);
}

.back-home {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.8rem 2rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s;
}

.back-home:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ========== FAQ Styles ========== */
.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: white;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid #eee;
}

.faq-question {
    padding: 1.2rem;
    background: white;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.faq-question:hover {
    background: #f8fafc;
}

.faq-question i {
    transition: transform 0.3s;
    color: var(--primary);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.2rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
    background: #f8fafc;
    color: var(--gray);
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    padding: 1.2rem;
    max-height: 300px;
}

/* ========== Responsive ========== */
@media (max-width: 992px) {
    .hero { flex-direction: column; text-align: center; }
    .hero-content { max-width: 100%; margin-bottom: 3rem; }
    .hero-buttons, .hero-stats { justify-content: center; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .hero-title { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-menu { position: fixed; top: 70px; right: -100%; flex-direction: column; background: white; width: 100%; text-align: center; transition: 0.3s; padding: 2rem; box-shadow: var(--shadow); }
    .nav-menu.active { right: 0; }
    .nav-item { margin: 1rem 0; }
    .cart-sidebar { width: 100%; left: -100%; }
    .products-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 2rem; }
    .floating-cards { display: none; }
    .legal-links { gap: 1rem; }
    .legal-links a { font-size: 0.8rem; }
}

@media (max-width: 576px) {
    .hero-buttons { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .contact-info, .contact-form { padding: 2rem; }
}