.container {
  width: 100%;
  max-width: 1200px;

  padding: 20px;
}

.page-title {
  text-align: center;
  color: #1a4a72;
  margin-bottom: 40px;
  font-size: 28px;
  font-weight: bold;
}

.shop-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
}

.products-area {
  flex: 1;
  min-width: 200px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.product-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-image {
  width: 100%;
  height: 150px;
  object-fit: contain;
  margin-bottom: 15px;
}


.product-name {
  font-size: 14px;
  margin-bottom: 10px;
  color: #333;
}

.product-price {
  font-size: 16px;
  font-weight: bold;
  color: #1a4a72;
  margin-bottom: 8px;
}

.product-details {
  font-size: 12px;
  color: #666;
}

.sidebar {
  width: 240px;
  height: 500px;
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
  font-size: 18px;
  color: #333;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
  text-align: center;
}

.categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.categories-list li {
  margin-bottom: 12px;
  text-align: right;
  padding-right: 30px; /* ← فاصله برای دایره سفارشی */
  position: relative;
  display: flex;
  align-items: center;
}
.categories-list li::before {
  content: "○"; /* ← دایره توخالی */
  position: absolute;
  right: 0;
  color: #333;
  font-size: 14px;
  line-height: 24px;
  font-weight: normal;
}

.categories-list a {
  text-decoration: none;
  color: #333;
  font-size: 14px;
  padding: 8px 0;
  display: block;
  border-radius: 6px;
  transition: all 0.3s;
  flex: 1;
  text-align: right;
}

.categories-list a:hover {
  background: #f0f4f8;
  color: #1a4a72;
}

@media (max-width: 992px) {
  .products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .products-area {
    width: 600px;
  }
  .sidebar {
    width: 200px;
    height: 600px;
  }
  .categories-list a {
    font-size: 13px;

    font-weight: 500;
  }
}

@media (max-width: 500px) {
  .shop-wrapper {
    flex-direction: column-reverse;
  }

  .sidebar {
    width: 100%;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.shop-sidebar {
  width: 220px;
  background-color: #f5f5f5;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  font-family: Tahoma, Arial, sans-serif;
}

.sidebar-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align:right;
}

/* استایل هر بخش فیلتر */
.filter-section {
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  text-align:right;
}

/* هدر هر بخش */
.filter-header {
  width: 100%;
  padding: 10px 15px;
  background-color: #f9f9f9;
  border: none;
  text-align: right;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: right;
  align-items: center;
  transition: background-color 0.2s ease;
}

.filter-header:hover {
  background-color: #f0f0f0;
}

.filter-header span {
  color: #333;
  text-align:left;
}

/* آیکون فلش */
.toggle-icon {
  font-size: 10px;
  color: #888;
  transition: transform 0.3s ease;
}

.toggle-icon.rotate {
  transform: rotate(180deg);
}

/* محتوای هر بخش */
.filter-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #fff;
}

.filter-content.active {
  max-height: 400px;
  overflow-y: auto;
}

/* لیست اسکرول‌دار */
.scroll-list {
  padding: 10px 15px;
  max-height: 180px;
  overflow-y: auto;
  text-align:right;
}

/* چک‌باکس */
.checkbox-item {
  display: flex;
  flex-direction: row-reverse;
  justify-content: right;
  align-items: center;
  padding: 6px 0;
  cursor: pointer;
  color: #555;
  font-size: 12px;
  transition: color 0.2s ease;
  text-align:right;
}

.checkbox-item:hover {
  color: #007799;
}

.checkbox-item input {
  margin-left: 10px;
  width: 15px;
  height: 15px;
  accent-color: #007799;
  cursor: pointer;
}

.checkbox-item span {
  line-height: 1.4;
}

/* رادیو باتن */
.radio-group {
  padding: 10px 15px;
}

.radio-item {
  display: flex;
    flex-direction: row-reverse;
justify-content: right;
  align-items: center;
  padding: 6px 0;
  cursor: pointer;
  color: #555;
  font-size: 12px;
}

.radio-item input {
  margin-left: 10px;
  width: 15px;
  height: 15px;
  accent-color: #007799;
  cursor: pointer;
}

.radio-item span {
  line-height: 1.4;
}

/* اسکرول‌بار سفارشی */
.scroll-list::-webkit-scrollbar {
  width: 5px;
}

.scroll-list::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.scroll-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.scroll-list::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* حالت موبایل */
@media (max-width: 768px) {
  .shop-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    z-index: 999;
    transition: right 0.3s ease;
  }
  
  .shop-sidebar.active {
    right: 0;
  }
}

