/* Custom properties for Light and Dark modes */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.1);
    --accent: #e11d48;
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.65);
    --card-border: rgba(255, 255, 255, 0.8);
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --shadow-lg: 0 20px 40px 0 rgba(31, 38, 135, 0.15);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font-main: 'Vazirmatn', sans-serif;
}

[data-theme="dark"] {
    --bg-main: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.65);
    --card-border: rgba(255, 255, 255, 0.05);
    --text-dark: #f8fafc;
    --text-muted: #94a3b8;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px 0 rgba(0, 0, 0, 0.5);
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --primary-light: rgba(99, 102, 241, 0.2);
    --accent: #fb7185;
}

/* Base resets & styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* Animated Global Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}
.bg-blob {
    position: absolute;
    filter: blur(90px);
    opacity: 0.65;
    border-radius: 50%;
    animation: moveBlobs 20s infinite alternate ease-in-out;
}
[data-theme="dark"] .bg-blob {
    opacity: 0.25;
}
.blob-1 {
    top: -10%; left: -10%; width: 50vw; height: 50vw;
    background: var(--primary); animation-delay: 0s;
}
.blob-2 {
    bottom: -10%; right: -10%; width: 60vw; height: 60vw;
    background: var(--accent); animation-delay: -5s;
}
.blob-3 {
    top: 30%; left: 30%; width: 45vw; height: 45vw;
    background: var(--primary-light); animation-delay: -10s;
}
@keyframes moveBlobs {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15%, 20%) scale(1.1); }
    100% { transform: translate(-10%, -15%) scale(0.9); }
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1300px; margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 10px; padding: 14px 32px; border-radius: 50px;
    font-weight: 700; font-size: 1rem; cursor: pointer;
    transition: var(--transition); border: 2px solid transparent;
    overflow: hidden; position: relative; z-index: 1;
}
.btn-primary {
    background: var(--primary); color: white;
}
.btn-primary::before {
    content: ''; position: absolute; top: 0; left: 0; width: 0; height: 100%;
    background: var(--primary-hover); z-index: -1; transition: var(--transition);
}
.btn-primary:hover::before { width: 100%; }
.btn-primary:hover { transform: translateY(-3px); color: white; }

.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-block { width: 100%; }

/* Navbar */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    padding: 24px 0; transition: var(--transition);
}
.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md);
    padding: 15px 0;
    border-bottom: 1px solid var(--card-border);
}
[data-theme="dark"] .navbar.scrolled {
    background-color: rgba(15, 23, 42, 0.7);
}
.nav-content { display: flex; align-items: center; justify-content: space-between; }
.logo {
    display: flex; align-items: center; gap: 8px; font-size: 1.6rem; font-weight: 800;
    color: var(--primary); background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.logo i { font-size: 2.2rem; color: var(--primary); -webkit-text-fill-color: initial; }
.nav-links { display: flex; gap: 36px; }
.nav-links a { font-weight: 600; font-size: 1.05rem; position: relative; }
.nav-links a::after {
    content: ''; position: absolute; bottom: -6px; right: 0; width: 0; height: 3px;
    background: var(--primary); border-radius: 4px; transition: var(--transition);
}
.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after { width: 100%; left: 0; right: auto; }

.nav-actions { display: flex; align-items: center; gap: 16px; }
.icon-btn {
    background: var(--bg-card); border: 1px solid var(--card-border);
    color: var(--text-dark); width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; cursor: pointer; transition: var(--transition); position: relative;
}
.icon-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.badge {
    position: absolute; top: -4px; right: -4px; background: var(--accent); color: white;
    font-size: 0.75rem; font-weight: 800; width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-card);
}
.mobile-menu-btn { display: none; }

/* Sections */
.section { padding: 120px 0; }
.section-bg { background-color: var(--bg-card); }
.section-header { text-align: center; margin-bottom: 70px; }
.section-header h2 { font-size: 2.8rem; margin-bottom: 16px; position: relative; display: inline-block; }
.section-header p { color: var(--text-muted); font-size: 1.2rem; max-width: 600px; margin: 0 auto; }

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: url('https://images.unsplash.com/photo-1441984904996-e0b6ba687e04?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    background-attachment: fixed;
    padding-top: 80px;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(248, 250, 252, 0.95) 0%, rgba(248, 250, 252, 0.5) 50%, rgba(248, 250, 252, 0) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: -1;
    transition: var(--transition);
}

