.product-page {
  min-height: 100vh;
  padding: var(--space-xl) var(--space-md);
}

.product-page__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.product-page__title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
  font-family: var(--font-display);
}

.product-page__subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== چیدمان دو ستونه: فیلتر سایدبار + محتوا ===== */
.shop-layout {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
}

/* سایدبار فیلتر: چسبنده و همیشه کنار دست کاربر */
.filter-sidebar {
  position: sticky;
  top: 24px;
  position: -webkit-sticky;
  width: 300px;
  flex-shrink: 0;
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-gold-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}

.filter-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, var(--dark-jade), var(--light-jade));
  color: #fff;
  flex-shrink: 0;
}

.filter-sidebar__header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.filter-sidebar__close {
  display: none;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.filter-sidebar__close:hover { background: rgba(255, 255, 255, 0.25); transform: rotate(90deg); }

/* بک‌دراپ در موبایل */
.filter-overlay {
  display: none;
}

.filter-sidebar__title {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}

.filter-sidebar__header .clear-filters {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.75rem;
  padding: 4px 10px;
}
.filter-sidebar__header .clear-filters:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.filter-sidebar__body {
  padding: var(--space-md) var(--space-lg);
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* بلاک فیلتر */
.filter-block { display: flex; flex-direction: column; gap: 8px; }

.filter-block__title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-check-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 160px;
  overflow-y: auto;
}

.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-primary);
  user-select: none;
  padding: 4px 2px;
  transition: var(--transition);
}

.filter-check:hover { color: var(--gold-600); }

.filter-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-check__mark,
.filter-check__radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  background: var(--bg-white);
  flex-shrink: 0;
}

.filter-check__mark { border-radius: 6px; }
.filter-check__radio { border-radius: 50%; }

.filter-check input:checked + .filter-check__mark {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
}

.filter-check input:checked + .filter-check__mark::after {
  content: '✓';
  color: var(--btn-color);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.filter-check input:checked + .filter-check__radio {
  border-color: var(--btn-bg);
  background: radial-gradient(circle, var(--btn-bg) 0 45%, var(--bg-white) 45%);
}

/* بازه قیمت/وزن */
.filter-range {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-range__label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.filter-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-gold-light);
  border-radius: var(--radius-md);
  background: var(--bg-white);
  font-family: inherit;
  font-size: 0.82rem;
  transition: var(--transition);
  color: var(--text-primary);
  direction: ltr;
  text-align: left;
}

.filter-input:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.filter-input::placeholder { color: var(--text-caption, #bbb); }

.filter-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-gold-light);
  border-radius: var(--radius-md);
  background: var(--bg-white);
  font-family: inherit;
  font-size: 0.82rem;
  transition: var(--transition);
  color: var(--text-primary);
}

.filter-select:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* فقط موجود (اعمال فوری) */
.filter-instock {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px;
  background: var(--gold-glow);
  border: 1px solid var(--border-gold-light);
  border-radius: var(--radius-md);
  user-select: none;
  transition: var(--transition);
}
.filter-instock:hover { border-color: var(--gold-500); }
.filter-instock input { position: absolute; opacity: 0; pointer-events: none; }
.filter-instock__mark {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-gold);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  background: var(--bg-white);
  flex-shrink: 0;
}
.filter-instock input:checked + .filter-instock__mark {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
}
.filter-instock input:checked + .filter-instock__mark::after {
  content: '✓';
  color: var(--btn-color);
  font-size: 14px;
  font-weight: 700;
}
.filter-instock__label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-600);
}

/* دکمه اعمال */
.apply-filters {
  padding: 12px 28px;
  background: var(--btn-bg);
  color: var(--btn-color);
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  width: 100%;
  margin-top: auto;
}

.apply-filters:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(207, 164, 52, 0.3);
}

.clear-filters {
  background: none;
  border: none;
  color: #dc2626;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  transition: var(--transition);
  font-family: inherit;
}

.clear-filters:hover { background: rgba(220, 38, 38, 0.06); }

/* ===== ستون محتوا (محصولات + تولبار) ===== */
.shop-main {
  flex: 1;
  min-width: 0;
}

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  padding: 0 4px;
}

.shop-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.shop-toggle {
  display: none;
  padding: 9px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-gold-light);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--gold-600);
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}
.shop-toggle:hover { border-color: var(--gold-500); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
  max-width: 1400px;
  margin: 0 auto var(--space-2xl);
}

.product-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-gold-light);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  animation: cardUp 0.45s ease forwards;
  opacity: 0;
}

@keyframes cardUp {
  to { opacity: 1; transform: translateY(0); }
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-500);
}

