/* ================================================================
   دیجی استور - استایل اصلی
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

/* ================================================================
   ۱. متغیرها
   ================================================================ */

:root {
    --gold: #FFD700;
    --gold-dark: #F5A623;
    --gold-light: #FFE066;
    --purple: #6C5CE7;
    --purple-dark: #5A4BD1;
    --purple-light: #A29BFE;
    --blue: #0984E3;
    --blue-dark: #0770C4;
    --green: #00B894;
    --green-dark: #00A381;
    --red: #E74C3C;
    --red-dark: #C0392B;

    --bg-primary: #0a0a1a;
    --bg-secondary: #0f0f2a;
    --bg-card: #16163a;
    --bg-card-hover: #1e1e4a;
    --bg-input: #0f0f2a;
    --bg-input-hover: #1a1a3e;
    --bg-dropdown: #141430;

    --text-primary: #E8E8F0;
    --text-secondary: #A0A0C0;
    --text-muted: #6A6A8A;
    --text-inverse: #1a1a2e;

    --border-color: rgba(108, 92, 231, 0.15);
    --border-color-hover: rgba(108, 92, 231, 0.3);

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-card-hover: 0 8px 40px rgba(108, 92, 231, 0.15);
    --shadow-dropdown: 0 12px 48px rgba(0, 0, 0, 0.5);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    --gradient-primary: linear-gradient(135deg, #6C5CE7, #0984E3);
    --gradient-gold: linear-gradient(135deg, #FFD700, #F5A623);
    --gradient-danger: linear-gradient(135deg, #E74C3C, #C0392B);
    --gradient-success: linear-gradient(135deg, #00B894, #00A381);

    --font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-size-xs: 0.7rem;
    --font-size-sm: 0.8rem;
    --font-size-md: 0.95rem;
    --font-size-lg: 1.1rem;
    --font-size-xl: 1.3rem;
    --font-size-2xl: 1.8rem;
    --font-size-3xl: 2.2rem;
}

body.light {
    --bg-primary: #f0f2f8;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f7fc;
    --bg-input: #f5f7fc;
    --bg-input-hover: #e8ecf4;
    --bg-dropdown: #ffffff;

    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #a0aec0;
    --text-inverse: #ffffff;

    --border-color: rgba(108, 92, 231, 0.08);
    --border-color-hover: rgba(108, 92, 231, 0.2);

    --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 4px 28px rgba(108, 92, 231, 0.08);
    --shadow-dropdown: 0 12px 48px rgba(0, 0, 0, 0.08);
}

/* ================================================================
   ۲. ریست
   ================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background var(--transition-slow), color var(--transition-slow);

    /* مهم: body فلکس بشه تا main وسط بمونه */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
}

/* ================================================================
   ۳. کانتینرها
   ================================================================ */

/* کانتینر main */
main.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    flex: 1;
}

/* کانتینر هدر و فوتر */
#header-container .container,
#footer-container .container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: block;
}

/* کانتینر عمومی */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ================================================================
   ۴. اسکرول‌بار
   ================================================================ */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--purple);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--purple-dark);
}

body.light ::-webkit-scrollbar-track {
    background: #f0f2f8;
}

body.light ::-webkit-scrollbar-thumb {
    background: #c4c9d4;
}

/* ================================================================
   ۵. نوار ناوبری
   ================================================================ */

.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: background var(--transition-slow), border-color var(--transition-slow);
}

body.light .navbar {
    background: rgba(255, 255, 255, 0.95);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 16px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 550px;
    min-width: 80px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* لوگو */
.logo {
    font-size: var(--font-size-xl);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform var(--transition);
}

.logo:hover {
    transform: scale(1.02);
}

.logo i {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.1em;
}

/* جستجو */
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 6px 18px;
    width: 100%;
    transition: all var(--transition);
}

.search-box:focus-within {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.08);
    background: var(--bg-input-hover);
}

.search-box i {
    color: var(--text-muted);
    font-size: var(--font-size-md);
    margin-left: 12px;
    transition: color var(--transition);
}

.search-box:focus-within i {
    color: var(--purple);
}

.search-box input {
    border: none;
    background: transparent;
    padding: 6px 0;
    outline: none;
    width: 100%;
    color: var(--text-primary);
    font-size: var(--font-size-md);
}

