/* =============================================
   all-products.css - استایل صفحه تمام محصولات
   نسخه کامل با تمام استایل‌های مورد نیاز
   ============================================= */

/* ============================================= */
/* متغیرهای CSS - هماهنگ با پروژه               */
/* ============================================= */
:root {
  --primary: #d62828;
  --primary-dark: #c1271f;
  --primary-light: #fde8e8;
  --accent: #d62828;
  --secondary: #64748b;
  --success: #22c55e;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --warning: #f59e0b;

  --bg-light: #f5f5f5;
  --bg-page: #fafafa;
  --bg-card: #ffffff;
  --bg-secondary: #f1f5f9;
  --white: #ffffff;
  --black: #000000;
  --dark: #1a1a1a;
  --dark-2: #292929;

  --text: #333333;
  --text-secondary: #555555;
  --text-light: #888888;
  --text-muted: #bbbbbb;
  --gray: #888888;
  --gray-light: #bbbbbb;

  --border: #dddddd;
  --border-light: #eeeeee;

  --overlay: rgba(0, 0, 0, 0.65);
  --overlay-soft: rgba(0, 0, 0, 0.5);

  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  --transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  --header-height: 70px;
}

/* ============================================= */
/* دارک مود                                      */
/* ============================================= */
[data-theme="dark"],
body.dark {
  --primary: #ff6b6b;
  --primary-dark: #ff5252;
  --primary-light: #3d1a1a;
  --accent: #ff6b6b;

  --bg-light: #1a1a1a;
  --bg-page: #121212;
  --bg-card: #1e1e1e;
  --bg-secondary: #2a2a2a;
  --white: #242424;
  --black: #e8e8e8;
  --dark: #e8e8e8;
  --dark-2: #d0d0d0;

  --text: #e0e0e0;
  --text-secondary: #b8b8b8;
  --text-light: #999999;
  --text-muted: #666666;
  --gray: #999999;
  --gray-light: #666666;

  --border: #333333;
  --border-light: #2a2a2a;

  --overlay: rgba(0, 0, 0, 0.7);
  --overlay-soft: rgba(0, 0, 0, 0.5);

  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);

  --danger: #ef4444;
  --danger-dark: #dc2626;
}

/* ============================================= */
/* HEADER CONTACT - هدر بالای صفحه               */
/* ============================================= */
.contact-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

[data-theme="dark"] .contact-header,
body.dark .contact-header {
  background: var(--bg-card);
  border-bottom-color: var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.top-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-light);
  flex-wrap: wrap;
}

.top-header a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.top-header a:hover {
  color: var(--primary);
}

.top-header .bc-current {
  color: var(--text);
  font-weight: 600;
}

[data-theme="dark"] .top-header .bc-current,
body.dark .top-header .bc-current {
  color: var(--text);
}

.top-header .bc-sep {
  color: var(--text-muted);
}

.contact-header__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

.btn-view-site {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-secondary);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text) !important;
  transition: all 0.3s ease;
  text-decoration: none;
}

[data-theme="dark"] .btn-view-site,
body.dark .btn-view-site {
  background: var(--bg-secondary);
  color: var(--text) !important;
}

.btn-view-site:hover {
  background: var(--border);
  color: var(--primary) !important;
}

[data-theme="dark"] .btn-view-site:hover,
body.dark .btn-view-site:hover {
  background: var(--border);
  color: var(--primary) !important;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--bg-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

[data-theme="dark"] .theme-toggle,
body.dark .theme-toggle {
  background: var(--bg-secondary);
}

.theme-toggle:hover {
  background: var(--border);
}

[data-theme="dark"] .theme-toggle:hover,
body.dark .theme-toggle:hover {
  background: var(--border);
}

.theme-toggle__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.theme-toggle__icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--text);
}

[data-theme="dark"] .theme-toggle__icon svg,
body.dark .theme-toggle__icon svg {
  stroke: var(--text);
}

