/*
Theme Name: Fox98 Source Code Store
Theme URI: https://fox98.ir
Author: تیم Fox98
Author URI: https://fox98.ir
Description: قالب حرفه‌ای فروشگاه سورس کد - طراحی شده توسط تیم Fox98
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fox98
Tags: rtl, right-to-left, custom-menu, custom-logo, featured-images, theme-options, dark-mode
*/

/* === CSS Variables === */
:root {
    --primary-color: #6366f1;
    --primary-hover: #818cf8;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #252542;
    --bg-card: rgba(30, 30, 50, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-secondary: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --gradient-bg: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 50%, #0f0f1a 100%);
    --font-primary: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-code: 'Fira Code', 'Consolas', monospace;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* === Reset & Base === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--gradient-bg);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.7;
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
}

/* === Typography === */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* === Container === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === Glass Morphism === */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

/* === Header === */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
    background: rgba(15, 15, 26, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-normal);
    overflow: visible;
}
.header-inner,
.header-user {
    overflow: visible;
}

.site-header.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-card);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo img {
    height: 45px;
    width: auto;
}

.site-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Navigation === */
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition-fast);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-primary);
    background: var(--bg-glass);
}

.main-nav a i {
    font-size: 1.1rem;
}

/* === User Dropdown (منوی کشویی پروفایل) === */
.header-user-dropdown {
    position: relative;
    z-index: 1001;
}
.header-user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
}
.header-user-trigger:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}
.header-user-trigger i.fa-user-circle {
    font-size: 1.25rem;
    color: var(--primary-color);
}
.header-user-chevron {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}
.header-user-dropdown.open .header-user-chevron {
    transform: rotate(180deg);
}
.header-user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 220px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 1001;
    pointer-events: none;
}
.header-user-dropdown:hover .header-user-menu,
.header-user-dropdown.open .header-user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
.header-user-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    border: none;
    border-radius: 0;
    width: 100%;
    box-sizing: border-box;
}
.header-user-menu a:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}
.header-user-menu a.header-user-logout {
    color: var(--danger-color);
    border-top: 1px solid var(--border-color);
    margin-top: 4px;
    padding-top: 12px;
}
.header-user-menu a i {
    width: 20px;
    text-align: center;
}

/* === Notifications (اعلان‌ها) === */
.header-notifications-wrap {
    position: relative;
    z-index: 1001;
    display: flex;
    align-items: center;
}
.header-notifications-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    flex-shrink: 0;
}
.header-notifications-trigger:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}
.header-notifications-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}
.header-notifications-badge:not(.has-unread) {
    display: none;
}
.header-notifications-badge.has-unread {
    background: var(--danger-color);
    color: #fff;
    border-color: var(--danger-color);
    animation: fox98-badge-pulse 2s ease-in-out infinite;
}
@keyframes fox98-badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}
.header-notifications-dropdown {
    position: fixed;
    width: 360px;
    max-width: calc(100vw - 24px);
    max-height: min(420px, 70vh);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 99999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    left: auto;
    right: 0;
    top: 0;
}
.header-notifications-wrap.open .header-notifications-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.header-notifications-arrow {
    position: absolute;
    top: -8px;
    right: 20px;
    width: 14px;
    height: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-left: none;
    transform: rotate(-45deg);
    z-index: 1;
}
.header-notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-glass);
    flex-shrink: 0;
}
.header-notifications-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.header-notifications-title .fa-bell {
    color: var(--primary-color);
    font-size: 1rem;
}
.header-notifications-count-num {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.header-notifications-mark-all {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}
.header-notifications-mark-all:hover {
    background: rgba(99, 102, 241, 0.15);
}
.header-notifications-list {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 0;
    max-height: 320px;
    overscroll-behavior: contain;
}
.header-notifications-empty {
    padding: 32px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.header-notifications-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}
.header-notifications-empty p {
    margin: 0;
}
.header-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s ease;
}
.header-notification-item:hover {
    background: var(--bg-glass);
}
.header-notification-item.unread {
    background: rgba(99, 102, 241, 0.06);
}
.header-notification-item.unread:hover {
    background: rgba(99, 102, 241, 0.12);
}
.header-notification-item:last-child {
    border-bottom: none;
}
.header-notification-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    margin-top: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    flex-shrink: 0;
}
.header-notification-body {
    flex: 1;
    min-width: 0;
}
.header-notification-text {
    margin: 0 0 4px 0;
    line-height: 1.55;
    word-break: break-word;
}
.header-notification-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* === Mobile Menu === */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        padding: 20px;
        transform: translateY(-120%);
        transition: var(--transition-normal);
        border-bottom: 1px solid var(--border-color);
    }

    .main-nav.active {
        transform: translateY(0);
    }

    .main-nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .main-nav a {
        width: 100%;
        justify-content: center;
    }
}