.search-box input::placeholder {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* دکمه منو */
.menu-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.menu-toggle:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* دکمه تم */
.theme-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.theme-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* سبد خرید */
.cart-icon-link {
    color: var(--text-secondary);
    font-size: var(--font-size-xl);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.cart-icon-link:hover {
    color: var(--gold);
    background: rgba(255, 215, 0, 0.05);
}

.cart-count {
    font-weight: 700;
    color: var(--gold);
    background: rgba(255, 215, 0, 0.1);
    padding: 0 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    min-width: 22px;
    text-align: center;
    border: 1px solid rgba(255, 215, 0, 0.15);
}

/* ================================================================
   ۶. پروفایل کاربر
   ================================================================ */

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    padding: 4px 12px 4px 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}

.user-profile:hover {
    border-color: var(--purple);
}

.user-profile .avatar-wrapper {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    position: relative;
    flex-shrink: 0;
    transition: transform var(--transition);
}

.user-profile .avatar-wrapper:hover {
    transform: scale(1.05);
}

.user-profile .avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-profile .avatar-wrapper .avatar-emoji {
    font-size: var(--font-size-lg);
}

.user-profile .avatar-wrapper .avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: var(--font-size-md);
}

.user-profile .avatar-wrapper .avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    border-radius: 50%;
    transition: opacity var(--transition);
}

.user-profile .avatar-wrapper:hover .avatar-overlay {
    opacity: 1;
}

.user-profile .avatar-wrapper .avatar-overlay i {
    color: #fff;
    font-size: var(--font-size-sm);
}

.user-profile .user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.user-profile .user-name {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.user-profile .user-email {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.user-profile .logout-btn {
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.08);
    color: var(--red);
    padding: 2px 12px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 500;
}

.user-profile .logout-btn:hover {
    background: rgba(231, 76, 60, 0.15);
}

.user-profile .login-link {
    color: var(--gold);
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.08);
    transition: all var(--transition);
}

.user-profile .login-link:hover {
    background: rgba(255, 215, 0, 0.08);
    border-color: var(--gold);
}

/* ================================================================
   ۷. منوی موبایل
   ================================================================ */

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    backdrop-filter: blur(4px);
}

.mobile-overlay.open {
    display: block;
}

.mobile-menu {
    display: flex;
    flex-direction: column;
    background: var(--bg-dropdown);
    padding: 16px 20px 24px;
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    z-index: 9999;
    box-shadow: var(--shadow-dropdown);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

body.light .mobile-menu {
    background: #ffffff;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu .mobile-header-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--gold);
    padding: 8px 0 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mobile-menu .mobile-header-title .close-menu-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    transition: all var(--transition);
}

.mobile-menu .mobile-header-title .close-menu-btn:hover {
    color: var(--gold);
    transform: rotate(90deg);
}

.mobile-menu a {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: var(--font-size-md);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition);
    font-weight: 500;
}

.mobile-menu a:hover {
    background: rgba(108, 92, 231, 0.05);
    color: var(--gold);
}

.mobile-menu a.active {
    color: var(--gold);
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.08);
}

.mobile-menu a i {
    width: 22px;
    text-align: center;
    font-size: var(--font-size-lg);
}

.mobile-menu .mobile-actions {
    display: flex;
    gap: 8px;
    padding: 8px 14px;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
    flex-wrap: wrap;
}

.mobile-menu .mobile-actions .action-btn-mobile {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition);
}

.mobile-menu .mobile-actions .action-btn-mobile:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.mobile-menu .user-profile-mobile {
    padding: 12px 14px;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
}

.mobile-menu .user-profile-mobile .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu .user-profile-mobile .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--font-size-md);
    color: #fff;
    flex-shrink: 0;
}

.mobile-menu .user-profile-mobile .user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--font-size-md);
}

.mobile-menu .user-profile-mobile .user-email {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.mobile-menu .user-profile-mobile .logout-btn-mobile {
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.08);
    color: var(--red);
    padding: 4px 16px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 500;
    margin-top: 8px;
}

.mobile-menu .user-profile-mobile .logout-btn-mobile:hover {
    background: rgba(231, 76, 60, 0.15);
}

.mobile-menu .user-profile-mobile .login-link-mobile {
    color: var(--gold);
    font-weight: 600;
    font-size: var(--font-size-md);
}

