@font-face {
    font-family: 'IRANSans';
    src: url('https://cdn.fontcdn.ir/Font/Persian/IRANSans/IRANSansWeb(FaNum).eot');
    src: url('https://cdn.fontcdn.ir/Font/Persian/IRANSans/IRANSansWeb(FaNum).eot?#iefix') format('embedded-opentype'),
         url('https://cdn.fontcdn.ir/Font/Persian/IRANSans/IRANSansWeb(FaNum).woff2') format('woff2'),
         url('https://cdn.fontcdn.ir/Font/Persian/IRANSans/IRANSansWeb(FaNum).woff') format('woff'),
         url('https://cdn.fontcdn.ir/Font/Persian/IRANSans/IRANSansWeb(FaNum).ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IRANSans', Tahoma, sans-serif;
    line-height: 1.6;
    color: var(--txt);
    background: var(--bg-primary);
    transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
    body {
        padding-bottom: 70px;
        padding-top: 60px !important;
    }
}

@media (min-width: 769px) {
    body {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}

body[data-theme="dark"] {
    color: var(--txt);
    background: var(--bg-primary);
}

/* Theme transition for all elements */
* {
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Exclude transitions for icons and images */
i, img, svg, canvas, video {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.glow-primary {
    box-shadow: 0 0 15px var(--accent-glow), 0 0 25px rgba(236, 72, 153, 0.2);
}

.glow-primary-hover:hover {
    box-shadow: 0 0 20px var(--accent-glow), 0 0 30px rgba(236, 72, 153, 0.3), 0 0 35px rgba(6, 182, 212, 0.2);
}

.glow-secondary {
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.3), 0 0 25px var(--accent-glow);
}

/* Theme-aware classes */
.theme-bg {
    background: var(--bg-secondary) !important;
}

.theme-card {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    box-shadow: 0 4px 12px var(--shadow-color) !important;
}

.theme-text {
    color: var(--txt) !important;
}

.theme-text-secondary {
    color: var(--txt-secondary) !important;
}

.theme-section {
    background: var(--bg-section) !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Pixel art effects */
.pixel-border {
    image-rendering: pixelated;
    border: 2px solid #0066ff;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST APPROACH
   ============================================ */

/* Prevent horizontal scroll on all devices */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

* {
    max-width: 100%;
}

/* ============================================
   TABLET STYLES (769px - 1024px)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }
}

/* ============================================
   MOBILE STYLES (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Base typography improvements */
    body {
        font-size: 15px;
        line-height: 1.6;
        -webkit-text-size-adjust: 100%;
        -webkit-font-smoothing: antialiased;
    }

    h1 {
        font-size: 1.875rem !important;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }

    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }

    h3 {
        font-size: 1.25rem !important;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }

    h4 {
        font-size: 1.125rem !important;
        line-height: 1.4;
    }

    p {
        font-size: 0.9375rem;
        line-height: 1.6;
    }

    /* Hero section improvements */
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
        margin-bottom: 1rem;
        padding: 0 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        line-height: 1.5;
        padding: 0 1rem;
    }

    /* Section padding improvements */
    section {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .theme-section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Container improvements */
    .container,
    .max-w-6xl,
    .max-w-7xl,
    .max-w-4xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Grid improvements */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .grid-cols-1,
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    /* Spacing improvements */
    .gap-8 {
        gap: 1rem !important;
    }

    .gap-6 {
        gap: 0.875rem !important;
    }

    .gap-4 {
        gap: 0.75rem !important;
    }

    /* Padding improvements */
    .p-6 {
        padding: 1rem !important;
    }

    .p-4 {
        padding: 0.875rem !important;
    }

    .px-4 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .py-12 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .py-16 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    /* Margin improvements */
    .mb-8 {
        margin-bottom: 1.5rem !important;
    }

    .mb-12 {
        margin-bottom: 2rem !important;
    }

    .mb-16 {
        margin-bottom: 2.5rem !important;
    }

    /* Product cards improvements */
    .pm-item,
    .pm-glow {
        min-width: 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    #pm-root .pm-item {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }

    #pm-default-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Product card content */
    .pm-glow .p-4,
    .pm-glow .p-6 {
        padding: 0.875rem !important;
    }

    /* Image improvements */
    img {
        max-width: 100%;
        height: auto;
        object-fit: cover;
    }

    /* Button improvements - better touch targets */
    button,
    a[role="button"],
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }

    /* Text size improvements */
    .text-sm {
        font-size: 0.875rem !important;
    }

    .text-base {
        font-size: 0.9375rem !important;
    }

    .text-lg {
        font-size: 1rem !important;
    }

    .text-xl {
        font-size: 1.125rem !important;
    }

    .text-2xl {
        font-size: 1.5rem !important;
    }

    .text-3xl {
        font-size: 1.875rem !important;
    }

    .text-4xl {
        font-size: 2.25rem !important;
    }

    /* Price text */
    .text-primary {
        font-size: 1.125rem !important;
    }

    /* Aspect ratio fixes */
    .aspect-video {
        aspect-ratio: 16 / 9;
    }

    /* Gallery improvements */
    .gallery-preview-item,
    .gallery-item {
        margin-bottom: 1rem;
    }

    /* Prevent text overflow */
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    /* ============================================
       HOME PAGE SPECIFIC FIXES - MOBILE ONLY
       ============================================ */
    
    /* Hero Section Mobile Fixes */
    .theme-hero {
        min-height: 70vh !important;
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .theme-hero .relative.z-10 {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 1rem !important;
    }

    .theme-hero .mb-8 {
        margin-bottom: 1.5rem !important;
    }

    /* Icon in hero */
    .theme-hero .w-16 {
        width: 3.5rem !important;
        height: 3.5rem !important;
    }

    .theme-hero .w-8 {
        width: 1.75rem !important;
        height: 1.75rem !important;
    }

    .theme-hero .mb-4 {
        margin-bottom: 1rem !important;
    }

    /* Hero title and subtitle */
    .theme-hero h1 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
        padding: 0 0.5rem !important;
    }

    .theme-hero .hero-title {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }

    .theme-hero .hero-subtitle {
        font-size: 0.9375rem !important;
        line-height: 1.5 !important;
        padding: 0 0.5rem !important;
    }

    .theme-hero p {
        font-size: 0.9375rem !important;
        margin-bottom: 1rem !important;
    }

    /* Scroll down arrow */
    .theme-hero .absolute.bottom-10 {
        bottom: 1.5rem !important;
    }

    .theme-hero .w-8.h-8 {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }

    /* Products Section Mobile Fixes */
    #pm-root {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    #pm-root .p-4 {
        padding: 0.875rem !important;
    }

    /* Product grid in home page - MOBILE ONLY */
    #pm-default-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Product cards in home page - MOBILE ONLY */
    #pm-default-grid .pm-glow {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    /* Gallery Section Mobile Fixes */
    .gallery-preview-item,
    .gallery-item {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem !important;
    }

    .gallery-preview-item .p-4,
    .gallery-item .p-4 {
        padding: 0.875rem !important;
    }

    /* Why Section Mobile Fixes */
    .grid.grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-4 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Feature cards in why section */
    .text-center.p-4,
    .text-center.p-6 {
        padding: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .text-center .w-16 {
        width: 3.5rem !important;
        height: 3.5rem !important;
    }

    .text-center .w-8 {
        width: 1.75rem !important;
        height: 1.75rem !important;
    }

    .text-center h3 {
        font-size: 1.125rem !important;
        margin-bottom: 0.5rem !important;
    }

    .text-center p {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
    }

    /* Button improvements in home page */
    .gallery-toggle-btn {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.875rem 1.5rem !important;
        font-size: 0.9375rem !important;
        min-height: 44px !important;
    }

    /* Section spacing */
    .theme-section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Max width containers */
    .max-w-6xl,
    .max-w-7xl {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Gallery grid mobile */
    .grid.grid-cols-1.md\\:grid-cols-2 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Gallery toggle button */
    .gallery-toggle-btn {
        width: calc(100% - 2rem) !important;
        max-width: 100% !important;
        margin: 0 1rem !important;
    }

    /* Text center improvements */
    .text-center {
        padding: 0 1rem !important;
    }

    /* Prevent any element from causing overflow */
    .theme-hero *,
    .theme-section *,
    #pm-root * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Fix absolute positioning in hero */
    .theme-hero .absolute {
        position: absolute !important;
    }

    /* Ensure proper flex behavior */
    .flex {
        flex-wrap: wrap !important;
    }

    /* Fix min-height issues */
    .min-h-screen {
        min-height: 70vh !important;
    }
}

/* ============================================
   SMALL MOBILE STYLES (max-width: 640px)
   ============================================ */
@media (max-width: 640px) {
    body {
        font-size: 14px;
    }

    .hero-title {
        font-size: 1.75rem !important;
        padding: 0 0.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9375rem !important;
        padding: 0 0.75rem;
    }

    h1 {
        font-size: 1.625rem !important;
    }

    h2 {
        font-size: 1.375rem !important;
    }

    h3 {
        font-size: 1.125rem !important;
    }

    /* Tighter spacing for small screens */
    .gap-8 {
        gap: 0.875rem !important;
    }

    .gap-6 {
        gap: 0.75rem !important;
    }

    .gap-4 {
        gap: 0.625rem !important;
    }

    .p-4 {
        padding: 0.75rem !important;
    }

    .p-6 {
        padding: 0.875rem !important;
    }

    /* Smaller margins */
    .mb-8 {
        margin-bottom: 1.25rem !important;
    }

    .mb-12 {
        margin-bottom: 1.75rem !important;
    }

    /* Product card adjustments */
    #pm-root .pm-item img {
        height: 160px !important;
        min-height: 160px !important;
        max-height: 160px !important;
    }

    #pm-root .pm-item > div:first-child {
        height: 160px !important;
        min-height: 160px !important;
        max-height: 160px !important;
    }
}

/* ============================================
   EXTRA SMALL MOBILE (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    body {
        font-size: 13px;
    }

    .hero-title {
        font-size: 1.5rem !important;
    }

    .hero-subtitle {
        font-size: 0.875rem !important;
    }

    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.25rem !important;
    }

    h3 {
        font-size: 1rem !important;
    }

    /* Even tighter spacing */
    section {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .p-4 {
        padding: 0.625rem !important;
    }

    .p-6 {
        padding: 0.75rem !important;
    }
}

/* ============================================
   LANDSCAPE MOBILE ORIENTATION
   ============================================ */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-title {
        font-size: 1.75rem !important;
    }

    .hero-subtitle {
        font-size: 0.9375rem !important;
    }

    /* Reduce vertical padding in landscape */
    .py-12 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .py-16 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .py-20 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
}

/* ============================================
   TOUCH DEVICE IMPROVEMENTS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Better touch targets */
    button,
    a,
    .mobile-nav-item,
    .cart-icon-link,
    .user-profile {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover effects on touch devices */
    *:hover {
        transform: none !important;
    }

    /* Better tap feedback */
    button:active,
    a:active {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

/* ============================================
   HIGH DPI DISPLAYS
   ============================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ============================================
   FIX OVERFLOW ISSUES - PREVENT HORIZONTAL SCROLL
   ============================================ */
/* Prevent horizontal scroll on all devices */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative;
}

/* Fix container overflow */
.container,
.max-w-6xl,
.max-w-7xl,
.max-w-4xl {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix images overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Fix grid overflow */
.grid {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix product shelf overflow on mobile */
@media (max-width: 768px) {
    #pm-root {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    #pm-root #pm-shelf {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    #pm-root #pm-track {
        width: max-content;
        min-width: 100%;
    }

    /* Fix any element that might cause overflow */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Loading animation */
.loading-spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0066ff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    transition: background 0.5s ease;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    transition: background 0.5s ease;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
    transition: background 0.5s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed, #db2777, #0891b2);
}

:root {
    --header-bg: #ffffff;
    --txt: #1a1a2e;
    --txt-secondary: #64748b;
    --bg-primary: #faf5ff;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-section: rgba(255,255,255,.5);
    --border-color: rgba(229,231,235,0.8);
    --shadow-color: rgba(0,0,0,.05);
    --accent: #8b5cf6;
    --accent-secondary: #ec4899;
    --accent-tertiary: #06b6d4;
    --accent-low: rgba(139,92,246,.15);
    --accent-glow: rgba(139,92,246,.3);
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #06b6d4 100%);
    --search-bg: rgba(255,255,255,.6);
    --scrollbar-track: #faf5ff;
    --scrollbar-thumb: linear-gradient(135deg, #8b5cf6, #ec4899, #06b6d4);
  }

  body[data-theme="dark"] {
    --header-bg: #0d0d0d;
    --txt: #f8fafc;
    --txt-secondary: #94a3b8;
    --bg-primary: #0a0a0a;
    --bg-secondary: #111827;
    --bg-card: #1f2937;
    --bg-section: rgba(31,41,55,.5);
    --border-color: rgba(55,65,81,0.8);
    --shadow-color: rgba(0,0,0,.3);
    --accent: #8b5cf6;
    --accent-secondary: #ec4899;
    --accent-tertiary: #06b6d4;
    --accent-low: rgba(139,92,246,.2);
    --accent-glow: rgba(139,92,246,.4);
    --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #06b6d4 100%);
    --search-bg: rgba(0,0,0,.5);
    --scrollbar-track: #111827;
    --scrollbar-thumb: linear-gradient(135deg, #8b5cf6, #ec4899, #06b6d4);
    --price-color: #ffffff;
  }
  
  /* قیمت‌ها در حالت دارک سفید */
  .price-text {
    color: var(--accent);
    transition: color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  body[data-theme="dark"] .price-text {
    color: #ffffff !important;
  }
  
  /* برای قیمت‌هایی که inline style دارند - استفاده از attribute selector */
  body[data-theme="dark"] span[style*="color: var(--accent)"].font-bold,
  body[data-theme="dark"] div[style*="color: var(--accent)"].font-bold {
    color: #ffffff !important;
  }
  
  /* برای قیمت‌های عددی که فقط عدد هستند */
  body[data-theme="dark"] .text-3xl.font-bold[style*="color: var(--accent)"],
  body[data-theme="dark"] .text-lg.font-bold[style*="color: var(--accent)"],
  body[data-theme="dark"] .text-xl.font-bold[style*="color: var(--accent)"],
  body[data-theme="dark"] .text-2xl.font-bold[style*="color: var(--accent)"] {
    color: #ffffff !important;
  }

/* Scroll Animations */
.scroll-animate-item {
  opacity: 0;
  transform: translateY(60px) scale(0.9);
  transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

.scroll-animate-item.animated {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* انیمیشن‌های مختلف برای تنوع - قوی‌تر و واضح‌تر */
.scroll-animate-item.fade-in {
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate-item.fade-in.animated {
  opacity: 1;
  transform: translateY(0);
}

.scroll-animate-item.slide-left {
  opacity: 0;
  transform: translateX(-100px);
  transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate-item.slide-left.animated {
  opacity: 1;
  transform: translateX(0);
}

.scroll-animate-item.slide-right {
  opacity: 0;
  transform: translateX(100px);
  transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate-item.slide-right.animated {
  opacity: 1;
  transform: translateX(0);
}

.scroll-animate-item.scale-up {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 1s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scroll-animate-item.scale-up.animated {
  opacity: 1;
  transform: scale(1);
}

.scroll-animate-item.rotate-in {
  opacity: 0;
  transform: rotate(-15deg) scale(0.8);
  transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate-item.rotate-in.animated {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* Animated Background */
.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: floatOrb 20s ease-in-out infinite, pulseOrb 4s ease-in-out infinite;
  will-change: transform, opacity;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,0.6), rgba(139,92,246,0));
  top: 10%;
  left: 10%;
  animation-duration: 25s;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(236,72,153,0.6), rgba(236,72,153,0));
  top: 60%;
  right: 15%;
  animation-duration: 30s;
  animation-delay: -5s;
}

.orb-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(6,182,212,0.6), rgba(6,182,212,0));
  bottom: 20%;
  left: 50%;
  animation-duration: 35s;
  animation-delay: -10s;
}

.orb-4 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(139,92,246,0.4), rgba(236,72,153,0.4), rgba(6,182,212,0.4));
  top: 50%;
  left: 30%;
  animation-duration: 28s;
  animation-delay: -7s;
}

@keyframes floatOrb {
  0%, 100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  25% {
    transform: translate(100px, -120px) scale(1.2) rotate(90deg);
  }
  50% {
    transform: translate(-80px, 100px) scale(0.8) rotate(180deg);
  }
  75% {
    transform: translate(120px, 60px) scale(1.1) rotate(270deg);
  }
}

/* انیمیشن pulse برای orb ها */
@keyframes pulseOrb {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

.gradient-orb {
  animation: floatOrb 20s ease-in-out infinite, pulseOrb 4s ease-in-out infinite;
}

body[data-theme="dark"] .gradient-orb {
  opacity: 0.3;
}

body[data-theme="dark"] .orb-1 {
  background: radial-gradient(circle, rgba(139,92,246,0.4), rgba(139,92,246,0));
}

body[data-theme="dark"] .orb-2 {
  background: radial-gradient(circle, rgba(236,72,153,0.4), rgba(236,72,153,0));
}

body[data-theme="dark"] .orb-3 {
  background: radial-gradient(circle, rgba(6,182,212,0.4), rgba(6,182,212,0));
}

body[data-theme="dark"] .orb-4 {
  background: radial-gradient(circle, rgba(139,92,246,0.3), rgba(236,72,153,0.3), rgba(6,182,212,0.3));
}

/* Additional smooth animations */
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-5deg) scale(0.95);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

/* ============================================
   FIX OVERFLOW ISSUES - PREVENT HORIZONTAL SCROLL
   ============================================ */
/* Prevent horizontal scroll on all devices */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative;
}

/* Fix container overflow */
.container,
.max-w-6xl,
.max-w-7xl,
.max-w-4xl {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix images overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Fix grid overflow */
.grid {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix product shelf overflow on mobile */
@media (max-width: 768px) {
    #pm-root {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    #pm-root #pm-shelf {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    #pm-root #pm-track {
        width: max-content;
        min-width: 100%;
    }

    /* Fix any element that might cause overflow */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
}
  
  