.theme-toggle__icon .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle__icon .icon-sun,
body.dark .theme-toggle__icon .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle__icon .icon-moon,
body.dark .theme-toggle__icon .icon-moon {
  display: block;
}

/* ============================================= */
/* HEADER محصولات                                */
/* ============================================= */
.products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .products-header,
body.dark .products-header {
  background: rgba(30, 30, 30, 0.92);
}

.products-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.products-header-left h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.products-header-left h1 i {
  color: var(--primary);
  font-size: 24px;
}

/* دکمه بازگشت */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.back-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateX(-4px);
}

.products-count-badge {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
  background: var(--bg-secondary);
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* ============================================= */
/* ابزارهای فیلتر و جستجو                        */
/* ============================================= */
.products-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 3px 4px;
  border: 1px solid var(--border);
  transition: var(--transition);
  min-width: 200px;
}

.search-box:focus-within {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.08);
}

.search-box input {
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  width: 100%;
  font-family: inherit;
}

.search-box input::placeholder {
  color: var(--text-light);
}

.search-box button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  transition: var(--transition);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.search-box button:hover {
  background: var(--primary-dark);
  padding: 8px 16px;
}

/* ============================================= */
/* فیلتر دسته‌بندی (همراه با جستجو و سورت)      */
/* ============================================= */
.category-filter-quick {
  padding: 8px 14px;
  padding-left: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 10px center;
  min-width: 150px;
}

.category-filter-quick:hover {
  border-color: var(--gray-light);
}

.category-filter-quick:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.08);
}

.category-filter-quick option {
  background: var(--bg-card);
  color: var(--text);
  padding: 8px;
}

[data-theme="dark"] .category-filter-quick,
body.dark .category-filter-quick {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* سورت */
.sort-select {
  padding: 8px 14px;
  padding-left: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 10px center;
}

[data-theme="dark"] .sort-select,
body.dark .sort-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

.sort-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.08);
}

/* دکمه فیلتر */
.filter-toggle-btn {
  display: none;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
  transition: var(--transition);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  align-items: center;
  gap: 6px;
}

.filter-toggle-btn:hover {
  background: var(--border);
  border-color: var(--primary);
}

.filter-toggle-btn .filter-count {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
}

/* ============================================= */
/* سایدبار فیلتر                                 */
/* ============================================= */
.filter-sidebar {
  position: fixed;
  top: 0;
  right: -380px;
  width: 340px;
  height: 100vh;
  background: var(--bg-card);
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.08);
  padding: 24px;
  overflow-y: auto;
  transition: right 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1000;
  border-left: 1px solid var(--border);
}

[data-theme="dark"] .filter-sidebar,
body.dark .filter-sidebar {
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.3);
}

.filter-sidebar.open {
  right: 0;
}

.filter-sidebar::-webkit-scrollbar {
  width: 4px;
}
.filter-sidebar::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
.filter-sidebar::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.filter-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

[data-theme="dark"] .filter-sidebar-overlay,
body.dark .filter-sidebar-overlay {
  background: rgba(0, 0, 0, 0.6);
}

.filter-sidebar-overlay.show {
  display: block;
  opacity: 1;
}

.filter-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.filter-sidebar-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-sidebar-header h3 i {
  color: var(--primary);
}

.filter-sidebar-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-secondary);
  font-size: 18px;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-sidebar-close:hover {
  background: var(--danger);
  color: #ffffff;
  transform: rotate(90deg);
}

/* ============================================= */
/* گروه‌های فیلتر                                */
/* ============================================= */
.filter-group {
  margin-bottom: 24px;
}

.filter-group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  display: block;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.filter-group-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group-items label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: var(--transition);
}

.filter-group-items label:hover {
  background: var(--bg-secondary);
}

.filter-group-items label.active {
  background: var(--primary-light);
  color: var(--primary);
}

[data-theme="dark"] .filter-group-items label.active,
body.dark .filter-group-items label.active {
  background: rgba(255, 107, 107, 0.15);
}