/* ================================================================
   ۸. بنر فروشگاه
   ================================================================ */

.store-banner {
    text-align: center;
    padding: 14px 20px;
    margin: 12px 0 20px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}

.store-banner p {
    font-size: var(--font-size-md);
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

body.light .store-banner {
    background: #f8f9fe;
    border-color: rgba(108, 92, 231, 0.06);
}

/* ================================================================
   ۹. عنوان بخش
   ================================================================ */

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--text-primary);
    margin: 20px 0 24px;
    padding-right: 14px;
    border-right: 4px solid var(--gold);
    text-align: right;
}

body.light .section-title {
    border-right-color: var(--purple);
}

/* ================================================================
   ۱۰. گالری محصولات
   ================================================================ */

.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin: 10px 0 40px;
}

.gallery-item {
    flex: 0 1 260px;
    max-width: 260px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.gallery-item:hover {
    transform: translateY(-4px);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-card-hover);
}

.gallery-item > a {
    display: block;
    text-decoration: none;
}

.gallery-item .image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item .image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: var(--bg-input);
    padding: 12px;
    transition: transform var(--transition-slow);
}

.gallery-item:hover .image-wrapper img {
    transform: scale(1.04);
}

.gallery-item .image-wrapper img.placeholder-img {
    object-fit: contain;
    padding: 20%;
    background: var(--bg-input);
}

.gallery-item .gallery-caption {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gallery-item .gallery-caption h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    min-height: 28px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-item .gallery-caption .desc {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: 10px;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.gallery-item .gallery-caption .price {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--gold);
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

body.light .gallery-item .gallery-caption .price {
    color: var(--purple);
}

.gallery-item .buy-btn {
    width: 100%;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    padding: 11px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-size: var(--font-size-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.gallery-item .buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(108, 92, 231, 0.25);
    background: var(--gradient-gold);
    color: var(--text-inverse);
}

.no-product {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    width: 100%;
}

.no-product i {
    font-size: 3.5rem;
    color: var(--border-color);
    display: block;
    margin-bottom: 14px;
}

.no-product p {
    font-size: var(--font-size-lg);
}

/* ================================================================
   ۱۱. سایدبار سبد خرید
   ================================================================ */

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    visibility: hidden;
    opacity: 0;
    transition: all var(--transition);
    z-index: 9998;
}

.cart-overlay.open {
    visibility: visible;
    opacity: 1;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 92%;
    height: 100%;
    background: var(--bg-secondary);
    padding: 24px 20px;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    z-index: 9999;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--border-color);
}

body.light .cart-sidebar {
    background: #ffffff;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.06);
}

.cart-sidebar.open {
    transform: translateX(0);
}

.cart-sidebar h2 {
    font-size: var(--font-size-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
    color: var(--text-primary);
}

.cart-sidebar h2 i:first-child {
    color: var(--gold);
}

.cart-sidebar h2 i.fa-times {
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition);
    font-size: var(--font-size-xl);
}

.cart-sidebar h2 i.fa-times:hover {
    color: var(--red);
}

.cart-sidebar .cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 16px;
}

.cart-sidebar .cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-sidebar .cart-item .cart-image-wrapper {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-sidebar .cart-item .cart-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 4px;
}

.cart-sidebar .cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-sidebar .cart-item-info h4 {
    font-size: var(--font-size-md);
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-sidebar .cart-item-info p {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--gold);
}

body.light .cart-sidebar .cart-item-info p {
    color: var(--purple);
}

.cart-sidebar .cart-item-info small {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
}

.cart-sidebar .cart-item-remove {
    color: var(--red);
    cursor: pointer;
    font-size: var(--font-size-lg);
    transition: all var(--transition);
    padding: 4px;
}

.cart-sidebar .cart-item-remove:hover {
    transform: scale(1.15);
}

.cart-sidebar .cart-total {
    font-size: var(--font-size-xl);
    font-weight: 700;
    padding: 14px 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    color: var(--text-primary);
}

.cart-sidebar .cart-total span:last-child {
    color: var(--gold);
}

body.light .cart-sidebar .cart-total span:last-child {
    color: var(--purple);
}

.cart-sidebar .checkout-btn {
    background: var(--gradient-gold);
    color: var(--text-inverse);
    border: none;
    padding: 13px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: var(--font-size-lg);
    cursor: pointer;
    transition: all var(--transition);
    width: 100%;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cart-sidebar .checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 215, 0, 0.2);
}

