/* products.css - استایل‌های کامل برای صفحه محصولات */
/* کاملاً با HTML شما هماهنگ شده است */

/* متغیرهای رنگ */
:root {
    --primary: #FF9800;
    --primary-dark: #F57C00;
    --secondary: #FF5722;
    --dark: #333333;
    --gray: #666666;
    --light-gray: #F5F5F5;
    --white: #FFFFFF;
    --border-color: #EEEEEE;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --transition: all 0.3s ease;
}

/* ریست استایل‌ها */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
    overflow-x: hidden;
    min-height: 100vh;
}

/* کانتینر */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* لینک‌ها و دکمه‌ها */
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    font-family: 'Vazirmatn', sans-serif;
    border: none;
    background: none;
    cursor: pointer;
    transition: var(--transition);
}

/* تصاویر */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* لیست‌ها */
ul, ol {
    list-style: none;
}

/* ======== HEADER ======== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow);
}

/* نوار بالایی */
.top-bar {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 10px 0;
    font-size: 0.85rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.top-bar-content span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    color: var(--white);
    font-size: 1.1rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-icons a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* نویگیشن اصلی */
.main-nav {
    padding: 15px 0;
    background: var(--white);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* لوگو */
.logo h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.logo span {
    color: var(--primary);
    display: block;
    font-size: 1rem;
}

/* منوی اصلی */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--dark);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 0;
    position: relative;
    display: inline-block;
}

.nav-menu a.active {
    color: var(--primary);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.nav-menu a:hover {
    color: var(--primary);
}

/* منوی کشویی */
.dropdown {
    position: relative;
}

.dropdown > a {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: var(--white);
    box-shadow: var(--shadow-hover);
    border-radius: var(--radius);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--dark);
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background: var(--light-gray);
    color: var(--primary);
    padding-right: 25px;
}

/* آیکون‌های ناوبری */
.nav-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-icons button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--dark);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-icons button:hover {
    background: var(--primary);
    color: var(--white);
}

.cart-count {
    position: absolute;
    top: -5px;
    left: -5px;
    background: var(--secondary);
    color: var(--white);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ======== HERO SECTION ======== */
.products-hero {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.05), rgba(255, 87, 34, 0.05));
    padding: 60px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.2rem;
    color: var(--dark);
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 30px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 120px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
}

/* ======== BREADCRUMB ======== */
.breadcrumb-nav {
    background: var(--light-gray);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray);
    font-size: 0.9rem;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-right: 10px;
}

.breadcrumb a:hover {
    color: var(--primary);
}

/* ======== FILTER SECTION ======== */
.filter-section {
    padding: 25px 0;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
}

.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 300px;
}

.filter-title {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-btn {
    padding: 10px 20px;
    background: var(--light-gray);
    color: var(--gray);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.sort-group {
    min-width: 300px;
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sort-select-wrapper {
    position: relative;
    flex: 1;
}

.sort-select {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--dark);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
}

.sort-select-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    pointer-events: none;
}

.reset-btn {
    padding: 12px 20px;
    background: var(--light-gray);
    color: var(--gray);
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
}

.reset-btn:hover {
    background: var(--primary);
    color: var(--white);
}

/* ======== FEATURED SLIDER ======== */
.featured-slider-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f9f9f9, #f0f0f0);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.section-subtitle {
    color: var(--gray);
    font-size: 1rem;
}

.featured-swiper {
    padding: 20px 10px 50px;
    position: relative;
}

.swiper-slide {
    height: auto;
}

.featured-product {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 100%;
    transition: var(--transition);
}

.featured-product:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.featured-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-product:hover .featured-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--secondary);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.featured-content {
    padding: 20px;
}

.featured-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark);
    font-weight: 600;
}

.featured-content p {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.featured-price .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
}

.featured-price .discount {
    background: #FFEBEE;
    color: var(--secondary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.featured-add-to-cart {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
}

.featured-add-to-cart:hover {
    background: var(--primary-dark);
}

/* ناوبری Swiper */
.swiper-button-next,
.swiper-button-prev {
    width: 50px;
    height: 50px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow);
    color: var(--dark);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 1.2rem;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--primary);
    color: var(--white);
}

.swiper-pagination-bullet {
    background: var(--gray);
    opacity: 0.5;
    width: 12px;
    height: 12px;
}

.swiper-pagination-bullet-active {
    background: var(--primary);
    opacity: 1;
}