.product-card__image {
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-alt));
  cursor: pointer;
  position: relative;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-card__image img { transform: scale(1.06); }

.product-card__no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-glow);
}

.product-card__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  z-index: 2;
}

.badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge--stock { background: var(--gold-500); color: var(--bg-dark); }
.badge--nostock { background: #dc2626; color: white; }
.badge--wage { background: rgba(255,255,255,0.9); color: var(--gold-600); border: 1px solid var(--border-gold); }

.product-card__body {
  padding: var(--space-md) var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.product-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1.5;
}

.product-card__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.product-card__spec {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.product-card__spec strong { color: var(--text-primary); font-weight: 600; }

.product-card__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.product-card__cat {
  background: var(--gold-glow);
  color: var(--gold-600);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}

.product-card__cat:hover {
  background: var(--gold-500);
  color: var(--bg-dark);
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border-light);
}

.product-card__price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold-600);
}

.product-card__price small {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-muted);
}

.product-card__btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--btn-bg);
  color: var(--btn-color);
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.product-card__btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--btn-hover-shadow);
}

.pagination-container {
  display: flex;
  justify-content: center;
  margin-top: var(--space-xl);
}

.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-white);
  padding: var(--space-sm) var(--space-xl);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-gold-light);
  box-shadow: var(--shadow-sm);
}

.page-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  background: linear-gradient(135deg, var(--dark-jade), var(--light-jade));
  color: #fff;
}

.page-btn svg {
  width: 14px;
  height: 14px;
}

.page-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(207, 164, 52, 0.3);
}

.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.page-info { color: var(--text-primary); font-weight: 600; font-size: 0.85rem; min-width: 100px; text-align: center; }

.product-detail-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.product-detail-modal.active { display: block; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.modal-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
  max-width: 900px;
  max-height: 90vh;
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-gold);
}

.modal-header {
  padding: var(--space-md) var(--space-xl);
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-alt));
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  border-bottom: 2px solid var(--gold-500);
}

.modal-header h2 { margin: 0; font-size: 1.1rem; }

.modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.3rem;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover { background: rgba(255, 255, 255, 0.15); color: var(--gold-400); transform: rotate(90deg); }

.modal-body {
  padding: var(--space-xl);
  overflow-y: auto;
  flex: 1;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.detail-gallery { position: relative; }

.detail-image {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-subtle);
  position: relative;
}

.detail-image img { width: 100%; height: 100%; object-fit: cover; }

.detail-image .gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.35);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  opacity: 0;
  backdrop-filter: blur(4px);
}

.detail-image:hover .gallery-nav { opacity: 1; }
.detail-image .gallery-nav:hover { background: rgba(0,0,0,0.55); transform: translateY(-50%) scale(1.1); }

.detail-image .gallery-nav--prev { right: 8px; }
.detail-image .gallery-nav--next { left: 8px; }

.detail-image .gallery-counter {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: rgba(0,0,0,0.4);
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

.detail-thumbnails { display: flex; gap: var(--space-xs); flex-wrap: wrap; }

.detail-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.detail-thumb.active,
.detail-thumb:hover { border-color: var(--gold-500); }

.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }

.detail-info { display: flex; flex-direction: column; gap: var(--space-md); }

.detail-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.5;
}

.detail-specs { display: flex; flex-direction: column; gap: 2px; }

.detail-spec {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: 0.85rem;
}

.detail-spec__label { color: var(--text-muted); }
.detail-spec__value { color: var(--text-primary); font-weight: 700; }
.detail-spec__value--price {
  color: var(--gold-600);
  font-size: 1.1rem;
  font-weight: 800;
}

.detail-description {
  background: var(--bg-cream);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.detail-description h3 { color: var(--text-primary); margin-bottom: var(--space-xs); font-size: 0.95rem; }

.detail-actions { display: flex; gap: var(--space-sm); margin-top: auto; }

.add-to-cart-btn {
  flex: 1;
  background: var(--btn-bg);
  color: var(--btn-color);
  border: none;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.add-to-cart-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--btn-hover-shadow); }
.add-to-cart-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.favorite-btn {
  width: 50px;
  height: 50px;
  border: 1px solid var(--border-gold-light);
  background: var(--bg-white);
  border-radius: var(--radius-md);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}

.favorite-btn:hover { border-color: #dc2626; color: #dc2626; }
.favorite-btn.liked { background: var(--bg-inset); border-color: #dc2626; color: #dc2626; }

.similar-products { margin-top: var(--space-lg); }
.similar-products h3 { color: var(--text-primary); margin-bottom: var(--space-md); font-size: 0.95rem; }

.similar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-sm);
}

