/* ============================================
   کوچولو مارکت - فروشگاه لباس بچه
   Modern CSS with Glassmorphism & Animations
   ============================================ */

/* CSS Variables */
:root {
    /* Colors - Light Mode */
    --primary: #ff6b9d;
    --primary-dark: #e54d7a;
    --secondary: #7c3aed;
    --accent: #fbbf24;
    --success: #10b981;
    
    --bg-primary: #fefcff;
    --bg-secondary: #fdf2f8;
    --bg-card: rgba(255, 255, 255, 0.8);
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    --border: rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #ff6b9d 0%, #c44dff 50%, #7c3aed 100%);
    --gradient-hero: linear-gradient(135deg, #fdf2f8 0%, #ede9fe 50%, #fef3c7 100%);
    --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.6) 100%);
    
    /* Typography */
    --font-family: 'Vazirmatn', system-ui, sans-serif;
    
    /* Sizing */
    --header-height: 70px;
    --container-max: 1200px;
    --radius: 16px;
    --radius-sm: 8px;
    --radius-lg: 24px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(30, 30, 50, 0.8);
    
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
    
    --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #2d1f4e 50%, #1a1a2e 100%);
    --gradient-card: linear-gradient(135deg, rgba(30,30,50,0.9) 0%, rgba(30,30,50,0.6) 100%);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

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

ul {
    list-style: none;
}

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

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: var(--transition);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 1.8rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
}

.nav-links a:hover {
    color: var(--primary);
    background: rgba(255, 107, 157, 0.1);
}

.nav-tryon {
    background: var(--gradient-primary) !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: white !important;
    background-clip: initial !important;
    color: white !important;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle, .cart-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.theme-toggle:hover, .cart-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow);
}

.cart-btn {
    position: relative;
}

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

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    background: var(--gradient-hero);
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 100px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 157, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(255, 107, 157, 0); }
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 500px;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.5);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border);
    backdrop-filter: blur(10px);
}

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

.btn-glow {
    background: var(--gradient-primary);
    color: white;
    animation: glow 2s infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 107, 157, 0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 107, 157, 0.8), 0 0 60px rgba(124, 58, 237, 0.4); }
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 500px;
}

.hero-card {
    position: absolute;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-slow);
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-card-1 {
    width: 280px;
    height: 380px;
    top: 20px;
    right: 60px;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.hero-card-2 {
    width: 240px;
    height: 320px;
    bottom: 20px;
    right: 0;
    z-index: 1;
    animation: float 6s ease-in-out infinite 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

.hero-floating {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-emoji {
    position: absolute;
    font-size: 2rem;
    animation: floatEmoji 4s ease-in-out infinite;
}

.floating-emoji:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.floating-emoji:nth-child(2) { top: 60%; left: 5%; animation-delay: 1s; }
.floating-emoji:nth-child(3) { bottom: 20%; right: 40%; animation-delay: 2s; }

@keyframes floatEmoji {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
    50% { transform: translateY(-30px) rotate(15deg); opacity: 1; }
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--bg-primary);
    clip-path: ellipse(70% 100% at 50% 100%);
}

/* ============================================
   Features Section
   ============================================ */
.features {
    padding: 60px 0;
    background: var(--bg-primary);
}

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

.feature-card {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

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

/* ============================================
   Products Section
   ============================================ */
.products {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.products-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--border);
    background: var(--bg-card);
    border-radius: 30px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Product Card */
.product-card {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
}

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

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

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

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

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

.product-actions {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    display: flex;
    gap: 10px;
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.product-action-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-action-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 5px;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--accent);
}

/* ============================================
   Try-On Banner
   ============================================ */
.tryon-banner {
    padding: 80px 0;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.banner-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.banner-text {
    color: white;
}

.banner-text h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.banner-text p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.banner-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ai-animation {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-circle {
    position: absolute;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: ripple 3s infinite;
}

.ai-circle:nth-child(1) { width: 100%; height: 100%; animation-delay: 0s; }
.ai-circle:nth-child(2) { width: 75%; height: 75%; animation-delay: 0.5s; }
.ai-circle:nth-child(3) { width: 50%; height: 50%; animation-delay: 1s; }

@keyframes ripple {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.ai-icon {
    font-size: 4rem;
    z-index: 1;
    animation: pulse 2s infinite;
}

/* ============================================
   Cart Sidebar
   ============================================ */
.cart-sidebar {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-primary);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.cart-sidebar.open {
    left: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.cart-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

.cart-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.cart-close:hover {
    color: var(--primary);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    border: 1px solid var(--border);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 700;
}

.cart-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.cart-item-remove:hover {
    color: #ef4444;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.cart-empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.btn-checkout {
    width: 100%;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    z-index: 1999;
    transition: var(--transition);
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-secondary);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-col p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: var(--text-secondary);
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-visual {
        display: none;
    }
    
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .banner-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .feature-icon {
        font-size: 2rem;
    }
    
    .banner-text h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}