.filter-group-items input[type="radio"],
.filter-group-items input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.filter-group-items .count {
  margin-right: auto;
  font-size: 12px;
  color: var(--text-light);
  background: var(--bg-secondary);
  padding: 1px 8px;
  border-radius: 10px;
}

.filter-group-items label.active .count {
  background: var(--primary);
  color: #fff;
}

[data-theme="dark"] .filter-group-items label.active .count,
body.dark .filter-group-items label.active .count {
  background: var(--primary);
  color: #fff;
}

/* محدوده قیمت */
.price-range {
  display: flex;
  gap: 8px;
  align-items: center;
}

.price-range input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-card);
  transition: var(--transition);
}

.price-range input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.08);
}

[data-theme="dark"] .price-range input,
body.dark .price-range input {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text);
}

.price-range input::placeholder {
  color: var(--text-light);
}

.price-range span {
  color: var(--text-light);
  font-size: 13px;
  font-weight: 500;
}

/* دکمه‌های فیلتر */
.filter-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.filter-actions .btn-apply {
  flex: 1;
  padding: 10px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-actions .btn-apply:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.filter-actions .btn-reset {
  padding: 10px 20px;
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.filter-actions .btn-reset:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

/* ============================================= */
/* نوار تعداد محصولات                            */
/* ============================================= */
.products-count-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 32px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

.products-count-bar .count {
  font-size: 14px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.products-count-bar .count strong {
  color: var(--text);
  font-weight: 700;
}
.products-count-bar .count i {
  color: var(--primary);
}

.products-count-bar .active-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.products-count-bar .filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
}

.products-count-bar .filter-tag .remove {
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
  font-weight: 700;
}

.products-count-bar .filter-tag .remove:hover {
  color: var(--danger);
}

/* ============================================= */
/* گرید محصولات                                  */
/* ============================================= */
.all-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 32px;
  max-width: 1440px;
  margin: 0 auto;
  background: var(--bg-page);
}

/* ============================================= */
/* کارت محصول                                    */
/* ============================================= */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

/* تأخیر انیمیشن برای هر کارت */
.product-card:nth-child(1) {
  animation-delay: 0.04s;
}
.product-card:nth-child(2) {
  animation-delay: 0.08s;
}
.product-card:nth-child(3) {
  animation-delay: 0.12s;
}
.product-card:nth-child(4) {
  animation-delay: 0.16s;
}
.product-card:nth-child(5) {
  animation-delay: 0.2s;
}
.product-card:nth-child(6) {
  animation-delay: 0.24s;
}
.product-card:nth-child(7) {
  animation-delay: 0.28s;
}
.product-card:nth-child(8) {
  animation-delay: 0.32s;
}
.product-card:nth-child(9) {
  animation-delay: 0.36s;
}
.product-card:nth-child(10) {
  animation-delay: 0.4s;
}
.product-card:nth-child(11) {
  animation-delay: 0.44s;
}
.product-card:nth-child(12) {
  animation-delay: 0.48s;
}

/* ── تصویر ── */
.product-card .image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.product-card .image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.product-card:hover .image-wrapper img {
  transform: scale(1.05);
}

/* ── برچسب‌ها ── */
.product-card .badge-container {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.product-card .discount-badge,
.product-card .new-badge {
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  line-height: 1.6;
}

.product-card .discount-badge {
  background: var(--danger);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}
.product-card .new-badge {
  background: var(--success);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
}

/* ── دکمه علاقه‌مندی ── */
.product-card .wishlist-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .product-card .wishlist-btn,
body.dark .product-card .wishlist-btn {
  background: rgba(30, 30, 30, 0.9);
}

.product-card .wishlist-btn i {
  font-size: 16px;
  transition: var(--transition);
}

.product-card .wishlist-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.product-card .wishlist-btn:hover {
  background: #fee2e2;
  color: var(--danger);
  transform: scale(1.1);
}

[data-theme="dark"] .product-card .wishlist-btn:hover,
body.dark .product-card .wishlist-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

.product-card .wishlist-btn.active {
  background: #fee2e2;
  color: var(--danger);
}

[data-theme="dark"] .product-card .wishlist-btn.active,
body.dark .product-card .wishlist-btn.active {
  background: rgba(239, 68, 68, 0.2);
}

/* ── اُورلِی ── */
.product-card .image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card:hover .image-overlay {
  opacity: 1;
}

.product-card .image-overlay .quick-view {
  padding: 8px 20px;
  background: var(--white);
  color: var(--text);
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transform: translateY(10px);
  transition: var(--transition);
}

.product-card:hover .image-overlay .quick-view {
  transform: translateY(0);
}

.product-card .image-overlay .quick-view:hover {
  background: var(--primary);
  color: #fff;
}

/* ============================================= */
/* اطلاعات محصول                                 */
/* ============================================= */
.product-card .product-info {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card .product-category {
  font-size: 12px;
  color: var(--text-light);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-card .product-category i {
  font-size: 11px;
}

.product-card .product-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  min-height: 42px;
}

.product-card .product-name a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.product-card .product-name a:hover {
  color: var(--primary);
}

/* ریتینگ */
.product-card .product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.product-card .product-rating .stars {
  color: #f59e0b;
  font-size: 13px;
  letter-spacing: 1px;
}

.product-card .product-rating .rating-count {
  font-size: 12px;
  color: var(--text-light);
}

/* قیمت */
.product-card .product-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.product-card .product-price .old-price {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-light);
  text-decoration: line-through;
}

.product-card .product-price .discount-percent {
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
  background: #fee2e2;
  padding: 1px 8px;
  border-radius: 10px;
}

[data-theme="dark"] .product-card .product-price .discount-percent,
body.dark .product-card .product-price .discount-percent {
  background: rgba(239, 68, 68, 0.2);
}

/* موجودی */
.product-card .product-stock {
  font-size: 12px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-card .product-stock.in-stock {
  color: var(--success);
}

.product-card .product-stock.out-of-stock {
  color: var(--danger);
}

/* دکمه‌های اقدام */
.product-card .product-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.product-card .btn-view {
  flex: 1;
  padding: 8px 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
}

.product-card .btn-view:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.product-card .btn-view:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.product-card .btn-cart {
  padding: 8px 14px;
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
}

.product-card .btn-cart:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

.product-card .btn-cart:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.product-card .btn-cart.added {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

/* ============================================= */
/* حالت خالی                                     */
/* ============================================= */
.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.no-products i {
  font-size: 56px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: block;
}

.no-products h3 {
  font-size: 20px;
  color: var(--text);
  margin: 0 0 6px;
}
.no-products p {
  color: var(--text-light);
  margin-bottom: 16px;
  font-size: 15px;
}

.no-products .btn-primary {
  display: inline-block;
  padding: 10px 28px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.no-products .btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ============================================= */
/* صفحه‌بندی                                     */
/* ============================================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 28px;
  flex-wrap: wrap;
  background: var(--bg-page);
}

.pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.pagination .page-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.pagination .page-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.pagination .page-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pagination .page-link.prev,
.pagination .page-link.next {
  font-weight: 600;
  gap: 4px;
}

.pagination .page-dots {
  color: var(--text-light);
  padding: 0 2px;
}

/* ============================================= */
/* اسکرول به بالا                                */
/* ============================================= */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(214, 40, 40, 0.25);
  transition: var(--transition);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.scroll-top.visible {
  display: flex;
}

.scroll-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(214, 40, 40, 0.35);
}

.scroll-top:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.scroll-top i {
  font-size: 18px;
}

/* ============================================= */
/* ریسپانسیو                                     */
/* ============================================= */
@media (max-width: 1024px) {
  .all-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .top-header {
    font-size: 13px;
  }

  .contact-header__inner {
    margin-right: 0;
    width: 100%;
    justify-content: flex-start;
    margin-top: 8px;
  }

  .products-header {
    padding: 12px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .products-header-left {
    justify-content: space-between;
  }
  .products-header-left h1 {
    font-size: 18px;
  }

  .products-tools {
    flex-wrap: wrap;
    gap: 8px;
  }

  .search-box {
    flex: 1;
    min-width: 120px;
  }
  .search-box input {
    font-size: 13px;
    padding: 6px 10px;
  }
  .search-box button {
    padding: 5px 12px;
    font-size: 12px;
  }

  .filter-toggle-btn {
    display: flex;
  }

  .sort-select {
    flex: 1;
    min-width: 80px;
    font-size: 13px;
    padding: 6px 12px;
    padding-left: 28px;
  }

  .all-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
    padding: 14px;
  }

  .product-card .product-info {
    padding: 12px 14px 14px;
  }
  .product-card .product-name {
    font-size: 14px;
    min-height: 38px;
  }
  .product-card .product-price {
    font-size: 16px;
  }
  .product-card .product-price .old-price {
    font-size: 13px;
  }
  .product-card .btn-view {
    font-size: 12px;
    padding: 6px 10px;
  }
  .product-card .btn-cart {
    font-size: 12px;
    padding: 6px 12px;
  }

  .products-count-bar {
    padding: 8px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .filter-sidebar {
    width: 300px;
    padding: 16px;
    right: -340px;
  }

  .pagination {
    padding: 16px;
    gap: 4px;
  }
  .pagination .page-link {
    min-width: 34px;
    height: 34px;
    font-size: 13px;
    padding: 0 10px;
  }

  .scroll-top {
    bottom: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
  }
  .scroll-top i {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .all-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .products-header {
    padding: 10px 12px;
  }
  .products-header-left h1 {
    font-size: 16px;
  }
  .products-header-left h1 i {
    font-size: 18px;
  }

  .back-btn {
    padding: 4px 10px;
    font-size: 12px;
  }

  .products-count-badge {
    font-size: 11px;
    padding: 2px 10px;
  }

  .search-box input {
    font-size: 12px;
    padding: 4px 8px;
  }
  .search-box button {
    padding: 4px 10px;
    font-size: 11px;
  }

  .product-card .product-info {
    padding: 10px 10px 12px;
  }
  .product-card .product-name {
    font-size: 13px;
    min-height: 34px;
  }
  .product-card .product-category {
    font-size: 11px;
  }
  .product-card .product-price {
    font-size: 14px;
  }
  .product-card .product-price .old-price {
    font-size: 12px;
  }

  .product-card .wishlist-btn {
    width: 30px;
    height: 30px;
    top: 8px;
    left: 8px;
  }

  .product-card .wishlist-btn i {
    font-size: 13px;
  }

  .product-card .badge-container {
    top: 8px;
    right: 8px;
  }

  .product-card .discount-badge,
  .product-card .new-badge {
    font-size: 10px;
    padding: 1px 8px;
  }

  .product-card .product-actions {
    flex-direction: column;
    gap: 6px;
  }

  .filter-sidebar {
    width: 260px;
    padding: 14px;
    right: -300px;
  }
  .filter-sidebar-header h3 {
    font-size: 16px;
  }

  .no-products {
    padding: 30px 16px;
  }
  .no-products i {
    font-size: 40px;
  }
  .no-products h3 {
    font-size: 16px;
  }
  .no-products p {
    font-size: 13px;
  }

  .pagination .page-link {
    min-width: 30px;
    height: 30px;
    font-size: 12px;
    padding: 0 8px;
  }
}

/* ============================================= */
/* انیمیشن‌ها                                    */
/* ============================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================= */
/* کاهش حرکت                                     */
/* ============================================= */
@media (prefers-reduced-motion: reduce) {
  .product-card,
  .product-card .image-wrapper img,
  .product-card .btn-view,
  .product-card .btn-cart,
  .scroll-top,
  .back-btn,
  .filter-sidebar-close {
    transition: none;
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ============================================= */
/* اسکرول‌بار سفارشی                             */
/* ============================================= */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ============================================= */
/* دکمه سبد خرید در هدر */
/* ============================================= */
.cart-header-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-secondary, #f1f5f9);
  color: var(--text, #333333);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 18px;
}

.cart-header-btn:hover {
  background: var(--primary, #d62828);
  color: #ffffff;
  transform: scale(1.05);
}

[data-theme="dark"] .cart-header-btn,
body.dark .cart-header-btn {
  background: var(--bg-secondary, #2a2a2a);
  color: var(--text, #e0e0e0);
}

[data-theme="dark"] .cart-header-btn:hover,
body.dark .cart-header-btn:hover {
  background: var(--primary, #ff6b6b);
  color: #ffffff;
}

/* نشانگر تعداد سبد خرید */
.cart-header-btn .cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--danger, #ef4444);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  border: 2px solid var(--bg-card, #ffffff);
  transition: all 0.3s ease;
}

[data-theme="dark"] .cart-header-btn .cart-badge,
body.dark .cart-header-btn .cart-badge {
  border-color: var(--bg-card, #1e1e1e);
}

/* اگر تعداد 0 باشد، نشانگر را مخفی کن */
.cart-header-btn .cart-badge:empty {
  display: none;
}

/* انیمیشن برای تغییر تعداد */
.cart-header-btn .cart-badge.bump {
  animation: cartBump 0.3s ease;
}

@keyframes cartBump {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

/* Responsive */
@media (max-width: 640px) {
  .top-header {
    font-size: 13px;
  }

  .contact-header__inner {
    margin-right: 0;
    width: 100%;
    justify-content: flex-start;
    margin-top: 8px;
    gap: 8px;
  }

  .cart-header-btn {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .cart-header-btn .cart-badge {
    min-width: 16px;
    height: 16px;
    font-size: 9px;
    top: -3px;
    right: -3px;
  }
}

/* ============================================= */
/* بخش دسته‌بندی و اسلایدر                       */
/* ============================================= */

.category-slider-section {
  padding: 20px 32px 40px;
  max-width: 1440px;
  margin: 0 auto;
  background: var(--bg-page);
}

.category-slider-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.category-slider-section .section-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-slider-section .section-header h2 i {
  color: var(--primary);
}

.category-slider-section .link-all {
  color: var(--text-light);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.category-slider-section .link-all:hover {
  color: var(--primary);
}

/* ============================================= */
/* تب‌های دسته‌بندی                              */
/* ============================================= */
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.category-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 2px solid var(--border);
  border-radius: 30px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-family: inherit;
}

.category-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.category-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.category-tab .count {
  font-size: 11px;
  background: var(--bg-secondary);
  padding: 0 8px;
  border-radius: 12px;
  color: var(--text-light);
  font-weight: 600;
}

.category-tab.active .count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

[data-theme="dark"] .category-tab .count,
body.dark .category-tab .count {
  background: var(--bg-secondary, #2a2a2a);
}

/* ============================================= */
/* اسلایدر محصولات                               */
/* ============================================= */
.category-slider-wrapper {
  display: none;
}

.category-slider-wrapper.active {
  display: block;
  animation: fadeSlideIn 0.4s ease;
}

.product-slider {
  position: relative;
  margin: 0 -10px;
}

.product-slide {
  padding: 0 10px;
}

.product-slider .product-card {
  margin: 0;
  animation: none;
  opacity: 1;
}

/* استایل دکمه‌های اسلایدر */
.product-slider .slick-prev,
.product-slider .slick-next {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 10;
  transition: all 0.3s ease;
}

.product-slider .slick-prev:hover,
.product-slider .slick-next:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.product-slider .slick-prev:hover:before,
.product-slider .slick-next:hover:before {
  color: #ffffff;
}

.product-slider .slick-prev:before,
.product-slider .slick-next:before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--text);
  font-size: 16px;
}

.product-slider .slick-prev:before {
  content: "\f060";
}

.product-slider .slick-next:before {
  content: "\f061";
}

[data-theme="dark"] .product-slider .slick-prev,
[data-theme="dark"] .product-slider .slick-next,
body.dark .product-slider .slick-prev,
body.dark .product-slider .slick-next {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .product-slider .slick-prev:before,
[data-theme="dark"] .product-slider .slick-next:before,
body.dark .product-slider .slick-prev:before,
body.dark .product-slider .slick-next:before {
  color: var(--text);
}

/* دات‌های اسلایدر */
.product-slider .slick-dots {
  bottom: -30px;
}

.product-slider .slick-dots li button:before {
  color: var(--text-light);
  opacity: 0.5;
}

.product-slider .slick-dots li.slick-active button:before {
  color: var(--primary);
  opacity: 1;
}

/* ============================================= */
/* حالت خالی اسلایدر                             */
/* ============================================= */
.no-products-slider {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
}

.no-products-slider i {
  font-size: 40px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}

.no-products-slider p {
  font-size: 15px;
}

/* ============================================= */
/* انیمیشن fadeSlideIn                           */
/* ============================================= */
@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================= */
/* ریسپانسیو                                     */
/* ============================================= */
@media (max-width: 768px) {
  .category-slider-section {
    padding: 16px;
  }

  .category-slider-section .section-header h2 {
    font-size: 18px;
  }

  .category-tabs {
    gap: 6px;
    flex-wrap: nowrap;
  }

  .category-tab {
    padding: 6px 14px;
    font-size: 13px;
  }

  .product-slider .slick-prev,
  .product-slider .slick-next {
    width: 32px;
    height: 32px;
  }

  .product-slider .slick-prev:before,
  .product-slider .slick-next:before {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .category-slider-section {
    padding: 12px;
  }

  .category-tab {
    padding: 5px 12px;
    font-size: 12px;
  }

  .category-tab .count {
    font-size: 10px;
    padding: 0 6px;
  }
}

/* ============================================= */
/* دکمه‌های تغییر حالت نمایش */
/* ============================================= */
.view-mode-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary, #f1f5f9);
  border-radius: var(--radius-sm, 10px);
  padding: 4px;
  border: 1px solid var(--border, #dddddd);
}

.view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-light, #888888);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
}

.view-btn:hover {
  color: var(--text, #333333);
  background: rgba(0, 0, 0, 0.05);
}

.view-btn.active {
  background: var(--primary, #d62828);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(214, 40, 40, 0.25);
}

.view-btn.active:hover {
  background: var(--primary-dark, #c1271f);
  color: #ffffff;
}

[data-theme="dark"] .view-btn.active,
body.dark .view-btn.active {
  background: var(--primary, #ff6b6b);
  color: #ffffff;
}

[data-theme="dark"] .view-btn:hover,
body.dark .view-btn:hover {
  color: var(--text, #e0e0e0);
}

[data-theme="dark"] .view-mode-toggle,
body.dark .view-mode-toggle {
  background: var(--bg-secondary, #2a2a2a);
  border-color: var(--border, #333333);
}

/* ============================================= */
/* حالت کلاسیک - گرید معمولی */
/* ============================================= */
.all-products-grid.classic-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 32px;
  max-width: 1440px;
  margin: 0 auto;
  background: var(--bg-page);
}

/* برچسب پربازدید */
.popular-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  animation: pulse-popular 2s ease-in-out infinite;
}

@keyframes pulse-popular {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}
/* ============================================= */
/* واکنش‌گرا */
/* ============================================= */
@media (max-width: 768px) {
  .view-mode-toggle {
    padding: 3px;
  }

  .view-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .all-products-grid.classic-view {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
    padding: 14px;
  }
}

@media (max-width: 480px) {
  .view-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .all-products-grid.classic-view {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 10px;
  }
}