.search-wrapper {
    position: relative;
    width: 300px;
    display: flex;
    align-items: center;
}

/* آیکون */
.search-icon {
    position: absolute;
    right: 10px;
}

/* input */
#liveSearchInput {
    width: 100%;
    padding: 10px 35px 10px 10px; /* جا برای آیکون */
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* باکس نتایج */
.live-search-box {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
}
.shop-toolbar {
  width: 100%;
  min-height: 58px;
  margin: 28px 0 22px;
  padding: 10px 18px;
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(235, 246, 255, 0.92));
  border: 1px solid rgba(28, 111, 174, 0.14);
  box-shadow:
    0 14px 34px rgba(22, 79, 120, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction:row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  direction: rtl;
}

.toolbar-count {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #164f78;
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
   flex-direction:row-reverse;
}

.toolbar-count i {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #164f78, #2f9bd4);
  box-shadow: 0 8px 18px rgba(22, 79, 120, 0.18);
}

.toolbar-sort {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.sort-title {
  color: #1f2937;
  font-size: 15px;
  font-weight: 900;
  margin-left: 4px;
}

.sort-btn {
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #4b5563;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.22s ease;
}

.sort-btn:hover {
  color: #164f78;
  background: rgba(47, 155, 212, 0.10);
}

.sort-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #164f78, #2f9bd4);
  box-shadow: 0 10px 22px rgba(22, 79, 120, 0.20);
}

@media (max-width: 768px) {
  .shop-toolbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
    border-radius: 18px;
  }

  .toolbar-sort {
    width: 100%;
    justify-content: flex-start;
  }

  .sort-btn {
    font-size: 13px;
    padding: 0 12px;
  }
}
.category-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  gap: 20px;
}

.category-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.icon-circle {
  width: 100px;
  height: 100px;
  /*background-color: #e6e6e6;*/
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.icon-circle:hover {
  transform: scale(1.05);
  background-color: #dadada;
}

.icon-circle img {
  width: 100%;
  height: auto;
  opacity: 1;
}

.category-item span {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}
.product-name {
  direction: rtl;
  unicode-bidi: isolate;
  text-align: center;
  line-height: 1.8;
  font-size: 15px;
  font-weight: 800;
  color: #1f3654;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-name bdi {
  direction: rtl;
  unicode-bidi: isolate;
}
/* Sidebar modern redesign */
.shop-sidebar {
  width: 260px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(235, 246, 255, 0.92));
  border: 1px solid rgba(28, 111, 174, 0.14);
  border-radius: 22px;
  padding: 16px;
  box-shadow:
    0 14px 34px rgba(22, 79, 120, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-family: Tahoma, Arial, sans-serif;
}

.sidebar-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: right;
}

