:root {
    --primary: #6366f1;
    --accent: #ec4899;
    --success: #10b981;
    --bg: #ffffff;
    --text: #1e293b;
    --card: #ffffff;
    --border: #e2e8f0;
    --dark: #1e293b;
    --light: #f8fafc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'IRANSansXFaNum', 'Vazirmatn', sans-serif !important;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansXFaNum-Regular.woff2') format('woff2'),
         url('../fonts/IRANSansXFaNum-Regular.woff') format('woff');
    font-display: swap;
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/IRANSansXFaNum-Bold.woff2') format('woff2'),
         url('../fonts/IRANSansXFaNum-Bold.woff') format('woff');
    font-display: swap;
    font-weight: bold;
    font-style: normal;
}









i, .fas, .far, .fab, .fa, [class*="fa-"] {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands' !important;
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    line-height: 1.6;
    padding-top: 0;
}

/* ========== انیمیشن‌ها ========== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px color-mix(in srgb, var(--primary) 30%, transparent); }
    50% { box-shadow: 0 0 30px color-mix(in srgb, var(--primary) 50%, transparent); }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== منوی اصلی ========== */
.main-nav {
    background: color-mix(in srgb, var(--card) 95%, transparent);
   
    backdrop-filter: blur(10px);
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-icon {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 3px 10px color-mix(in srgb, var(--primary) 30%, transparent);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item { position: relative; }

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* دکمه منوی موبایل */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: var(--primary);
    color: white;
}

/* منوی کشویی موبایل */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1060;
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--card);
        flex-direction: column;
        padding: 5rem 1rem 2rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        z-index: 1065;
        gap: 0;
        overflow-y: auto;
    }
    .nav-menu.active { right: 0; }
    .nav-overlay.active { display: block; }
    .nav-item { width: 100%; }
    .nav-link {
        padding: 0.8rem 1rem;
        border-radius: 8px;
        width: 100%;
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
}

/* ========== اقدامات نوار ========== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.date-display {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    animation: slideIn 0.6s ease-out;
}

/* کاربر */
.user-menu { position: relative; z-index: 1060; }

.user-btn {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border: none;
    border-radius: 25px;
    padding: 6px 16px;
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 30%, transparent);
    position: relative;
    z-index: 1061;
    animation: slideIn 0.6s ease-out 0.2s both;
    font-size: 0.85rem;
}

.user-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 40%, transparent);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card);
    border-radius: 12px;
    padding: 0.8rem 0;
    min-width: 200px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.3s;
    z-index: 9999;
    margin-top: 6px;
    border: 1px solid var(--border);
}

.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 0.6rem 1.2rem;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    font-size: 0.85rem;
}

.user-dropdown a:hover {
    background: #f1f5f9;
    color: var(--primary);
}