[data-theme="dark"] .hero-overlay {
    background: linear-gradient(to left, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.6) 50%, rgba(15, 23, 42, 0) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-visual {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: flex-end;
}

.hero-left-img {
    width: 100%;
    max-width: 480px;
    height: 550px;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
    border: 4px solid rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .hero-left-img {
    border-color: rgba(255, 255, 255, 0.05);
}

.hero-visual::before {
    content: '';
    position: absolute;
    top: -20px;
    right: 15%;
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0.3;
    border-radius: 30px;
    z-index: 1;
    transform: rotate(-3deg);
    filter: blur(4px);
}

.hero-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 24px;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

[data-theme="dark"] .hero-badge {
    color: var(--text-dark);
    background: var(--primary);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--text-dark);
    line-height: 1.3;
}

.hero h1 span {
    color: var(--primary);
    position: relative;
    display: inline-block;
}
.hero h1 span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 12px;
    background: var(--accent);
    opacity: 0.3;
    z-index: -1;
    border-radius: 4px;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

/* Categories */
.categories-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.category-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}
.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}
.category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.category-overlay {
    position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.1) 100%);
    display: flex; align-items: flex-end; padding: 24px;
}
.category-content { color: white; width: 100%; display: flex; justify-content: space-between; align-items: center;}
.category-content h3 { font-size: 1.6rem; font-weight: 800;}
.category-content i { font-size: 1.5rem; transform: translateX(20px); opacity: 0; transition: var(--transition); }
.category-card:hover img { transform: scale(1.1); }
.category-card:hover .category-content i { transform: translateX(0); opacity: 1; }

/* Products Grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 32px; }
.product-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}
.product-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-lg);
}
.product-image { position: relative; height: 380px; overflow: hidden; background: #f0f0f0; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease; }
.product-card:hover .product-image img { transform: scale(1.1); }
.product-badges { position: absolute; top: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.badge-tag { padding: 6px 14px; border-radius: 50px; font-size: 0.8rem; font-weight: 700; color: white; box-shadow: var(--shadow-sm); }
.badge-tag.new { background: #10b981; }
.badge-tag.sale { background: var(--accent); }
.product-actions {
    position: absolute; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center; gap: 16px;
    opacity: 0; transition: var(--transition);
}
.product-card:hover .product-actions { opacity: 1; }
.action-btn-circle {
    width: 50px; height: 50px; border-radius: 50%; background: white; color: var(--text-dark);
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
    border: none; cursor: pointer; transition: var(--transition); transform: translateY(20px);
}
.product-card:hover .action-btn-circle { transform: translateY(0); }
.action-btn-circle:hover { background: var(--primary); color: white; transform: scale(1.1); }

.product-info { padding: 24px; }
.product-category { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.product-title { font-size: 1.25rem; margin-bottom: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-price-wrapper { display: flex; align-items: center; gap: 12px; }
.product-price { color: var(--primary); font-weight: 800; font-size: 1.3rem; }
.product-old-price { color: var(--text-muted); text-decoration: line-through; font-size: 0.95rem; }

/* Features */
.features {
    background-color: transparent;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.feature-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}
.feature-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-lg);
}
.feature-icon {
    width: 90px; height: 90px; margin: 0 auto 24px; border-radius: 50%;
    background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center;
    font-size: 3rem; transition: var(--transition);
}
.feature-card:hover .feature-icon { background: var(--primary); color: white; transform: rotateY(180deg); }
.feature-card h3 { font-size: 1.4rem; margin-bottom: 16px; }
.feature-card p { color: var(--text-muted); }

