@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazir-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazir-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazir-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* ریست استایل‌ها */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

/* بدنه اصلی */
body {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0fa 100%);
    min-height: 100vh;
    font-family: 'Vazirmatn', Arial, sans-serif;
    color: #1e3a8a;
    direction: rtl;
    line-height: 1.8;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    color: #f1f5f9;
}

/* ویگنت */
.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, transparent 50%, rgba(30, 58, 138, 0.2));
}

body.dark-mode .vignette {
    background: radial-gradient(circle at center, transparent 50%, rgba(255, 255, 255, 0.1));
}

/* کانتینر */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* نوار ناوبری */
.navbar {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    min-height: 60px;
    transition: background 0.3s ease, border-bottom 0.3s ease;
}

body.dark-mode .navbar {
    background: rgba(30, 41, 59, 0.97);
    border-bottom: 1px solid rgba(100, 116, 139, 0.3);
}

.logo-container {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.logo-img {
    max-width: 100px; /* اندازه لوگو برای دسکتاپ */
    height: auto;
    margin-left: 0.75rem;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.logo-img:hover {
    transform: scale(1.1);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-right: 2rem;
}

.nav-menu a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    position: relative;
}

body.dark-mode .nav-menu a {
    color: #60a5fa;
}

.nav-menu a:hover {
    color: #1e40af;
}

body.dark-mode .nav-menu a:hover {
    color: #93c5fd;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #1e40af;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

body.dark-mode .nav-menu a::after {
    background: #93c5fd;
}

.nav-menu a:hover::after {
    width: 50%;
}

.nav-menu .admin-link {
    background: rgba(245, 166, 35, 0.1);
    border-radius: 12px;
    padding: 0.5rem 1.2rem;
    color: #f5a623;
    font-weight: 600;
}

body.dark-mode .nav-menu .admin-link {
    background: rgba(245, 166, 35, 0.2);
    color: #f5a623;
}

.nav-menu .admin-link:hover {
    background: rgba(245, 166, 35, 0.2);
    color: #1e40af;
}

body.dark-mode .nav-menu .admin-link:hover {
    background: rgba(245, 166, 35, 0.3);
    color: #93c5fd;
}

.nav-menu #user-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu #user-status span {
    font-size: 0.9rem;
    color: #3b82f6;
    min-width: 80px;
    text-align: left;
    transition: opacity 0.3s ease;
    opacity: 0;
}

body.dark-mode .nav-menu #user-status span {
    color: #60a5fa;
}

.nav-menu #user-status span.loaded {
    opacity: 1;
}

.nav-menu #user-status a {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

body.dark-mode .nav-menu #user-status a {
    background: rgba(100, 116, 139, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.nav-menu #user-status a:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #1e40af;
}

body.dark-mode .nav-menu #user-status a:hover {
    background: rgba(100, 116, 139, 0.3);
    color: #93c5fd;
}

.contact-info {
    font-size: 0.9rem;
    color: #3b82f6;
    margin-left: 1rem;
}

body.dark-mode .contact-info {
    color: #60a5fa;
}

.hamburger {
    display: none;
    cursor: pointer;
    order: -1;
}

.hamburger div {
    width: 28px;
    height: 3px;
    background-color: #3b82f6;
    margin: 6px 0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

body.dark-mode .hamburger div {
    background-color: #60a5fa;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    stroke: #3b82f6;
    transition: stroke 0.3s ease;
}

body.dark-mode .theme-toggle svg {
    stroke: #60a5fa;
}

.theme-toggle:hover svg {
    stroke: #1e40af;
}

body.dark-mode .theme-toggle:hover svg {
    stroke: #93c5fd;
}

/* استایل‌های نوار جستجو (داخل هدر) */
.search-container {
    position: relative;
    width: 300px;
    margin: 0 1rem;
    z-index: 1100; /* بالاتر از سایر عناصر هدر */
}

.search-input {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    background: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    color: #1e3a8a;
    transition: all 0.3s ease;
}

body.dark-mode .search-input {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: #f1f5f9;
}

.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

body.dark-mode .search-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 12px rgba(100, 116, 139, 0.5);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: #3b82f6;
}