/* سبد خرید */
.cart-icon-badge {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cart-icon-badge:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.cart-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: linear-gradient(45deg, var(--accent), #f97316);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ========== هدر اصلی ========== */
.main-header {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 1.5rem 0 1.2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1020;
    margin-top: 0;
}

.main-header::before {
  

    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,20 L100,100 L0,100 Z" fill="rgba(255,255,255,0.1)"/></svg>') no-repeat bottom;
    background-size: cover;
    z-index: 1;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 2;
}

.shape {
    position: absolute;
    opacity: 0.08;
    animation: float 6s ease-in-out infinite;
    font-size: 1.3rem;
    z-index: 3;
}
.shape:nth-child(1) { top: 15%; left: 10%; animation-delay: 0s; }
.shape:nth-child(2) { top: 60%; right: 12%; animation-delay: 2s; }
.shape:nth-child(3) { bottom: 20%; left: 15%; animation-delay: 4s; }

.header-content {
    position: relative;
    z-index: 10;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.header-icons {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-icon {
    width: 110px;
    height: 110px;
    animation: bounce 3s ease-in-out infinite;
    opacity: 0.9;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    z-index: 11;
    position: relative;
}
.header-icon-left { animation-delay: 0.5s; }
.header-icon-right { animation-delay: 1s; }

.header-text {
    flex: 1;
    min-width: 0;
    text-align: center;
    position: relative;
    z-index: 11;
}

.header-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 0.8rem 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    animation: slideIn 0.8s ease-out 0.3s both;
    line-height: 1.3;
    white-space: nowrap;
    position: relative;
    z-index: 12;
}

.header-subtitle {
    font-size: 1rem;
    margin: 0 0 1rem 0;
    opacity: 0.92;
    animation: slideIn 0.8s ease-out 0.5s both;
    line-height: 1.4;
    font-weight: 400;
    white-space: nowrap;
    position: relative;
    z-index: 12;
}

.header-features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0;
    flex-wrap: nowrap;
    overflow: hidden;
    position: relative;
    z-index: 12;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    opacity: 0.9;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    z-index: 13;
}

.feature-icon {
    background: rgba(255,255,255,0.2);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* ========== محصولات ========== */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 2rem 0;
    position: relative;
}
.section-divider::after {
    content: '';
    position: absolute;
    top: -4px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 8px;
    background: var(--primary);
    border-radius: 4px;
    opacity: 0.7;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.product-card {
    background: var(--card);
    border-radius: 16px;
    padding: 1.2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 1;
    animation: slideIn 0.6s ease-out;
    border: 1px solid var(--border);
}
.product-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px color-mix(in srgb, var(--primary) 15%, transparent);
    border-color: var(--primary);
}

.product-img-container {
    text-align: center;
    margin-bottom: 0.8rem;
}
.product-img {
    width: 100%;
    max-width: 180px;
    height: 140px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--light);
    border: 2px solid var(--border);
    padding: 8px;
    transition: all 0.3s ease;
}
.product-card:hover .product-img {
    border-color: var(--primary);
    transform: scale(1.03);
}

.product-info { flex-grow: 1; margin-bottom: 1rem; }
.product-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.4rem;
    line-height: 1.4;
}
.product-desc {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 0;
    line-height: 1.5;
}

.price-container { text-align: center; margin-bottom: 1rem; }
.price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}
.old-price {
    font-size: 0.9rem;
    color: #94a3b8;
    text-decoration: line-through;
    margin-right: 6px;
}

/* ========== دکمه‌ها ========== */
.btn-pay, .btn-add-to-cart {
    border: none;
    border-radius: 25px;
    padding: 10px 24px;
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s;
    width: 100%;
    position: relative;
    overflow: hidden;
}
.btn-pay {
    background: linear-gradient(45deg, var(--success), #34d399);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--success) 30%, transparent);
    margin-top: 0;
}
.btn-add-to-cart {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary) 30%, transparent);
    margin-top: 0.5rem;
}
.btn-pay::before, .btn-add-to-cart::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.btn-pay:hover::before, .btn-add-to-cart:hover::before { left: 100%; }
.btn-pay:hover, .btn-add-to-cart:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--success) 40%, transparent);
}

.card-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}



/* ========== نمایش لیستی ========== */
.list-view { display: none; }
.grid-view { display: block; }

.product-list-item {
    background: var(--card);
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    animation: slideIn 0.6s ease-out;
    border: 1px solid var(--border);
}
.product-list-item:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 12px 30px color-mix(in srgb, var(--primary) 15%, transparent);
    border-color: var(--primary);
}
.list-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    border-radius: 12px;
    flex-shrink: 0;
    background: var(--light);
    border: 2px solid var(--border);
    padding: 6px;
    transition: all 0.3s ease;
}
.product-list-item:hover .list-img {
    border-color: var(--primary);
    transform: scale(1.05);
}
.list-info { flex-grow: 1; min-width: 0; }
.list-price-container { text-align: left; white-space: nowrap; margin-left: 1rem; }
.list-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.list-btn-pay, .list-btn-add-to-cart {
    border: none;
    border-radius: 25px;
    padding: 8px 16px;
    font-weight: 600;
    color: white;
    font-size: 0.85rem;
    transition: all 0.3s;
}
.list-btn-pay {
    background: linear-gradient(45deg, var(--success), #34d399);
    box-shadow: 0 4px 15px color-mix(in srgb, var(--success) 30%, transparent);
}
.list-btn-add-to-cart {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary) 30%, transparent);
}
.list-btn-pay:hover, .list-btn-add-to-cart:hover { transform: translateY(-2px); }