.filter-section {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(28, 111, 174, 0.10);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 10px 22px rgba(22, 79, 120, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.filter-header {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: #164f78;
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: rtl;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.filter-header:hover {
  background: rgba(47, 155, 212, 0.08);
}

.filter-header span {
  color: #164f78;
}

.toggle-icon {
  color: #164f78;
  font-size: 12px;
  transition: transform 0.25s ease;
}

.toggle-icon.rotate {
  transform: rotate(180deg);
}

.filter-content {
  max-height: 0;
  overflow: hidden;
  background: transparent;
  transition: max-height 0.28s ease;
}

.filter-content.active {
  max-height: 520px;
  overflow-y: auto;
}

.scroll-list,
.radio-group {
  padding: 8px 14px 14px;
}

.checkbox-item,
.radio-item {
  min-height: 34px;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: right;
  gap: 8px;
  padding: 5px 0;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.checkbox-item:hover,
.radio-item:hover {
  color: #164f78;
}

.checkbox-item input,
.radio-item input {
  width: 16px;
  height: 16px;
  accent-color: #164f78;
  cursor: pointer;
}

/* Price range filter */
.price-filter-box {
  padding: 18px 14px 16px;
  direction: rtl;
}

.price-slider-wrap {
  position: relative;
  height: 34px;
  margin: 8px 0 18px;
  direction: ltr;
}

.price-slider-track,
.price-slider-progress {
  position: absolute;
  top: 15px;
  height: 5px;
  border-radius: 999px;
}

.price-slider-track {
  left: 0;
  right: 0;
  background: #d7dce1;
}

.price-slider-progress {
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #164f78, #2f9bd4);
  box-shadow: 0 5px 12px rgba(22, 79, 120, 0.22);
}

.price-slider-wrap input[type="range"] {
  position: absolute;
  left: 0;
  top: 7px;
  width: 100%;
  height: 18px;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.price-slider-wrap input[type="range"]::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #064b34;
  border: 3px solid #ffffff;
  box-shadow: 0 6px 16px rgba(6, 75, 52, 0.28);
  pointer-events: auto;
  cursor: pointer;
  -webkit-appearance: none;
}

.price-slider-wrap input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #064b34;
  border: 3px solid #ffffff;
  box-shadow: 0 6px 16px rgba(6, 75, 52, 0.28);
  pointer-events: auto;
  cursor: pointer;
}

.price-field {
  margin-top: 12px;
}

.price-field label {
  display: block;
  margin-bottom: 8px;
  color: #5b6470;
  font-size: 14px;
  font-weight: 900;
}

.price-value-box {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 15px;
  background: rgba(241, 243, 245, 0.95);
  color: #555;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 900;
}

.clear-price-filter {
  width: 100%;
  min-height: 40px;
  margin-top: 14px;
  border: 0;
  border-radius: 13px;
  background: rgba(47, 155, 212, 0.10);
  color: #164f78;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.22s ease;
}

.clear-price-filter:hover {
  color: #fff;
  background: linear-gradient(135deg, #164f78, #2f9bd4);
  box-shadow: 0 10px 22px rgba(22, 79, 120, 0.18);
}

@media (max-width: 768px) {
  .shop-sidebar {
    width: 300px;
    border-radius: 0;
  }
}
/* Final shop layout fix */
.shop-wrapper {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 260px;
  grid-template-areas:
    "categories categories"
    "toolbar toolbar"
    "products sidebar";
  gap: 30px;
  align-items: flex-start;
  justify-content: unset;
  flex-wrap: unset;
}

.shop-categories-block {
  grid-area: categories;
  width: 100%;
  max-width: 1200px;
  padding: 20px;
  box-sizing: border-box;
}

.shop-toolbar {
  grid-area: toolbar;
}

.products-area {
  grid-area: products;
  width: 100%;
  min-width: 0;
}

.shop-sidebar {
  grid-area: sidebar;
  width: 260px;
  box-sizing: border-box;
}

.products-grid {
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.product-card {
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 992px) {
  .shop-wrapper {
    grid-template-columns: minmax(0, 1fr) 260px;
    grid-template-areas:
      "categories categories"
      "toolbar toolbar"
      "products sidebar";
  }

  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .shop-wrapper {
    display: flex !important;
    flex-direction: column;
  }

  .shop-categories-block,
  .shop-toolbar,
  .products-area,
  .shop-sidebar {
    width: 100%;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
.discount-toggle-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(28, 111, 174, 0.10);
  border-radius: 18px;
  padding: 14px;
  box-shadow:
    0 10px 22px rgba(22, 79, 120, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.discount-toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  direction: rtl;
}

.discount-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #164f78;
}

.discount-toggle-text strong {
  font-size: 14px;
  font-weight: 900;
}

.discount-toggle-text small {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
}

.discount-toggle-label input {
  display: none;
}

.discount-switch {
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: #d7dce1;
  position: relative;
  flex-shrink: 0;
  transition: 0.25s ease;
}

.discount-switch::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  position: absolute;
  top: 3px;
  right: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transition: 0.25s ease;
}

.discount-toggle-label input:checked + .discount-switch {
  background: linear-gradient(135deg, #164f78, #2f9bd4);
  box-shadow: 0 8px 18px rgba(22, 79, 120, 0.18);
}

.discount-toggle-label input:checked + .discount-switch::before {
  right: 25px;
}