body.dark-mode .search-icon {
    stroke: #60a5fa;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1200; /* بالاتر از هدر */
    display: none;
}

body.dark-mode .search-results {
    background: rgba(30, 41, 59, 0.98);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    cursor: pointer;
    transition: background 0.3s ease;
}

body.dark-mode .search-result-item {
    border-bottom: 1px solid rgba(100, 116, 139, 0.3);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

body.dark-mode .search-result-item:hover {
    background: rgba(100, 116, 139, 0.2);
}

.search-result-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    margin-left: 0.75rem;
}

.search-result-item div {
    flex: 1;
}

.search-result-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 0.25rem;
}

body.dark-mode .search-result-item h4 {
    color: #f1f5f9;
}

.search-result-item p {
    font-size: 0.85rem;
    color: #3b82f6;
}

body.dark-mode .search-result-item p {
    color: #60a5fa;
}

.no-results {
    padding: 0.75rem;
    text-align: center;
    color: #3b82f6;
    font-size: 0.9rem;
}

body.dark-mode .no-results {
    color: #60a5fa;
}

/* استایل‌های باقی‌مانده از فایل اصلی */
.card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    overflow: hidden;
}

body.dark-mode .card {
    background: rgba(30, 41, 59, 0.98);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.3);
}

body.dark-mode .card:hover {
    box-shadow: 0 12px 40px rgba(100, 116, 139, 0.3);
}

.card img,
.card .shimmer {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 24px 24px 0 0;
    transition: transform 0.4s ease;
}

.card .shimmer {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2) 25%, rgba(59, 130, 246, 0.4) 50%, rgba(59, 130, 246, 0.2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    position: absolute;
    top: 0;
    left: 0;
}

body.dark-mode .card .shimmer {
    background: linear-gradient(90deg, rgba(100, 116, 139, 0.2) 25%, rgba(100, 116, 139, 0.4) 50%, rgba(100, 116, 139, 0.2) 75%);
}

.card img.loaded {
    opacity: 1;
}

.card img:not(.loaded) {
    opacity: 0;
}