/* ======== PRODUCTS MAIN ======== */
.products-main {
    padding: 60px 0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.products-title {
    font-size: 1.8rem;
    color: var(--dark);
    font-weight: 700;
}

.products-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.results-count {
    color: var(--gray);
    font-weight: 500;
    font-size: 0.95rem;
}

.view-controls {
    display: flex;
    gap: 5px;
    background: var(--light-gray);
    padding: 5px;
    border-radius: var(--radius);
}

.view-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 1.1rem;
    cursor: pointer;
    border: none;
}

.view-btn:hover,
.view-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow);
}

/* گرید محصولات */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.products-grid.list {
    grid-template-columns: 1fr;
}

/* کارت محصول */
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--white);
    text-align: center;
    line-height: 1;
}

.badge.new { background: #4CAF50; }
.badge.sale { background: var(--secondary); }
.badge.hot { background: #FF4081; }
.badge.organic { background: #8BC34A; }

.quick-view-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 20px 15px 15px;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .quick-view-overlay {
    opacity: 1;
}

.quick-view-btn {
    width: 100%;
    padding: 10px;
    background: var(--white);
    color: var(--primary);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
}

.quick-view-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.product-content {
    padding: 20px;
}

.product-category {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}

.product-title {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.product-description {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
}

.old-price {
    font-size: 0.9rem;
    color: var(--gray);
    text-decoration: line-through;
}

.discount {
    background: #FFEBEE;
    color: var(--secondary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.stars {
    color: #FFC107;
    font-size: 0.9rem;
}

.rating-count {
    font-size: 0.85rem;
    color: var(--gray);
}

.product-actions {
    display: flex;
    gap: 10px;
}

.add-to-cart {
    flex: 1;
    padding: 12px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    min-height: 44px;
}

.add-to-cart:hover {
    background: var(--primary-dark);
}

.add-to-cart.in-cart {
    background: #4CAF50;
}

.add-to-cart:disabled {
    background: var(--gray);
    cursor: not-allowed;
    opacity: 0.7;
}

.action-btn {
    width: 44px;
    min-width: 44px;
    height: 44px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 1rem;
    cursor: pointer;
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* دکمه مشاهده بیشتر */
.load-more-container {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    padding: 15px 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: none;
}

.load-more-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    color: var(--primary);
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--light-gray);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ======== CATEGORIES SECTION ======== */
.categories-section {
    padding: 60px 0;
    background: var(--white);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: var(--transition);
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--white);
    font-size: 1.5rem;
    transition: var(--transition);
}

.category-card:hover .category-icon {
    transform: rotate(15deg) scale(1.1);
}

.category-title {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 10px;
    font-weight: 600;
}

.category-description {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 20px;
}

.category-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-count {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

.category-link {
    font-size: 0.9rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 5px;
}

.category-link:hover {
    color: var(--primary);
    gap: 8px;
}

/* ======== SPECIAL OFFERS ======== */
.special-offers {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}

.offer-banner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.offer-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.offer-description {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.6;
}

.offer-countdown {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.countdown-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: var(--radius);
    min-width: 80px;
    backdrop-filter: blur(10px);
}

.countdown-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    display: block;
}

.countdown-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 5px;
    display: block;
}

.offer-btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--white);
    color: var(--primary);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.offer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.offer-image img {
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ======== FOOTER ======== */
.footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-about {
    line-height: 1.8;
    font-size: 0.95rem;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-right: 8px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-info p,
.contact-info span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info i {
    color: var(--primary);
    width: 20px;
}

.newsletter-text {
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.9rem;
}

.newsletter-form input::placeholder {
    color: #999;
}

.newsletter-form button {
    padding: 12px 25px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    border: none;
}

.newsletter-form button:hover {
    background: var(--primary-dark);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #999;
}

/* ======== FLOATING CART ======== */
.floating-cart {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
}

.cart-toggle-btn {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-hover);
    position: relative;
    cursor: pointer;
    border: none;
}

.cart-toggle-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary);
    color: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-sidebar {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 350px;
    max-width: 90vw;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    display: none;
    animation: slideUp 0.3s ease;
    z-index: 1001;
}

.cart-sidebar.active {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.cart-header h3 {
    font-size: 1.2rem;
    color: var(--dark);
    font-weight: 600;
}

.close-cart {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}

.close-cart:hover {
    background: var(--primary);
    color: var(--white);
}

.cart-items {
    max-height: 300px;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
    font-size: 0.95rem;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.cart-item img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--dark);
    font-weight: 600;
}

.cart-item-price {
    font-size: 0.9rem;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 8px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
}

.quantity-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.remove-item {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}

.remove-item:hover {
    background: #f44336;
    color: var(--white);
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

.total-price {
    color: var(--secondary);
    font-size: 1.3rem;
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.view-cart-btn,
.checkout-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: block;
}

.view-cart-btn {
    background: var(--light-gray);
    color: var(--dark);
}

.view-cart-btn:hover {
    background: #e0e0e0;
}

.checkout-btn {
    background: var(--primary);
    color: var(--white);
}

.checkout-btn:hover {
    background: var(--primary-dark);
}

/* ======== MODAL ======== */
.modal {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.3s ease;
    z-index: 10000;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    z-index: 10;
    cursor: pointer;
    border: none;
}

.close-modal:hover {
    background: var(--primary);
    color: var(--white);
}

.quick-view-content {
    padding: 40px;
}

.quick-view-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.quick-view-image img {
    width: 100%;
    border-radius: var(--radius);
}

.quick-view-details h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.quick-view-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--gray);
}

.quick-view-price {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.quick-view-price .price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary);
}

.quick-view-description h3,
.quick-view-specs h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--dark);
    font-weight: 600;
}