/* Newsletter */
.newsletter {
    position: relative;
    background: url('https://images.unsplash.com/photo-1490481651871-ab68de25d43d?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover fixed no-repeat;
    padding: 100px 0;
    color: white;
    text-align: center;
    z-index: 1;
}
.newsletter::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.9), rgba(225, 29, 72, 0.9));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: -1;
}
.newsletter h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}
.newsletter-content { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }
.newsletter-content p { font-size: 1.1rem; margin-bottom: 40px; opacity: 0.9; }
.newsletter-form { display: flex; gap: 12px; }
.newsletter-form input {
    flex: 1; padding: 16px 24px; border-radius: 50px; border: none; font-size: 1rem; font-family: inherit; outline: none; box-shadow: var(--shadow-sm);
}
.newsletter-form button {
    padding: 16px 40px; border-radius: 50px; border: none; background: var(--accent); color: white; font-weight: 700; font-size: 1rem; cursor: pointer; transition: var(--transition); box-shadow: var(--shadow-md);
}
.newsletter-form button:hover { background: #be123c; transform: translateY(-2px); }

/* About & Contact */
.about-section { background: var(--bg-card); }
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text h2 { font-size: 2.5rem; margin-bottom: 24px; }
.about-text p { color: var(--text-muted); margin-bottom: 20px; font-size: 1.1rem; }
.about-stats { display: flex; gap: 30px; margin-top: 40px; }
.about-stats li { display: flex; flex-direction: column; }
.about-stats strong { font-size: 2.2rem; color: var(--primary); line-height: 1.2; font-weight: 800;}
.about-stats span { color: var(--text-muted); font-size: 0.9rem; font-weight: 600; }
.about-image { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-image img { width: 100%; transition: transform 0.5s; }
.about-image:hover img { transform: scale(1.05); }

.contact-section { background: var(--bg-section); }
.contact-content { display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; }
.info-item { display: flex; gap: 20px; margin-bottom: 30px; }
.info-item .icon {
    width: 60px; height: 60px; background: var(--bg-card); color: var(--primary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color);
}
.info-item h4 { margin-bottom: 4px; font-size: 1.2rem; }
.info-item p { color: var(--text-muted); }
.contact-form {
    background: var(--bg-card); padding: 50px; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); border: 1px solid var(--border-color);
}
.form-group { margin-bottom: 24px; }
.form-group input, .form-group textarea {
    width: 100%; padding: 18px; border: 2px solid var(--border-color); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 1rem; background: var(--bg-section); color: var(--text-dark); transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); background: var(--bg-card); box-shadow: 0 0 0 4px var(--primary-light);
}

/* Footer */
.footer { background: #020617; color: white; padding-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 60px; }
.footer-brand .logo {
    color: white; margin-bottom: 20px; display: inline-flex;
    background: linear-gradient(135deg, #818cf8, #fb7185); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.footer-brand p { color: #94a3b8; margin-bottom: 24px; max-width: 300px; }
.social-links { display: flex; gap: 16px; }
.social-links a {
    width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
    color: white; transition: var(--transition); border: 1px solid rgba(255,255,255,0.1);
}
.social-links a:hover { background: var(--primary); transform: translateY(-5px); border-color: var(--primary); }
.footer h3 { font-size: 1.3rem; margin-bottom: 24px; color: white; }
.footer-links ul { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: #94a3b8; }
.footer-links a:hover { color: var(--accent); padding-right: 8px; }
.cert-images { display: flex; gap: 16px; }
.cert-box {
    background: rgba(255,255,255,0.05); border-radius: var(--radius-sm); padding: 12px;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: var(--transition); border: 1px solid rgba(255,255,255,0.1);
}
.cert-box:hover { transform: scale(1.05); background: rgba(255,255,255,0.1); }
.footer-bottom { padding: 24px 0; text-align: center; border-top: 1px solid rgba(255,255,255,0.1); color: #64748b; font-size: 0.95rem; }

/* Floating WhatsApp */
.floating-whatsapp {
    position: fixed; bottom: 30px; left: 30px; width: 60px; height: 60px;
    background: #25D366; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); z-index: 1000; transition: var(--transition);
}
.floating-whatsapp:hover { transform: scale(1.15) rotate(-10deg); box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6); }

/* Responsive */
@media (max-width: 1024px) {
    .hero-content { flex-direction: column; text-align: center; }
    .hero h1 { font-size: 2.8rem; }
    .hero-text { max-width: 100%; margin: 0 auto 40px; }
    .hero-buttons { justify-content: center; }
    .hero-visual { justify-content: center; }
    .hero-visual::before { right: 0; transform: rotate(3deg); }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: 1fr; }
    .newsletter-form { flex-direction: column; }
    .newsletter-form button { width: 100%; }
    .about-content, .contact-content { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
        background: var(--bg-card); flex-direction: column; padding: 100px 30px;
        box-shadow: -5px 0 25px rgba(0,0,0,0.1); transition: 0.5s ease;
    }
    .nav-links.active { right: 0; }
    .mobile-menu-btn { display: flex; z-index: 1001; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .newsletter-section { margin: 60px 0; border-radius: 0; }
    .footer-grid { grid-template-columns: 1fr; }
}