.card:hover img {
    transform: scale(1.08);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.card p {
    color: #1e3a8a;
    font-size: 0.95rem;
    margin: 0.75rem 0;
    text-align: right;
}

body.dark-mode .card p {
    color: #f1f5f9;
}

h1,
h2,
h3 {
    color: #3b82f6;
    font-weight: 800;
    text-align: center;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
    color: #60a5fa;
}

input,
select,
textarea,
button {
    font-family: 'Vazirmatn', Arial, sans-serif;
    border-radius: 12px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #1e3a8a;
    transition: all 0.3s ease;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea,
body.dark-mode button {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(100, 116, 139, 0.3);
    color: #f1f5f9;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
    outline: none;
}

body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 12px rgba(100, 116, 139, 0.5);
}

select {
    background: rgba(255, 255, 255, 0.95);
    color: #1e3a8a;
    appearance: none;
    padding-right: 2.5rem;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMyAxMC41TDEyIDYuNSIgc3Ryb2tlPSIjM0I4MkY2IiBzdHJva2Utd2lkdGg9IjIuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PHBhdGggZD0iTTEyIDEwLjVMMyA2LjUiIHN0cm9rZT0iIzNCODJGNiIgc3Ryb2tlLXdpZHRoPSIyLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjwvc3ZnPg==');
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
}

body.dark-mode select {
    background: rgba(30, 41, 59, 0.95);
    color: #f1f5f9;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMyAxMC41TDEyIDYuNSIgc3Ryb2tlPSIjNjBhNWZhIiBzdHJva2Utd2lkdGg9IjIuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+PHBhdGggZD0iTTEyIDEwLjVMMyA2LjUiIHN0cm9rZT0iIzYwYTVmYSIgc3Ryb2tlLXdpZHRoPSIyLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPjwvc3ZnPg==');
}

button {
    background: linear-gradient(45deg, #3b82f6, #60a5fa);
    border: none;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    padding: 1rem 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

body.dark-mode button {
    background: linear-gradient(45deg, #1e40af, #60a5fa);
}

button:hover {
    background: linear-gradient(45deg, #1e40af, #3b82f6);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
}

body.dark-mode button:hover {
    background: linear-gradient(45deg, #1e3a8a, #93c5fd);
    box-shadow: 0 0 15px rgba(100, 116, 139, 0.6);
}

button:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

body.dark-mode button:disabled {
    background: #4b5563;
}

.product-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.explore-tab {
    background: rgba(59, 130, 246, 0.15);
    color: #1e3a8a;
    border: 1px solid rgba(59, 130, 246, 0.4);
    padding: 0.7rem 1.4rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

body.dark-mode .explore-tab {
    background: rgba(100, 116, 139, 0.2);
    color: #f1f5f9;
    border: 1px solid rgba(100, 116, 139, 0.4);
}

.explore-tab.active {
    background: linear-gradient(45deg, #3b82f6, #60a5fa);
    color: #fff;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

body.dark-mode .explore-tab.active {
    background: linear-gradient(45deg, #1e40af, #60a5fa);
    box-shadow: 0 0 12px rgba(100, 116, 139, 0.6);
}

.explore-tab:hover {
    background: rgba(59, 130, 246, 0.25);
}

body.dark-mode .explore-tab:hover {
    background: rgba(100, 116, 139, 0.3);
}

.cart-icon {
    position: relative;
}

.cart-icon svg {
    stroke: #3b82f6;
    width: 28px;
    height: 28px;
    transition: stroke 0.3s ease;
}

body.dark-mode .cart-icon svg {
    stroke: #60a5fa;
}

.cart-icon:hover svg {
    stroke: #1e40af;
}

body.dark-mode .cart-icon:hover svg {
    stroke: #93c5fd;
}

.swiper-container {
    width: 100%;
    padding: 2rem 0;
    height: clamp(300px, 50vh, 500px);
    position: relative;
    overflow: hidden;
}

.swiper-slide {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.swiper-slide-active {
    opacity: 1;
    transform: scale(1.1);
    z-index: 10;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.swiper-slide img.loaded {
    opacity: 1;
}

.swiper-slide .text-overlay {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 12px;
    max-width: clamp(150px, 30vw, 350px);
    text-align: right;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    z-index: 10;
}

body.dark-mode .swiper-slide .text-overlay {
    background: rgba(30, 41, 59, 0.9);
}

.swiper-slide .shimmer {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2) 25%, rgba(59, 130, 246, 0.4) 50%, rgba(59, 130, 246, 0.2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    position: absolute;
    top: 0;
    left: 0;
}

body.dark-mode .swiper-slide .shimmer {
    background: linear-gradient(90deg, rgba(100, 116, 139, 0.2) 25%, rgba(100, 116, 139, 0.4) 50%, rgba(100, 116, 139, 0.2) 75%);
}

.swiper-slide .text-overlay p,
.swiper-slide .text-overlay h3 {
    margin-bottom: 0.5rem;
}

body.dark-mode .swiper-slide .text-overlay p,
body.dark-mode .swiper-slide .text-overlay h3 {
    color: #f1f5f9;
}

.swiper-pagination {
    position: absolute;
    bottom: 15px;
    text-align: center;
    width: 100%;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: #3b82f6;
    opacity: 0.5;
    margin: 0 5px;
    transition: all 0.3s ease;
}

body.dark-mode .swiper-pagination-bullet {
    background-color: #60a5fa;
}

.swiper-pagination-bullet-active {
    background-color: #1e40af;
    opacity: 1;
    width: 12px;
    height: 12px;
}

body.dark-mode .swiper-pagination-bullet-active {
    background-color: #93c5fd;
}

.custom-nav {
    color: #3b82f6;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

body.dark-mode .custom-nav {
    color: #60a5fa;
    background: rgba(30, 41, 59, 0.9);
}

.custom-nav:hover {
    background: #3b82f6;
    color: #fff;
}

body.dark-mode .custom-nav:hover {
    background: #60a5fa;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .navbar {
        flex-direction: row;
        align-items: center;
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 1.5rem;
        background: rgba(255, 255, 255, 0.98);
        width: 240px;
        padding: 1.5rem;
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        animation: slideIn 0.3s ease-out;
        margin-right: 0;
    }

    body.dark-mode .nav-menu {
        background: rgba(30, 41, 59, 0.98);
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger.active div:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active div:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active div:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .nav-menu #user-status {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-menu #user-status a {
        margin-top: 0.5rem;
        width: 100%;
        text-align: center;
    }

    .nav-menu .admin-link {
        width: 100%;
        text-align: center;
    }

    .contact-info {
        display: none;
    }

    .logo-container {
        margin-left: 0;
        margin-top: 0;
    }

    .logo-img {
        max-width: 80px; /* اندازه لوگو در حالت موبایل */
    }

    .search-container {
        width: 100%;
        margin: 0.5rem 0;
        order: 2; /* زیر لوگو و همبرگر */
    }

    .search-input {
        padding: 0.5rem 2rem 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .search-icon {
        width: 16px;
        height: 16px;
    }

    .search-result-item img {
        width: 40px;
        height: 40px;
    }

    .search-result-item h4 {
        font-size: 0.9rem;
    }

    .search-result-item p {
        font-size: 0.8rem;
    }
}

@media (min-width: 769px) {
    .navbar {
        padding: 1.5rem;
    }
    .nav-menu {
        gap: 1.75rem;
    }
    .nav-menu a {
        font-size: 1.1rem;
    }
}

@media (max-width: 1024px) {
    .swiper-container {
        height: clamp(250px, 40vh, 400px);
    }

    .swiper-slide .text-overlay {
        bottom: 1rem;
        right: 1rem;
        max-width: 250px;
        font-size: 0.9rem;
    }
}

@media (max-width: 640px) {
    .swiper-container {
        height: clamp(200px, 35vh, 300px);
    }

    .swiper-slide .text-overlay {
        bottom: 0.75rem;
        right: 0.75rem;
        max-width: 150px;
        padding: 0.75rem;
        font-size: 0.8rem;
    }

    .custom-nav {
        width: 36px;
        height: 36px;
    }

    .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }

    .swiper-pagination-bullet-active {
        width: 10px;
        height: 10px;
    }
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

table {
    border-collapse: collapse;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
}

body.dark-mode table {
    background: rgba(30, 41, 59, 0.95);
}

th,
td {
    padding: 1.2rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    text-align: right;
}

body.dark-mode th,
body.dark-mode td {
    border-bottom: 1px solid rgba(100, 116, 139, 0.3);
}

th {
    background: rgba(59, 130, 246, 0.15);
    font-weight: 600;
    color: #3b82f6;
}

body.dark-mode th {
    background: rgba(100, 116, 139, 0.2);
    color: #60a5fa;
}

td img {
    border-radius: 10px;
}

.form-button.inline {
    padding: 0.7rem 1.4rem;
    font-size: 0.95rem;
}

.form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

body.dark-mode .form-container {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(100, 116, 139, 0.4);
}

.cart-container {
    margin-bottom: 2rem;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    margin-bottom: 1rem;
}

body.dark-mode .cart-item {
    border-bottom: 1px solid rgba(100, 116, 139, 0.3);
}

.cart-item img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-item .text-right {
    padding-right: 1rem;
}

.cart-item .text-right p {
    margin-bottom: 0.5rem;
}

body.dark-mode .cart-item .text-right p {
    color: #f1f5f9;
}

.cart-item .quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.cart-item .quantity-controls button {
    background: rgba(245, 166, 35, 0.25);
    color: #f5a623;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

body.dark-mode .cart-item .quantity-controls button {
    background: rgba(100, 116, 139, 0.3);
}

.cart-item .quantity-controls button:hover {
    background: rgba(245, 166, 35, 0.5);
}

body.dark-mode .cart-item .quantity-controls button:hover {
    background: rgba(100, 116, 139, 0.5);
}

.cart-item .quantity-controls .text-red-500 {
    margin-right: 0.5rem;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.filter-btn,
.search-btn {
    position: relative;
    z-index: 10;
}

.form-container label {
    margin-bottom: 0.5rem;
}

body.dark-mode .form-container label {
    color: #f1f5f9;
}

.form-container p {
    margin-bottom: 1rem;
}

body.dark-mode .form-container p {
    color: #f1f5f9;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 2.5rem;
    max-width: 650px;
    width: 95%;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.5s ease-out;
}

body.dark-mode .popup {
    background: rgba(30, 41, 59, 0.98);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.popup img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.popup .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    color: #3b82f6;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

body.dark-mode .popup .close-btn {
    color: #60a5fa;
}

.popup .close-btn:hover {
    color: #1e40af;
}

body.dark-mode .popup .close-btn:hover {
    color: #93c5fd;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 138, 0.75);
    z-index: 999;
}

body.dark-mode .overlay {
    background: rgba(15, 23, 42, 0.75);
}

.card-payment {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.4);
    padding: 2.5rem;
    max-width: 500px;
    margin: 2rem auto;
    text-align: center;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

body.dark-mode .card-payment {
    background: rgba(30, 41, 59, 0.98);
    border: 1px solid rgba(100, 116, 139, 0.4);
}

.card-payment p {
    color: #3b82f6;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

body.dark-mode .card-payment p {
    color: #60a5fa;
}

.card-payment button {
    width: 100%;
    max-width: 300px;
    padding: 1rem;
}

.footer {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(59, 130, 246, 0.3);
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: #3b82f6;
    margin-top: 3rem;
}

body.dark-mode .footer {
    background: rgba(30, 41, 59, 0.97);
    border-top: 1px solid rgba(100, 116, 139, 0.3);
    color: #60a5fa;
}

.footer a {
    color: #3b82f6;
    text-decoration: none;
    margin: 0 1.5rem;
    transition: color 0.3s ease;
}

body.dark-mode .footer a {
    color: #60a5fa;
}

.footer a:hover {
    color: #1e40af;
}

body.dark-mode .footer a:hover {
    color: #93c5fd;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.error-message {
    color: #ef4444;
    font-size: 1rem;
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    animation: shake 0.4s ease;
}

body.dark-mode .error-message {
    background: rgba(239, 68, 68, 0.2);
}

@media (max-width: 576px) {
    .cart-item {
        flex-direction: column;
        text-align: right;
    }

    .cart-item .text-right {
        padding-right: 0;
        margin-top: 1rem;
    }

    .cart-item .quantity-controls {
        margin-top: 1rem;
    }

    .form-container {
        padding: 1.5rem;
    }
}

/* استایل‌های خاص صفحه محصولات */
.product-card h3 {
    transition: color 0.3s ease;
}

body.dark-mode .product-card h3 {
    color: #60a5fa;
}

.product-card p {
    transition: color 0.3s ease;
}

body.dark-mode .product-card p {
    color: #d1d5db;
}

.no-products {
    color: #3b82f6;
    transition: color 0.3s ease;
}

body.dark-mode .no-products {
    color: #60a5fa;
}

.popup-content h3 {
    transition: color 0.3s ease;
}

body.dark-mode .popup-content h3 {
    color: #60a5fa;
}

.popup-content p {
    transition: color 0.3s ease;
}

body.dark-mode .popup-content p {
    color: #d1d5db;
}

.quantity-controls button {
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode .quantity-controls button {
    background: rgba(100, 116, 139, 0.3);
    color: #f1f5f9;
}

body.dark-mode .quantity-controls button:hover {
    background: rgba(100, 116, 139, 0.5);
}

.form-input {
    transition: background 0.3s ease, color 0.3s ease, border 0.3s ease;
}

body.dark-mode .form-input {
    background: rgba(30, 41, 59, 0.95);
    color: #f1f5f9;
    border: 1px solid rgba(100, 116, 139, 0.3);
}
.product-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    font-family: 'Vazirmatn', Arial, sans-serif;
}

.product-gallery {
    position: relative;
    margin-bottom: 1.5rem;
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.thumbnail-gallery {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.25rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.thumbnail.active {
    border-color: #3b82f6;
}

.product-details {
    background: rgba(255, 255, 255, 0.98);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.dark-mode .product-details {
    background: rgba(30, 41, 59, 0.98);
}

.product-details h1 {
    color: #1e3a8a;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

body.dark-mode .product-details h1 {
    color: #f1f5f9;
}

.product-info div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.product-info span {
    color: #6b7280;
    font-weight: 500;
    min-width: 80px;
}

body.dark-mode .product-info span {
    color: #d1d5db;
}

.product-info p {
    color: #1e40af;
    margin: 0;
}

body.dark-mode .product-info p {
    color: #60a5fa;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
}

.quantity-btn {
    background: rgba(229, 231, 235, 0.95);
    border: none;
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1.25rem;
    width: 40px;
    text-align: center;
    color: #1e3a8a;
    font-family: 'Vazirmatn', Arial, sans-serif;
    transition: background 0.3s ease, color 0.3s ease;
}

body.dark-mode .quantity-btn {
    background: rgba(100, 116, 139, 0.3);
    color: #f1f5f9;
}

.quantity-btn:hover {
    background: rgba(209, 213, 219, 0.95);
}

body.dark-mode .quantity-btn:hover {
    background: rgba(100, 116, 139, 0.5);
    color: #93c5fd;
}

.btn-add, .btn-wishlist {
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-family: 'Vazirmatn', Arial, sans-serif;
    transition: all 0.3s ease;
}

.btn-add {
    background: linear-gradient(45deg, #3b82f6, #60a5fa);
    color: white;
    margin-right: 0.5rem;
}

body.dark-mode .btn-add {
    background: linear-gradient(45deg, #1e40af, #60a5fa);
}

.btn-add:hover {
    background: linear-gradient(45deg, #1e40af, #3b82f6);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

body.dark-mode .btn-add:hover {
    background: linear-gradient(45deg, #1e3a8a, #93c5fd);
}

.btn-wishlist {
    background: rgba(243, 244, 246, 0.95);
    color: #1e40af;
}

body.dark-mode .btn-wishlist {
    background: rgba(75, 85, 99, 0.95);
    color: #60a5fa;
}

.btn-wishlist:hover {
    background: rgba(229, 231, 235, 0.95);
}

body.dark-mode .btn-wishlist:hover {
    background: rgba(100, 116, 139, 0.95);
    color: #93c5fd;
}

/* Responsive Design */
@media (max-width: 640px) {
    .product-container {
        padding: 0.75rem;
    }
    .main-image {
        height: 250px;
    }
    .thumbnail {
        width: 60px;
        height: 60px;
    }
    .product-details {
        margin-top: 0;
        padding: 1rem;
    }
    .product-details h1 {
        font-size: 1.5rem;
    }
    .product-info div {
        flex-direction: column;
        align-items: flex-start;
    }
    .quantity-control {
        display: flex;
        flex-direction: row;
        gap: 0.75rem;
        justify-content: center;
    }
    .quantity-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        padding: 0.4rem;
    }
    .btn-add, .btn-wishlist {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .main-image {
        height: 300px;
    }
    .thumbnail {
        width: 70px;
        height: 70px;
    }
    .product-details {
        padding: 1.25rem;
    }
}