.quick-view-description p {
    font-size: 1rem;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 25px;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px;
    background: var(--light-gray);
    border-radius: var(--radius);
}

.spec-label {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.spec-value {
    color: var(--gray);
    font-size: 0.9rem;
}

.quick-view-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--dark);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}

.qty-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
}

.quick-add-to-cart {
    flex: 1;
    padding: 15px 30px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    border: none;
    min-width: 200px;
}

.quick-add-to-cart:hover {
    background: var(--primary-dark);
}

.quick-add-to-cart.in-cart {
    background: #4CAF50;
}

/* ======== MOBILE SEARCH ======== */
.mobile-search {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mobile-search.active {
    display: flex;
}

.search-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    gap: 10px;
}

.search-container input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: var(--radius);
    background: var(--white);
    color: var(--dark);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
}

.search-close {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    border: none;
}

.search-close:hover {
    background: var(--primary-dark);
}

/* ======== RESPONSIVE DESIGN ======== */

/* تبلت */
@media (max-width: 992px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .offer-banner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

    .nav-menu {
        display: none;
    }

    .filter-container {
        flex-direction: column;
        gap: 20px;
    }

    .quick-view-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* موبایل بزرگ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .hero-stats {
        gap: 15px;
    }

    .stat-item {
        min-width: 100px;
        padding: 15px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .category-card {
        padding: 20px;
    }

    .cart-sidebar {
        width: 300px;
        left: -100px;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }
}

/* موبایل کوچک */
@media (max-width: 576px) {
    .container {
        padding: 0 12px;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .top-bar-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .social-icons {
        justify-content: center;
    }

    .category-buttons {
        justify-content: flex-start;
    }

    .sort-container {
        flex-direction: column;
        align-items: stretch;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .floating-cart {
        bottom: 20px;
        left: 20px;
    }

    .cart-toggle-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .modal-content {
        padding: 0;
    }

    .quick-view-content {
        padding: 20px;
    }
}

/* حالت عمودی موبایل */
@media (orientation: portrait) and (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* حالت افقی موبایل */
@media (orientation: landscape) and (max-height: 576px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .cart-sidebar {
        height: 90vh;
    }
}

/* برای موبایل‌های با ارتفاع کم */
@media (max-height: 640px) {
    .products-hero {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .product-image {
        height: 160px;
    }
}

/* بهبود نمایش در iOS */
@supports (-webkit-touch-callout: none) {
    .container {
        padding: 0 max(15px, env(safe-area-inset-right)) 0 max(15px, env(safe-area-inset-left));
    }

    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .floating-cart {
        bottom: max(20px, env(safe-area-inset-bottom) + 10px);
        left: max(20px, env(safe-area-inset-left) + 10px);
    }
}

/* استایل‌های نوتیفیکیشن (اضافه شده به انتهای فایل) */
.notification {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    padding: 15px 20px;
    background: #4CAF50;
    color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
    max-width: 400px;
    margin: 0 auto;
}

.notification.error {
    background: #f44336;
}

.close-notification {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes slideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* کلاس‌های کمکی */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}