.similar-card {
  background: var(--bg-cream);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-light);
}

.similar-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--gold-500); }
.similar-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.similar-card h4 { padding: 8px 8px 2px; margin: 0; font-size: 0.75rem; color: var(--text-primary); }
.similar-card p { padding: 0 8px 8px; margin: 0; font-size: 0.65rem; color: var(--text-muted); }

.detail-sizes {
  margin: var(--space-md) 0;
  padding: var(--space-md);
  background: var(--bg-cream);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-gold-light);
}

.detail-sizes__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.detail-sizes__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: var(--space-xs);
}

.size-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-white);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-align: center;
}

.size-btn:hover:not(:disabled):not(.size-btn--disabled) {
  border-color: var(--gold-500);
  background: var(--gold-glow);
}

.size-btn--active {
  border-color: var(--gold-500) !important;
  background: var(--gold-glow) !important;
  box-shadow: 0 0 0 3px var(--border-gold-light);
}

.size-btn--disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--bg-subtle);
}

.size-btn__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.size-btn__weight {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.size-btn__price {
  font-size: 0.7rem;
  color: var(--gold-600);
  font-weight: 600;
}

.size-btn__nostock {
  font-size: 0.65rem;
  color: #dc2626;
  font-weight: 500;
}

.size-btn__stock {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.detail-full-link {
  display: block;
  text-align: center;
  padding: var(--space-sm);
  color: var(--gold-600);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  border-top: 1px solid var(--border-light);
  margin-top: var(--space-sm);
  transition: var(--transition);
}

.detail-full-link:hover {
  color: var(--gold-500);
  background: var(--gold-glow);
}

.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-3xl);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-gold-light);
  border-top-color: var(--gold-500);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto var(--space-md);
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-3xl) var(--space-md);
}

.empty-state h3 { color: var(--text-primary); margin-bottom: var(--space-xs); }
.empty-state p { color: var(--text-muted); font-size: 0.85rem; }

.retry-btn {
  margin-top: var(--space-md);
  padding: 10px 24px;
  background: var(--btn-bg);
  color: var(--btn-color);
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: var(--transition);
}

.retry-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--btn-hover-shadow);
}

.notification-container {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.notification {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease;
  border-right: 4px solid;
  cursor: pointer;
  border: 1px solid var(--border-gold-light);
}

.notification.success { border-right-color: var(--gold-500); }
.notification.error { border-right-color: #dc2626; }
.notification.info { border-right-color: var(--gold-500); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 991px) {
  .filter-sidebar { width: 260px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-md); }
}

@media (max-width: 767px) {
  .product-page { padding: var(--space-md) var(--space-sm); }
  .shop-layout { flex-direction: column; }

  /* در موبایل سایدبار به کشوی کناری تبدیل می‌شود */
  .filter-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 86%;
    max-width: 340px;
    max-height: 100vh;
    z-index: 1500;
    border-radius: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-xl);
  }
  .filter-sidebar.is-open { transform: translateX(0); }

  .filter-sidebar__close { display: inline-flex; }

  /* بک‌دراپ هنگام باز بودن کشو */
  .filter-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 1499;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .filter-overlay.is-active { opacity: 1; pointer-events: auto; }

  .shop-toggle { display: inline-flex; }
  .shop-layout { gap: 0; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
  .product-card__body { padding: var(--space-sm); }
  .product-card__title { font-size: 0.85rem; }
  .product-card__specs { grid-template-columns: 1fr; }
  .product-card__footer { padding: var(--space-sm); flex-wrap: wrap; gap: var(--space-xs); }
  .product-card__btn { width: 100%; text-align: center; }
  .pagination { padding: var(--space-xs) var(--space-md); gap: var(--space-sm); }
  .page-btn { padding: 8px 16px; font-size: 0.75rem; }
  .modal-container { width: 100%; height: 100%; max-height: 100vh; border-radius: 0; }
  .detail-image .gallery-nav { opacity: 1; }
  .product-detail { grid-template-columns: 1fr; gap: var(--space-md); }
  .detail-title { font-size: 1.1rem; }
  .modal-body { padding: var(--space-md); }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-card__badges { top: 6px; left: 6px; right: 6px; }
  .badge { padding: 3px 8px; font-size: 0.6rem; }
  .detail-actions { flex-direction: column; }
  .favorite-btn { width: 100%; height: 44px; }
  .similar-grid { grid-template-columns: repeat(2, 1fr); }
  .notification-container { left: 10px; right: 10px; max-width: none; }
  .detail-sizes__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  .product-grid { grid-template-columns: 1fr; }
}