/* ========== دکمه‌های تغییر نمایش ========== */
.view-toggle-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.view-toggle-label {
    font-size: 0.75rem;
    color: var(--text);
    margin-bottom: 5px;
    text-align: center;
    font-weight: 600;
}
.view-toggle-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.view-toggle-btn {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text);
    font-size: 0.9rem;
}
.view-toggle-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
.view-toggle-btn:hover { transform: scale(1.1); }

/* ========== تم‌سوییچر ========== */
.theme-switcher {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}
.theme-btn {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-btn:hover {
    transform: scale(1.08) rotate(12deg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.theme-options {
    position: absolute;
    bottom: 60px;
    left: 0;
    background: var(--card);
    border-radius: 15px;
    padding: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    gap: 8px;
    border: 1px solid var(--border);
    min-width: 180px;
}
.theme-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: transform 0.3s ease;
}
.theme-option:hover {
    transform: scale(1.15);
    border-color: var(--primary);
}
.theme-light { background: linear-gradient(45deg, #6366f1, #ec4899); }
.theme-dark { background: linear-gradient(45deg, #8b5cf6, #f97316); }
.theme-ocean { background: linear-gradient(45deg, #06b6d4, #3b82f6); }
.theme-sunset { background: linear-gradient(45deg, #f97316, #eab308); }
.theme-forest { background: linear-gradient(45deg, #16a34a, #65a30d); }
.theme-royal { background: linear-gradient(45deg, #7c3aed, #c026d3); }

/* ========== فوتر ========== */
.footer {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    padding: 2.5rem 0 1.2rem;
    margin-top: auto;
    position: relative;
    z-index: 1;
}
.footer h5 {
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
    font-size: 1.1rem;
}
.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border-radius: 2px;
}
.footer-links a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
    font-size: 0.85rem;
}
.footer-links a:hover {
    color: white;
    transform: translateX(-3px);
}
.footer-links a i {
    margin-left: 6px;
    width: 14px;
    text-align: center;
    font-size: 0.8rem;
}
.social-links {
    display: flex;
    gap: 10px;
    margin-top: 1.2rem;
}
.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s;
}
.social-links a:hover {
    background: var(--primary);
    transform: translateY(-2px) scale(1.1);
}
.copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.2rem;
    margin-top: 1.5rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
}

/* نمادهای اعتماد */
.trust-symbols-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.trust-symbol {
    background: var(--card);
    border-radius: 10px;
    padding: 10px;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}
.trust-symbol:hover {
    background: #f8fafc;
    transform: translateX(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
    border-color: var(--primary);
}
.trust-img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    transition: all 0.3s ease;
    border-radius: 6px;
    flex-shrink: 0;
}
.trust-text {
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: right;
    flex-grow: 1;
}
.trust-symbol:hover .trust-img { transform: scale(1.08); }

/* ========== موبایل ========== */
@media (max-width: 768px) {
    /* نوار */
    .nav-content { padding: 0 10px; gap: 10px; }
    .nav-logo { font-size: 1rem !important; max-width: 140px; }
    .nav-logo span {
        white-space: nowrap;
        overflow: visible !important;
        text-overflow: unset !important;
        display: block;
    }
    .logo-icon { font-size: 1.2rem !important; margin-left: 5px; }
    .user-btn {
        padding: 6px 10px !important;
        font-size: 0.8rem !important;
    }
    .user-btn span { display: none !important; }
    .cart-icon-badge { font-size: 1rem !important; padding: 6px !important; }
    .cart-badge {
        font-size: 0.7rem !important;
        width: 16px !important;
        height: 16px !important;
    }
    .date-display { display: none !important; }

    /* هدر */
    .main-header { padding: 1.2rem 0 1rem; }
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0 15px;
    }
    .header-icons { display: none; }
    .header-text { order: 1; }
    .header-title {
        font-size: 1.3rem;
        white-space: normal;
        line-height: 1.3;
        margin-bottom: 0.6rem;
    }
    .header-subtitle {
        font-size: 0.85rem;
        white-space: normal;
        line-height: 1.4;
        margin-bottom: 0.8rem;
    }
    .header-features {
        flex-wrap: wrap;
        gap: 0.8rem;
        justify-content: center;
    }
    .feature-item { font-size: 0.75rem; }

    /* محصولات */
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 10px;
    }
    .product-card {
        padding: 20px !important;
        margin: 0 !important;
    }
    .product-img-container { height: 180px !important; }
    .product-img { height: 160px !important; width: auto !important; max-width: 100%; object-fit: contain; }
    .product-name { font-size: 1.1rem !important; }
    .product-desc { font-size: 0.9rem !important; }
    .price { font-size: 1.2rem !important; }
    .old-price { font-size: 0.9rem !important; }
    .btn-pay, .btn-add-to-cart {
        font-size: 0.9rem !important;
        padding: 10px 15px !important;
        height: 44px;
    }

    /* لیستی */
    .product-list-item {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    .list-img { width: 80px; height: 80px; }
    .list-price-container { margin-left: 0; text-align: center; }
    .list-actions { width: 100%; justify-content: center; }

    /* تغییر نمایش */
    .view-toggle-options {
        margin-top: 8px;
        padding-top: 8px;
    }
    .view-toggle-label { font-size: 0.7rem; }
    .view-toggle-btn { width: 28px; height: 28px; font-size: 0.8rem; }

    /* فوتر */
    .footer .col-md-3, .footer .col-md-2 { margin-bottom: 1.5rem; padding: 0 8px; }
    .trust-symbols-vertical { gap: 10px; }
    .trust-symbol { padding: 8px; gap: 8px; margin: 0 4px; }
    .trust-img { width: 40px; height: 40px; }
    .trust-text { font-size: 0.8rem; }
}

@media (max-width: 576px) {
    .nav-logo { max-width: 130px; }
    .nav-logo span { font-size: 0.95rem !important; }
    .products-grid { gap: 15px !important; }
    .product-card { padding: 18px !important; }
    .product-img-container { height: 170px !important; }
    .product-img { height: 150px !important; }
    .card-actions { flex-direction: column; gap: 10px; }
    .btn-pay, .btn-add-to-cart { width: 100% !important; }
}
@media (max-width: 380px) {
    .nav-logo { max-width: 120px; }
    .nav-logo span { font-size: 0.9rem !important; }
    .mobile-menu-btn { padding: 4px !important; font-size: 1.2rem !important; }
    .user-btn { padding: 4px 8px !important; }
    .product-card { padding: 15px !important; }
    .product-img-container { height: 160px !important; }
    .product-img { height: 140px !important; }
    .product-name { font-size: 1rem !important; }
}

/* ========== لنداسکیپ موبایل ========== */
@media (max-width: 768px) and (orientation: landscape) {
    .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 15px !important; }
    .product-img-container { height: 140px !important; }
    .product-img { height: 120px !important; }
    .product-name { font-size: 1rem !important; }
}

/* ========== مودال ========== */
.modal-content {
    border-radius: 20px !important;
    border: none !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
    background: var(--card) !important;
}
.modal-header {
    background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
    color: white !important;
    border-radius: 20px 20px 0 0 !important;
    border: none !important;
    padding: 1.5rem !important;
}
.modal-title {
    font-weight: 700 !important;
    font-size: 1.3rem !important;
}
.modal-body {
    padding: 2rem !important;
    background: var(--card) !important;
}
.btn-close {
    filter: invert(1) !important;
    opacity: 0.8 !important;
}
.btn-close:hover { opacity: 1 !important; }
body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
}

/* ========== تم تاریک ========== */
[data-bs-theme="dark"] .modal-content,
.theme-dark .modal-content {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
}
[data-bs-theme="dark"] .modal-body,
.theme-dark .modal-body {
    background: #1e293b !important;
    color: #f1f5f9 !important;
}
[data-bs-theme="dark"] .form-control,
.theme-dark .form-control {
    background: #334155 !important;
    border: 1px solid #475569 !important;
    color: #f1f5f9 !important;
}
[data-bs-theme="dark"] .form-control::placeholder,
.theme-dark .form-control::placeholder {
    color: #94a3b8 !important;
}
[data-bs-theme="dark"] .form-text,
.theme-dark .form-text {
    color: #94a3b8 !important;
}

/* ========== قابلیت خوانایی اعداد فارسی ========== */
*,
*::before,
*::after {
    -moz-font-feature-settings: "ss02" 1;
    -webkit-font-feature-settings: "ss02" 1;
    font-feature-settings: "ss02" 1;
}



.modal-body {
    padding: 2rem !important;
    background: var(--card) !important;
    border-radius: 20px;
}








/* استایل جدید مدت اعتبار در گوشه چپ بالا */
.validity-badge {
    position: absolute;
    top: 10px;
    right: 5px; /* تغییر از left به right */
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: 2px 10px;
    border-radius:25px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    z-index: 2;
    backdrop-filter: blur(10px);
}

.validity-badge i {
    font-size: 0.7rem;
}


/* رنگ‌های مختلف برای مدت‌های اعتبار مختلف */
.validity-badge[data-period="یکساله"] {
background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.validity-badge[data-period="شش ماهه"] {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.validity-badge[data-period="سه ماهه"] {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.validity-badge[data-period="یک ماهه"] {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* برای نمایش موبایل در لیست ویو */
.list-view .validity-badge {
    top: 8px;
    right: 8px;
    font-size: 0.7rem;
    padding: 5px 10px;
}

.list-view .discount-badge {
    top: 8px;
    left: 8px;
    font-size: 0.7rem;
    padding: 5px 8px;
}

/* اگر هر دو نشان وجود داشتند، مطمئن شو فضای کافی هست */
.product-card:has(.discount-badge):has(.validity-badge) .discount-badge,
.product-list-item:has(.discount-badge):has(.validity-badge) .discount-badge {
    max-width: 70px;
    text-align: center;
}

.product-card:has(.discount-badge):has(.validity-badge) .validity-badge,
.product-list-item:has(.discount-badge):has(.validity-badge) .validity-badge {
    max-width: 80px;
    text-align: center;
}

/* برای موبایل‌های کوچک */
@media (max-width: 480px) {
    .validity-badge {
        font-size: 0.65rem;
        padding: 4px 8px;
        right: 6px;
        top: 6px;
    }
    
    .discount-badge {
        font-size: 0.65rem;
        padding: 4px 6px;
        left: 6px;
        top: 6px;
    }
    
    .product-card:has(.discount-badge):has(.validity-badge) .discount-badge,
    .product-list-item:has(.discount-badge):has(.validity-badge) .discount-badge {
        max-width: 60px;
    }
    
    .product-card:has(.discount-badge):has(.validity-badge) .validity-badge,
    .product-list-item:has(.discount-badge):has(.validity-badge) .validity-badge {
        max-width: 70px;
    }
}






/* استایل ساده‌تر نشان تخفیف دایره‌ای */
.discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #ff4757, #ff3838);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 
        0 6px 20px rgba(255, 71, 87, 0.4),
        0 0 0 3px rgba(255, 255, 255, 0.9);
    z-index: 3;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.discount-badge:hover {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 
        0 8px 25px rgba(255, 71, 87, 0.6),
        0 0 0 3px rgba(255, 255, 255, 1);
}

.discount-percent {
    font-size: 1rem;
    line-height: 1;
    margin-bottom: -2px;
}

.discount-text {
    font-size: 0.55rem;
    opacity: 0.9;
    line-height: 1;
}

/* برای موبایل */
@media (max-width: 768px) {
    .discount-badge {
        width: 50px;
        height: 50px;
        top: 10px;
        left: 10px;
    }
    
    .discount-percent {
        font-size: 0.8rem;
    }
    
    .discount-text {
        font-size: 0.45rem;
    }
}