/* === Search Box === */
.search-box {
    position: relative;
}

.search-box input {
    width: 250px;
    padding: 12px 20px;
    padding-right: 45px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.search-box button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
    color: white;
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.btn-success {
    background: var(--gradient-secondary);
    color: white;
}

.btn-telegram {
    background: linear-gradient(135deg, #0088cc 0%, #00a2e8 100%);
    color: white;
}

.btn-telegram:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 136, 204, 0.5);
    color: white;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.1rem;
}

/* === Hero Section === */
.hero {
    padding: 160px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Language Tags === */
.lang-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 40px;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.lang-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.lang-tag:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.lang-tag i {
    font-size: 1.2rem;
}

.lang-tag.python i {
    color: #3776ab;
}

.lang-tag.php i {
    color: #777bb4;
}

.lang-tag.javascript i {
    color: #f7df1e;
}

.lang-tag.arduino i {
    color: #00979d;
}

.lang-tag.cpp i {
    color: #00599c;
}

.lang-tag.html i {
    color: #e34f26;
}

.lang-tag.css i {
    color: #1572b6;
}

.lang-tag.react i {
    color: #61dafb;
}

.lang-tag.nodejs i {
    color: #339933;
}

/* === Section Styles === */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* === Product Cards === */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-color);
}

.product-image {
    position: relative;
    height: 200px;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-free {
    background: var(--secondary-color);
    color: white;
}

.badge-paid {
    background: var(--primary-color);
    color: white;
}

.badge-login {
    background: var(--accent-color);
    color: #1a1a2e;
}

.product-content {
    padding: 20px;
}

.product-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.product-title a {
    color: inherit;
}

.product-title a:hover {
    color: var(--primary-color);
}

.product-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.6;
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.product-price.free {
    color: var(--secondary-color);
}

/* === Blog Cards === */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

.blog-image {
    height: 220px;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 25px;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.blog-title a {
    color: var(--text-primary);
}

.blog-title a:hover {
    color: var(--primary-color);
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* === Category Filter === */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 22px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* === Code Lab === */
.code-lab {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.code-lab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.code-lab-tabs {
    display: flex;
    gap: 5px;
}

.code-tab {
    padding: 8px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.code-tab:hover,
.code-tab.active {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.code-lab-actions {
    display: flex;
    gap: 10px;
}

.code-editor {
    min-height: 400px;
    background: #1e1e2e;
    padding: 20px;
    font-family: var(--font-code);
    font-size: 14px;
    line-height: 1.6;
    color: #e0e0e0;
    resize: vertical;
    border: none;
    width: 100%;
    outline: none;
}

.code-output {
    min-height: 200px;
    padding: 20px;
    background: #0d0d14;
    border-top: 1px solid var(--border-color);
    font-family: var(--font-code);
    font-size: 14px;
    color: var(--secondary-color);
}

/* === Services Section === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.service-card {
    background: var(--bg-card);
    padding: 35px 25px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* === Footer === */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col a:hover {
    color: var(--primary-color);
}

.footer-about p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--primary-color);
}

/* === Single Product === */
.single-product {
    padding: 120px 0 80px;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.product-gallery {
    position: sticky;
    top: 100px;
}

.product-main-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    background: var(--bg-tertiary);
}

.product-main-image img {
    width: 100%;
    height: auto;
}

.product-info h1 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.product-price-lg {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.product-description {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.product-features {
    background: var(--bg-card);
    padding: 25px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.product-features h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.product-features ul {
    list-style: none;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.product-features li:last-child {
    border-bottom: none;
}

.product-features li i {
    color: var(--secondary-color);
}

/* === Comments === */
.comments-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.comments-section h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.comment-list {
    list-style: none;
}

.comment {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.comment-text {
    color: var(--text-secondary);
    line-height: 1.7;
}

.comment-form {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.comment-form h4 {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* === Sidebar === */
.sidebar {
    position: sticky;
    top: 100px;
}

.widget {
    background: var(--bg-card);
    padding: 25px;
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.widget h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.widget ul {
    list-style: none;
}

.widget li {
    margin-bottom: 12px;
}

.widget li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-secondary);
    padding: 8px 0;
}

.widget li a:hover {
    color: var(--primary-color);
}

/* === Pagination === */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-fast);
}

.pagination a:hover,
.pagination span.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* === Order Page === */
.order-hero {
    text-align: center;
    padding: 140px 0 80px;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
}

.order-hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.order-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.contact-telegram {
    margin-top: 60px;
    text-align: center;
    padding: 50px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.contact-telegram h2 {
    margin-bottom: 15px;
}

.contact-telegram p {
    margin-bottom: 25px;
    font-size: 1.1rem;
}

/* === Floating Telegram Button === */
.floating-telegram {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 999;
}

.floating-telegram a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0088cc 0%, #00a2e8 100%);
    border-radius: 50%;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 4px 20px rgba(0, 136, 204, 0.5);
    transition: var(--transition-fast);
    animation: pulse-telegram 2s ease infinite;
}

.floating-telegram a:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 136, 204, 0.6);
}

@keyframes pulse-telegram {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(0, 136, 204, 0.5);
    }

    50% {
        box-shadow: 0 4px 35px rgba(0, 136, 204, 0.8);
    }
}

/* === Responsive === */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .product-gallery {
        position: static;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .search-box {
        display: none;
    }

    .floating-telegram {
        bottom: 20px;
        left: 20px;
    }

    .floating-telegram a {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
}

/* === Animations === */
.fade-in {
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Code Preview Block === */
.code-preview {
    background: #1e1e2e;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 20px 0;
}

.code-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #2d2d3f;
    border-bottom: 1px solid var(--border-color);
}

.code-preview-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.code-copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.code-copy-btn:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.code-preview pre {
    padding: 20px;
    margin: 0;
    overflow-x: auto;
    font-family: var(--font-code);
    font-size: 14px;
    line-height: 1.6;
    color: #e0e0e0;
}

/* === Loading Spinner === */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === Tooltip === */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* === Single Product Page === */
.single-product {
    padding-top: 120px;
    padding-bottom: 60px;
}

.single-product .product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

/* محتوای محصول سمت راست (order کمتر = سمت راست در RTL) */
.single-product .product-info {
    order: -1;
}

/* گالری/پیش‌نمایش کد سمت چپ */
.single-product .product-gallery {
    order: 1;
    position: sticky;
    top: 100px;
}

.single-product .product-main-image {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.single-product .product-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.single-product .product-info h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.single-product .product-price-lg {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 25px;
}

.single-product .product-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 30px;
}

.single-product .product-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.single-product .product-features {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 25px;
}

.single-product .product-features h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.single-product .product-features ul {
    list-style: none;
}

.single-product .product-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.single-product .product-features li:last-child {
    border-bottom: none;
}

.single-product .product-features li i {
    color: var(--secondary-color);
    font-size: 1rem;
}

/* Comments Section */
.single-product .comments-section {
    margin-top: 60px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    border: 1px solid var(--border-color);
}

.single-product .comments-section h3 {
    margin-bottom: 30px;
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 992px) {
    .single-product .product-detail {
        grid-template-columns: 1fr;
    }

    .single-product .product-info {
        order: 2;
    }

    .single-product .product-gallery {
        order: 1;
        position: static;
    }
}