.cart-sidebar .empty-cart {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
}

.cart-sidebar .empty-cart i {
    font-size: 3.5rem;
    color: var(--border-color);
    display: block;
    margin-bottom: 14px;
}

/* ================================================================
   ۱۲. توست
   ================================================================ */

.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-md);
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    max-width: 90%;
    text-align: center;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* ================================================================
   ۱۳. دکمه شناور پشتیبانی
   ================================================================ */

.support-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 6px 28px rgba(108, 92, 231, 0.35);
    transition: all var(--transition);
    z-index: 999;
    border: 2px solid rgba(255, 255, 255, 0.05);
}

.support-float:hover {
    transform: scale(1.08) translateY(-3px);
    background: var(--gradient-gold);
    color: var(--text-inverse);
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.25);
}

/* ================================================================
   ۱۴. فوتر
   ================================================================ */

footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 36px 0 18px;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section {
    flex: 1;
    min-width: 170px;
}

.footer-section h3 {
    font-size: var(--font-size-lg);
    color: var(--gold);
    margin-bottom: 12px;
    font-weight: 700;
}

body.light .footer-section h3 {
    color: var(--purple);
}

.footer-section p,
.footer-section a {
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
    font-size: var(--font-size-md);
    transition: all var(--transition);
}

.footer-section a:hover {
    color: var(--gold);
    padding-right: 4px;
}

.social-icons {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin: 18px 0;
}

.social-icons a {
    color: var(--text-secondary);
    font-size: var(--font-size-xl);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}

.social-icons a:hover {
    color: var(--gold);
    border-color: var(--gold);
    transform: translateY(-3px);
    background: rgba(255, 215, 0, 0.03);
}

.copyright {
    text-align: center;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin-top: 20px;
}

/* ================================================================
   ۱۵. ریسپانسیو
   ================================================================ */

@media (max-width: 991px) {
    .nav-center {
        max-width: 280px;
    }
    .user-profile .user-name,
    .user-profile .user-email {
        max-width: 50px;
    }
    .gallery-item {
        flex: 0 1 200px;
        max-width: 200px;
    }
    main.container {
        max-width: 720px;
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 6px 0;
    }
    .nav-container {
        padding: 0 12px;
        gap: 10px;
    }
    .nav-center {
        max-width: 160px;
        min-width: 70px;
    }
    .search-box {
        padding: 4px 12px;
    }
    .search-box input {
        font-size: var(--font-size-sm);
    }
    .search-box i {
        font-size: var(--font-size-sm);
        margin-left: 8px;
    }
    .logo {
        font-size: var(--font-size-lg);
    }
    .menu-toggle {
        width: 34px;
        height: 34px;
        font-size: var(--font-size-md);
    }
    .theme-btn {
        display: none;
    }
    .cart-icon-link {
        font-size: var(--font-size-lg);
        padding: 2px 6px;
    }
    .cart-count {
        font-size: 0.55rem;
        min-width: 18px;
        padding: 0 6px;
    }
    .user-profile {
        padding: 2px 8px 2px 2px;
    }
    .user-profile .avatar-wrapper {
        width: 28px;
        height: 28px;
    }
    .user-profile .user-name,
    .user-profile .user-email {
        display: none;
    }
    .user-profile .logout-btn {
        font-size: 0.6rem;
        padding: 1px 8px;
    }
    .user-profile .login-link {
        font-size: 0.65rem;
        padding: 2px 10px;
    }
    .store-banner {
        padding: 10px 16px;
        margin: 8px 0 16px;
    }
    .store-banner p {
        font-size: var(--font-size-sm);
    }
    .section-title {
        font-size: var(--font-size-xl);
        margin: 15px 0 18px;
        padding-right: 10px;
    }
    .gallery {
        gap: 14px;
        margin: 5px 0 30px;
    }
    .gallery-item {
        flex: 0 1 calc(50% - 7px);
        max-width: calc(50% - 7px);
    }
    .gallery-item .image-wrapper {
        padding-top: 75%;
    }
    .gallery-item .image-wrapper img {
        padding: 10px;
    }
    .gallery-item .gallery-caption {
        padding: 10px 12px 14px;
    }
    .gallery-item .gallery-caption h3 {
        font-size: var(--font-size-md);
        min-height: 24px;
    }
    .gallery-item .gallery-caption .desc {
        font-size: var(--font-size-xs);
        min-height: 32px;
        -webkit-line-clamp: 1;
    }
    .gallery-item .gallery-caption .price {
        font-size: var(--font-size-lg);
        padding-top: 8px;
    }
    .gallery-item .buy-btn {
        font-size: var(--font-size-sm);
        padding: 9px;
    }
    .support-float {
        width: 64px;
        height: 64px;
        font-size: 1.8rem;
        bottom: 24px;
        right: 24px;
    }
    .footer-content {
        flex-direction: column;
        gap: 18px;
        text-align: center;
    }
    .footer-section {
        min-width: unset;
        width: 100%;
    }
    .footer-section h3 {
        font-size: var(--font-size-md);
    }
    .footer-section p,
    .footer-section a {
        font-size: var(--font-size-sm);
    }
    main.container {
        max-width: 540px;
        padding: 0 12px;
    }
}

@media (max-width: 575px) {
    .navbar {
        padding: 4px 0;
    }
    .nav-container {
        padding: 0 10px;
        gap: 8px;
        min-height: 36px;
    }
    .nav-center {
        max-width: 120px;
        min-width: 60px;
    }
    .search-box {
        padding: 3px 10px;
    }
    .search-box input {
        font-size: 0.55rem;
        padding: 3px 0;
    }
    .search-box i {
        font-size: 0.6rem;
        margin-left: 6px;
    }
    .logo {
        font-size: var(--font-size-md);
    }
    .logo i {
        font-size: var(--font-size-sm);
    }
    .menu-toggle {
        width: 30px;
        height: 30px;
        font-size: var(--font-size-sm);
        border-radius: 4px;
    }
    .cart-icon-link {
        font-size: var(--font-size-md);
        padding: 2px 4px;
    }
    .cart-count {
        font-size: 0.4rem;
        min-width: 14px;
        padding: 0 4px;
    }
    .user-profile .avatar-wrapper {
        width: 24px;
        height: 24px;
        border-width: 1.5px;
    }
    .user-profile .login-link {
        font-size: 0.5rem;
        padding: 1px 6px;
    }
    .store-banner {
        padding: 6px 10px;
        margin: 4px 0 10px;
    }
    .store-banner p {
        font-size: var(--font-size-xs);
    }
    .section-title {
        font-size: var(--font-size-md);
        margin: 10px 0 12px;
        padding-right: 8px;
        border-right-width: 3px;
    }
    .gallery {
        gap: 10px;
        margin: 0 0 16px;
    }
    .gallery-item {
        flex: 0 1 calc(50% - 5px);
        max-width: calc(50% - 5px);
        border-radius: var(--radius-sm);
    }
    .gallery-item .image-wrapper {
        padding-top: 80%;
    }
    .gallery-item .image-wrapper img {
        padding: 6px;
    }
    .gallery-item .gallery-caption {
        padding: 6px 8px 8px;
    }
    .gallery-item .gallery-caption h3 {
        font-size: var(--font-size-sm);
        min-height: 18px;
    }
    .gallery-item .gallery-caption .desc {
        font-size: 0.55rem;
        min-height: 22px;
        -webkit-line-clamp: 1;
        margin-bottom: 4px;
    }
    .gallery-item .gallery-caption .price {
        font-size: var(--font-size-md);
        padding-top: 4px;
    }
    .gallery-item .buy-btn {
        font-size: 0.6rem;
        padding: 5px;
        margin-top: 6px;
    }
    .support-float {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
        bottom: 18px;
        right: 18px;
    }
    .toast-notification {
        padding: 6px 14px;
        font-size: var(--font-size-sm);
        bottom: 10px;
        max-width: 95%;
    }
    .no-product {
        padding: 20px 15px;
    }
    .no-product i {
        font-size: 2.5rem;
    }
    .no-product p {
        font-size: var(--font-size-md);
    }
    main.container {
        max-width: 100%;
        padding: 0 8px;
    }
    .copyright {
        font-size: var(--font-size-xs);
        padding-top: 12px;
    }
    .social-icons a {
        width: 36px;
        height: 36px;
        font-size: var(--font-size-lg);
    }
}