/* -----------------------------
   Base scope
------------------------------ */
.tamland-wc-archive {
  direction: rtl;
  background: #f8f8f8;
  color: #202021;
  font-family: "Yekan Bakh FaNum", Sans-serif;
  min-height: 100vh;
  margin: 0;
}

.tamland-wc-archive *,
.tamland-wc-archive *::before,
.tamland-wc-archive *::after {
  box-sizing: border-box;
  font-family: "Yekan Bakh FaNum", Sans-serif !important;
}

.tamland-wc-archive a {
  text-decoration: none;
  color: inherit;
}

.tamland-wc-archive button,
.tamland-wc-archive input {
  font-family: inherit;
}

/* -----------------------------
   Layout container
------------------------------ */
.tamland-wc-archive__container {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: 120px;
  padding-right: 120px;
}

@media (max-width: 1200px) {
  .tamland-wc-archive__container {
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (max-width: 800px) {
  .tamland-wc-archive__container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* =========================================================
   Mobile product card — <= 768px
   کارت افقی RTL:
     ردیف ۱: [عنوان] | [تصویر ۱۰۰×۱۰۰]
     ردیف ۲: [قیمت فعلی]
     ردیف ۳: [٪تخفیف] [قیمت قدیم خط‌خورده]   (فقط برای محصول تخفیف‌دار)
========================================================= */
@media (max-width: 768px) {

  .tamland-wc-archive__title,
  .tamland-wc-archive .elementor-kit-12 h1,
  .tamland-wc-archive h1.tamland-wc-archive__title {
    display: none !important;
  }

  /* یک کارت در هر ردیف */
  .tamland-wc-archive__grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* کارت: ظاهر صحیح */
  .tamland-wc-archive__product {
    background: #ffffff !important;
    border: 1px solid #ebebeb !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.06) !important;
    overflow: hidden !important;
    padding: 0 !important;
    height: auto !important;
  }

  /* لینک: grid دو‌ردیفه — ردیف سوم حذف شد چون discount absolute می‌شه */
  .tamland-wc-archive__product-link {
    display: grid !important;
    grid-template-columns: 100px 1fr !important;
    grid-template-rows: 1fr auto !important;
    grid-template-areas:
      "media title"
      "media price" !important;
    column-gap: 0 !important;
    row-gap: 0 !important;
    align-items: stretch !important;
    min-height: 100px !important;
    position: relative !important;
  }

  /* تصویر: ستون راست، تمام ارتفاع */
  .tamland-wc-archive__product-media {
    grid-area: media !important;
    width: 100px !important;
    height: auto !important;
    min-height: 100px !important;
    aspect-ratio: unset !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    align-self: stretch !important;
    background: #f3f4f6 !important;
    animation: none !important;
    position: relative !important;
  }

  .tamland-wc-archive__product-img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important;
    display: block !important;
  }

  /* hover overlay و type badge در موبایل نمایش نمی‌دهیم */
  .tamland-wc-archive__type-badge,
  .custom-course-badge,
  .tamland-wc-archive__product-overlay {
    display: none !important;
  }

  /* عنوان: ردیف اول ستون چپ */
  .tamland-wc-archive__product-title-wrap {
    grid-area: title !important;
    padding: 10px 10px 4px 10px !important;
    margin: 0 !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: flex-start !important;
  }

  .tamland-wc-archive__product-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.55 !important;
    color: #1a1a1a !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    overflow: hidden !important;
    min-height: 0 !important;
    white-space: normal !important;
  }

  /* متا بدون تخفیف: قیمت در جریان grid */
  .tamland-wc-archive__product-meta {
    grid-area: price !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 4px 10px 10px 10px !important;
    gap: 0 !important;
  }

  .tamland-wc-archive__price-box {
    display: contents !important;
  }

  /* قیمت فعلی: تمام عرض */
  .tamland-wc-archive__price-now {
    order: 1 !important;
    flex-basis: 100% !important;
    display: flex !important;
    align-items: baseline !important;
    justify-content: flex-end !important;
    gap: 3px !important;
  }

  .tamland-wc-archive__price-now-value {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #111111 !important;
  }

  .tamland-wc-archive__price-unit {
    font-size: 10px !important;
    font-weight: 500 !important;
    color: #888888 !important;
  }

  /* "رایگان" */
  .tamland-wc-archive__price-box > span {
    order: 1 !important;
    flex-basis: 100% !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    text-align: left !important;
  }

  .tamland-wc-archive__product-meta.tamland-wc-archive__product-discount {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    grid-area: price !important;
    padding: 4px 10px 10px 10px !important;
  }

  /* price-box: قیمت‌ها به صورت ستون */
  .tamland-wc-archive__product-discount .tamland-wc-archive__price-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
  }

  /* قیمت قدیم خط‌خورده — ردیف اول */
  .tamland-wc-archive__product-discount .tamland-wc-archive__price-old {
    order: 2 !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #888888 !important;
    text-decoration: line-through !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
  }

  /* قیمت فعلی — ردیف دوم */
  .tamland-wc-archive__product-discount .tamland-wc-archive__price-now {
    order: 1 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 3px !important;
    line-height: 1 !important;
  }

  .tamland-wc-archive__product-discount .tamland-wc-archive__price-now-value {
    padding-top: 0 !important;
    line-height: 1 !important;
  }

  /* badge — سمت چپ */
  .tamland-wc-archive__product-discount .tamland-wc-archive__badge {
    order: 3 !important;
    min-width: 32px !important;
    height: 32px !important;
    padding: 4px 6px !important;
    background: #cc1111 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .tamland-wc-archive__badge-text {
    font-size: 10px !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    line-height: 1 !important;
  }

  .tamland-wc-archive__product-free {
    color: #1a1a1a !important;
    font-weight: 700 !important;
    font-size: 15px !important;
  }
}

/* -----------------------------
   Toast
------------------------------ */
.tamland-wc-archive__toast-wrap {
  position: fixed !important;
  top: 16px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 9999 !important;
  width: min(520px, 92vw) !important;
}

.tamland-wc-archive__toast-wrap--hidden {
  display: none !important;
}

.tamland-wc-archive__toast {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 12px 14px !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  background: #ffffff !important;
}

.tamland-wc-archive__toast--success {
  border-color: rgba(34, 197, 94, 0.25) !important;
}

.tamland-wc-archive__toast--error {
  border-color: rgba(239, 68, 68, 0.25) !important;
}

.tamland-wc-archive__toast-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.tamland-wc-archive__toast-dot {
  width: 10px !important;
  height: 10px !important;
  border-radius: 999px !important;
}

.tamland-wc-archive__toast--success .tamland-wc-archive__toast-dot {
  background: #22c55e !important;
}

.tamland-wc-archive__toast--error .tamland-wc-archive__toast-dot {
  background: #ef4444 !important;
}

.tamland-wc-archive__toast-msg {
  font-weight: 700 !important;
  font-size: 14px !important;
  color: #202021 !important;
}

.tamland-wc-archive__toast-close {
  font-weight: 800 !important;
  color: #57595b !important;
  background: transparent !important;
  border: 0 !important;
  cursor: pointer !important;
  padding: 4px 8px !important;
}

.tamland-wc-archive__toast-close:hover {
  color: #202021 !important;
}

/* -----------------------------
   Main
------------------------------ */
.tamland-wc-archive__main {
  padding-top: 24px !important;
  padding-bottom: 40px !important;
}

.tamland-wc-archive__stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
}

.tamland-wc-archive__title-row {
  display: felx !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
}

.tamland-wc-archive__title {
  font-size: 30px !important;
  font-weight: 900 !important;
  color: #202021 !important;
  margin: 0 !important;
}

.tamland-wc-archive__breadcrumb {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

.tamland-wc-archive__breadcrumb-link {
  font-size: 14px !important;
  color: #57595b !important;
  font-weight: 600 !important;
  transition: color 200ms ease !important;
}

.tamland-wc-archive__breadcrumb-link:hover {
  color: #c5161c !important;
}

.tamland-wc-archive__breadcrumb-sep {
  color: #d5d5d6 !important;
}

.tamland-wc-archive__breadcrumb-current {
  font-size: 14px !important;
  color: #202021 !important;
  font-weight: 600 !important;
}

/* -----------------------------
   Category cards
------------------------------ */
.tamland-wc-archive__categories {
  display: flex !important;
  gap: 12px !important;
  width: 100% !important;
  direction: rtl;
}

.tamland-wc-archive__category-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  flex: 1;
  gap: 12px;
  padding: 20px 24px;
  border-radius: 16px;
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  cursor: pointer;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  color: #202021;
  direction: rtl;
}

.tamland-wc-archive__category-card:hover {
  background: #fafafa;
  transform: none;
  box-shadow: none;
}

.tamland-wc-archive__category-card:active {
  transform: none;
}

.tamland-wc-archive__category-card--selected {
  background: #fff5f5;
  color: #c5161c;
  border-color: #c5161c;
  box-shadow: none;
}

.tamland-wc-archive__category-overlay {
  display: none;
}

.tamland-wc-archive__category-icon {
  position: relative;
  z-index: 2;
  display: flex;
  flex-shrink: 0;
  padding: 10px;
  border-radius: 12px;
  color: #c5161c;
  order: 1;
}

.tamland-wc-archive__category-card--selected .tamland-wc-archive__category-icon {
  color: #c5161c;
}

.tamland-wc-archive__category-card--selected .tamland-wc-archive__category-icon-inner img {
  filter: brightness(0) saturate(100%) invert(13%) sepia(94%) saturate(4800%) hue-rotate(349deg) brightness(92%) contrast(95%);
}

.tamland-wc-archive__category-icon-inner {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tamland-wc-archive__category-icon-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tamland-wc-archive__category-text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  order: 2;
}

.tamland-wc-archive__category-title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 800;
  text-align: right;
}

.tamland-wc-archive__category-subtitle {
  font-size: 12px;
  line-height: 18px;
  text-align: right;
  font-weight: 400;
  color: #57595b;
}

.tamland-wc-archive__category-card--selected .tamland-wc-archive__category-subtitle {
  color: #c5161c;
  opacity: 0.8;
}

.tamland-wc-archive__category-indicator {
  display: none;
}

/* -----------------------------
   Content split
------------------------------ */
.tamland-wc-archive__content {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

@media (max-width: 1024px) {
  .tamland-wc-archive__content {
    flex-direction: column;
  }
}

/* Sidebar */
.tamland-wc-archive__sidebar {
  width: 280px;
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

@media (max-width: 1024px) {
  .tamland-wc-archive__sidebar {
    width: 100%;
    position: static;
  }
}

.tamland-wc-archive__sidebar-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #d7d7d7;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tamland-wc-archive__sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e5e5;
}

.tamland-wc-archive__sidebar-title {
  font-size: 20px;
  font-weight: 900;
  margin: 0;
}

.tamland-wc-archive__clear-btn {
  font-size: 12px;
  font-weight: 600;
  color: #c5161c;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px 0;
  margin: 0;
  appearance: none;
  transition: color 200ms ease;
}

.tamland-wc-archive__clear-btn:hover {
  color: #a01318;
}

.tamland-wc-archive__clear-btn--hidden {
  display: none;
}

.tamland-wc-archive__filter-title {
  font-size: 16px;
  font-weight: 800;
}

/* Search — pill shape with icon */
.tamland-wc-archive__search-wrap {
  position: relative;
}

.tamland-wc-archive__search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9e9e9e;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.tamland-wc-archive__search-input {
  width: 100% !important;
  padding: 10px 42px 10px 16px !important;
  border: 1px solid #e8e8e8 !important;
  border-radius: 999px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  outline: none !important;
  transition: border-color 200ms ease !important;
  background: #f5f5f5 !important;
  color: #202021 !important;
}

.tamland-wc-archive__search-input::placeholder {
  color: #aaaaaa;
  font-weight: 400;
}

.tamland-wc-archive__search-input:focus {
  border-color: #c5161c;
  background: #ffffff;
}

/* Active filter chips section wrapper */
.tamland-wc-archive__chips-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 12px;
}


.tamland-wc-archive__chips-label {
  font-size: 12px;
  font-weight: 700;
  color: #57595b;
}

/* Active filter chips */
.tamland-wc-archive__active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
}

.tamland-wc-archive__active-chips:empty {
  display: none;
}

.tamland-wc-archive__active-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #e0e0e0;
  font-size: 13px;
  font-weight: 600;
  color: #202021;
  background: #fff;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
  direction: rtl;
}

.tamland-wc-archive__active-chip:hover {
  border-color: #c5161c;
  color: #c5161c;
}

.tamland-wc-archive__active-chip-x {
  font-size: 12px;
  color: #888;
  line-height: 1;
}

.tamland-wc-archive__divider {
  height: 1px;
  background: #e5e5e5;
  margin: 0;
}

.tamland-wc-archive__acc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px 0;
  direction: rtl;
}

.tamland-wc-archive__acc-btn:hover .tamland-wc-archive__filter-title {
  color: #c5161c;
}

.tamland-wc-archive__acc-chevron {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  position: relative;
  transition: transform 200ms ease;
  font-size: 0;
  color: transparent;
}

.tamland-wc-archive__acc-chevron::before,
.tamland-wc-archive__acc-chevron::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 8px;
  height: 2px;
  background: #57595b;
  border-radius: 2px;
  transition: background 200ms ease;
}

.tamland-wc-archive__acc-chevron::before {
  left: 1px;
  transform: translateY(-50%) rotate(45deg);
}

.tamland-wc-archive__acc-chevron::after {
  right: 1px;
  transform: translateY(-50%) rotate(-45deg);
}

.tamland-wc-archive__acc-btn.is-open .tamland-wc-archive__acc-chevron {
  transform: rotate(180deg);
}

.tamland-wc-archive__acc-btn:hover .tamland-wc-archive__acc-chevron::before,
.tamland-wc-archive__acc-btn:hover .tamland-wc-archive__acc-chevron::after {
  background: #c5161c;
}

.tamland-wc-archive__acc-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease;
}

.tamland-wc-archive__acc-panel--open {
  max-height: 520px;
}

.tamland-wc-archive__checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px 0;
}

/* Check row: label راست، checkbox چپ */
.tamland-wc-archive__check-row {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 10px;
  cursor: pointer;
  direction: rtl;
}

/* Custom checkbox */
.tamland-wc-archive__check {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #d5d5d6;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  position: relative;
  transition: border-color 150ms ease, background 150ms ease;
  order: 2;
}

.tamland-wc-archive__check:checked {
  background: #c5161c;
  border-color: #c5161c;
}

.tamland-wc-archive__check:checked::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 46%;
  width: 5px;
  height: 9px;
  border: 2px solid #ffffff;
  border-top: none;
  border-left: none;
  transform: translate(-50%, -50%) rotate(45deg);
}

.tamland-wc-archive__check-label {
  font-size: 14px;
  font-weight: 600;
  color: #202021;
  transition: color 150ms ease;
  order: 1;
  flex: 1;
  text-align: right;
}

.tamland-wc-archive__check:checked ~ .tamland-wc-archive__check-label {
  color: #c5161c;
  font-weight: 700;
}

.tamland-wc-archive__check-row:hover .tamland-wc-archive__check-label {
  color: #c5161c;
}

.tamland-wc-archive__price-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tamland-wc-archive__price-val {
  font-size: 13px;
  color: #57595b;
  font-weight: 600;
}

.tamland-wc-archive__price-unit-muted {
  font-size: 11px;
  color: #9e9e9e;
  font-weight: 600;
}

.tamland-wc-archive__price-sep {
  font-size: 12px;
  color: #d5d5d6;
}

.tamland-wc-archive__range {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  appearance: none;
  cursor: pointer;
  background: #d5d5d6;
  outline: none;
}

.tamland-wc-archive__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #c5161c;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tamland-wc-archive__range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #c5161c;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tamland-wc-archive__apply-btn {
  width: 100%;
  background: #c5161c;
  color: #ffffff;
  font-size: 16px;
  padding: 12px 24px;
  border-radius: 8px !important;
  border: 0;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 200ms ease, opacity 200ms ease;
  cursor: pointer;
}

.tamland-wc-archive__apply-btn--disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tamland-wc-archive__apply-btn:not(.tamland-wc-archive__apply-btn--disabled):hover {
  background: #a01318;
}

.tamland-wc-archive__spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 999px;
  animation: tamland-wc-archive-spin 800ms linear infinite;
}

@keyframes tamland-wc-archive-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Products area */
.tamland-wc-archive__products {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.tamland-wc-archive__sort-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid #d5d5d6;
  gap: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.tamland-wc-archive__sort-bar > div {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  width: max-content;
  min-width: 100%;
}

.tamland-wc-archive__sort-label {
  font-size: 14px;
  font-weight: 800;
  color: #202021;
}

.tamland-wc-archive__sort-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-right: 12px;
  flex-wrap: nowrap;
}

.tamland-wc-archive__sort-btn {
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #57595b;
  transition: color 200ms ease;
  padding: 4px 0;
  flex: 0 0 auto;
  white-space: nowrap;
  order: 2;
}

.tamland-wc-archive__sort-btn:hover {
  color: #c5161c;
}

.tamland-wc-archive__sort-btn--active {
  color: #c5161c;
  order: 1;
}

.tamland-wc-archive__sort-label {
  flex: 0 0 auto;
  white-space: nowrap;
}

.tamland-wc-archive__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .tamland-wc-archive__products {
    width: 100%;
  }
  .tamland-wc-archive__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .tamland-wc-archive__grid {
    grid-template-columns: 1fr;
  }
}

.tamland-wc-archive__product {
  background: #ffffff;
  border-radius: 16px;
  padding: 0;
  border: 1px solid #ebebeb;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 285px;
  transition: transform 200ms ease, box-shadow 250ms ease;
}

.tamland-wc-archive__product:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.tamland-wc-archive__product-media {
  position: relative;
  width: 100%;
  height: 168px;
  flex-shrink: 0;
  border-radius: 0;
  overflow: hidden;
  margin: 0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
  background-size: 300% 100%;
  animation: pcs-shimmer 1.4s ease-in-out infinite;
}

.tamland-wc-archive__product-img {
  width: 100% !important;
  height: 168px !important;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

@media (max-width: 768px) {
  .tamland-wc-archive__product-img {
    height: 100% !important;
  }
}

.tamland-wc-archive__product:hover .tamland-wc-archive__product-img {
  transform: scale(1.04);
}

.tamland-wc-archive__type-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  font-weight: 700;
  font-family: 'YekanBakhFaNum', sans-serif;
  padding: 2px 8px;
  border-radius: 20px;
  line-height: 1.5;
  white-space: nowrap;
  z-index: 5;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  backdrop-filter: blur(3px);
}

.custom-course-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 9px;
  font-weight: 700;
  font-family: 'YekanBakhFaNum', sans-serif;
  padding: 2px 8px;
  border-radius: 20px;
  line-height: 1.5;
  white-space: nowrap;
  z-index: 5;
  color: #fff;
}
.custom-course-badge.status-register  { background: #1976D2; }
.custom-course-badge.status-progress  { background: #F9A825; }
.custom-course-badge.status-completed { background: #757575; }
.custom-course-badge.status-default   { background: rgba(0, 0, 0, 0.5); }

@keyframes pcs-shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

.tamland-wc-archive__product-overlay {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 200ms ease, transform 200ms ease;
}

.tamland-wc-archive__product:hover .tamland-wc-archive__product-overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.tamland-wc-archive__product-cta {
  width: 180px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}

.tamland-wc-archive__product-cta--primary {
  background: #c5161c !important;
  color: #ffffff !important;
  border-radius: 8px !important;
      width: auto !important;

}

.tamland-wc-archive__product-cta--primary:hover {
  background: #a01318;
}

.tamland-wc-archive__product  .added::after ,
.tamland-wc-archive__product  .loading::after {

        font-family: WooCommerce !important;
}
.tamland-wc-archive__product .added_to_cart {
    display: none !important;
}

.tamland-wc-archive__product-cta--secondary {
  background: #ffffff;
  color: #c5161c;
      width: auto;
    font-size: 14px;
    font-weight: 300;
}

.tamland-wc-archive__product-cta--secondary:hover {
  background: #f5f5f5;
}

.tamland-wc-archive__product-title-wrap {
  padding: 10px 12px 4px;
  margin-bottom: 0;
}

.tamland-wc-archive__product-title {
  font-size: 12px;
  color: #222;
  text-align: right;
  line-height: 1.6;
  font-weight: 600;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  min-height: calc(1.6em * 2);
}

/* footer / meta */
.tamland-wc-archive__product-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 6px 12px 12px;
  gap: 2px;
  margin-top: auto;
}

/* discount footer: row با badge سمت چپ */
.tamland-wc-archive__product-discount {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.tamland-wc-archive__product-discount .tamland-wc-archive__price-box {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 0 !important;
  order: 2 !important;
}

.tamland-wc-archive__product-discount .tamland-wc-archive__price-old {
  order: 2 !important;
  font-size: 11px !important;
  color: #bbb !important;
  text-decoration: line-through !important;
  line-height: 1.4 !important;
  margin-top: 0 !important;
}

.tamland-wc-archive__product-discount .tamland-wc-archive__price-now {
  order: 2 !important;
  color: #C41717 !important;
  line-height: 1 !important;
}

.tamland-wc-archive__product-discount .tamland-wc-archive__price-now-value {
  padding-top: 0 !important;
  color: #C41717 !important;
}

.tamland-wc-archive__product-discount .tamland-wc-archive__badge {

  align-self: center !important;
}

.tamland-wc-archive__product-free {
  color: #1a1a1a !important;
  font-weight: 700;
  font-size: 14px;
}

.tamland-wc-archive__badge {
  background: #CC1111;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
}

.tamland-wc-archive__badge-text {
  font-size: 11px;
  color: #ffffff;
  font-weight: 800;
  font-family: 'YekanBakhFaNum', sans-serif;
}

.tamland-wc-archive__price-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
}

.tamland-wc-archive__price-now {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.tamland-wc-archive__price-now-value {
  padding-top: 10px;
  font-size: 15px;
  color: #111;
  font-weight: 800;
}

.tamland-wc-archive__price-unit {
  font-size: 10px;
  color: #888;
  font-weight: 500;
}

.tamland-wc-archive__price-old {
  font-size: 11px;
  color: #bbb;
  font-weight: 500;
  text-decoration: line-through;
  margin-top: -10px;
}

/* Utility */
.tamland-wc-archive__hidden {
  display: none !important;
}

.tamland-wc-archive__pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.tamland-wc-archive__pagination a,
.tamland-wc-archive__pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #d7d7d7;
  background: #ffffff;
  font-weight: 700;
  color: #202021;
}

.tamland-wc-archive__pagination .current {
  border-color: #c5161c;
  color: #c5161c;
}

.tamland-wc-archive__empty {
  background: #ffffff;
  border: 1px solid #d7d7d7;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  font-weight: 800;
  color: #57595b;
}

/* Skeleton */
.tamland-wc-archive__grid-wrap {
  position: relative;
  overflow: hidden;
}

.tamland-wc-archive__skeleton {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 30;
  padding: 0;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-content: start;
  background: #f8f8f8;
}

.tamland-wc-archive__grid-wrap.is-loading .tamland-wc-archive__skeleton {
  display: grid;
}

.tamland-wc-archive__grid-wrap.is-loading .tamland-wc-archive__grid {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.tamland-wc-archive__skeleton-card {
  min-width: 0;
  height: 285px;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  padding: 12px;
}

@media (max-width: 1024px) {
  .tamland-wc-archive__skeleton {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .tamland-wc-archive__skeleton-card:nth-child(n+9) {
    display: none;
  }
}

@media (max-width: 768px) {
  .tamland-wc-archive__skeleton {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tamland-wc-archive__skeleton-card {
    height: auto !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: 100px minmax(0, 1fr) !important;
    grid-template-rows: 1fr auto !important;
    grid-template-areas:
      "media lines"
      "media bottom" !important;
    column-gap: 0 !important;
    row-gap: 0 !important;
    align-items: stretch !important;
    padding: 0 !important;
    min-height: 100px !important;
    overflow: hidden !important;
  }

  .tamland-wc-archive__skeleton-card:nth-child(n+4) {
    display: none;
  }

  .tamland-wc-archive__skeleton-media {
    grid-area: media !important;
    width: 100px !important;
    height: 100% !important;
    min-height: 100px !important;
    border-radius: 0 !important;
  }

  .tamland-wc-archive__skeleton-lines {
    grid-area: lines !important;
    margin-top: 0 !important;
    padding: 12px 12px 6px !important;
  }

  .tamland-wc-archive__skeleton-bottom {
    grid-area: bottom !important;
    margin-top: 0 !important;
    padding: 0 12px 12px !important;
  }
}

.tamland-wc-archive__skeleton-media {
  height: 168px;
  border-radius: 12px;
  background: #eee;
}

.tamland-wc-archive__skeleton-lines {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tamland-wc-archive__skeleton-line {
  height: 12px;
  border-radius: 10px;
  background: #eee;
}

.tamland-wc-archive__skeleton-line--short {
  width: 65%;
}

.tamland-wc-archive__skeleton-bottom {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tamland-wc-archive__skeleton-pill {
  height: 28px;
  width: 70px;
  border-radius: 999px;
  background: #eee;
}

.tamland-wc-archive__skeleton-pill--wide {
  width: 120px;
}

.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  right: -150px;
  height: 100%;
  width: 150px;
  background: linear-gradient(
    270deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.55) 50%,
    rgba(255,255,255,0) 100%
  );
  animation: tamlandShimmer 1.2s ease-in-out infinite;
}

@keyframes tamlandShimmer {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-500px); }
}

/* Only add margin when accordion is open (JS toggles this class). */
.tamland-wc-archive__acc-btn.is-open {
  margin-bottom: 12px;
}

/* Count badge beside accordion title. */
.tamland-wc-archive__acc-count {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  background: #f1f1f1;
  color: #57595b;
  margin-right: 8px; /* RTL: badge appears left of title */
}

.tamland-wc-archive__acc-count.is-hidden {
  display: none;
}

/* Sticky sidebar — grows with content, capped at viewport height. */
.tamland-wc-archive__sidebar {
  position: sticky;
  top: 100px;
  align-self: flex-start;
}

.tamland-wc-archive__sidebar-card {
  max-height: calc(100vh - 100px - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1024px) {
  .tamland-wc-archive__sidebar {
    position: static;
  }

  .tamland-wc-archive__sidebar-card {
    max-height: none;
    overflow: visible;
  }
}

/* =============================
   Mobile Offcanvas Filters
============================= */

/* دکمه فیلتر — در دسکتاپ مخفی، در موبایل/تبلت زیر categories */
.tamland-wc-archive__filters-fab {
  display: none;
}

/* دکمه بازگشت — فقط در موبایل داخل هدر سایدبار */
.tamland-wc-archive__filters-back-btn {
  display: none;
}

@media (max-width: 1024px) {
  .tamland-wc-archive__filters-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #202021;
    font-size: 14px;
    font-weight: 700;
    padding: 4px 0;
    font-family: inherit;
    flex-shrink: 0;
  }

  .tamland-wc-archive__filters-back-btn:hover {
    color: #c5161c;
  }

  .tamland-wc-archive__filters-back-btn svg {
    transform: rotate(180deg);
  }

  .tamland-wc-archive__sidebar-title {
    display: block;
    color: #ffffff;
  }

  /* هدر سایدبار ثابت بماند، محتوا زیرش اسکرول شود */
  .tamland-wc-archive__sidebar-header {
    position: sticky;
    top: -24px;
    background: #ffffff;
    z-index: 5;
    margin: -24px -24px 0;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e5e5;
  }



/* Overlay */
.tamland-wc-archive__filters-overlay {
  position: fixed;
  inset: 0;
  z-index: 10010;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 220ms ease;
}

/* Offcanvas: only on mobile */
@media (max-width: 1024px) {
  .tamland-wc-archive__filters-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 20px;
    background: #c5161c;
    color: #ffffff;
    border: 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
  }

  .tamland-wc-archive__filters-fab img {
    filter: brightness(0) invert(1);
  }

  /* Turn sidebar into full-screen offcanvas panel */
  .tamland-wc-archive__sidebar {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10015;
    background: transparent;
    transform: translateX(105%);
    transition: transform 260ms ease, visibility 260ms;
    padding: 0;
    overflow: hidden;
    margin: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .tamland-wc-archive__sidebar-card {
    max-height: 100% !important;
    height: 100% !important;
    overflow: auto !important;
    border-radius: 0 !important;
    touch-action: pan-y !important;
  }

  /* Open state */
  .tamland-wc-archive.is-filters-open .tamland-wc-archive__sidebar {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .tamland-wc-archive.is-filters-open .tamland-wc-archive__filters-overlay {
    opacity: 1;
  }
}

/* Prevent body scroll when open */
body.tamland-wc-archive--no-scroll {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 1024px) {
.tamland-wc-archive__sort-bar {
    border: 1px solid #D5D5D6;
box-shadow: 0 3px 10px 0 rgba( 0 , 0 ,0 , 0.1);
padding: 8px 12px;
background: #fff;
border-radius: 8px;
}

  /* گرید ۲×۲ categories در موبایل */
  .tamland-wc-archive__categories {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    overflow: visible !important;
    flex-wrap: unset !important;
  }

  .tamland-wc-archive__category-card {
    flex: unset !important;
    padding: 10px 5px !important;
    gap: 8px !important;
    border-radius: 12px !important;
  }

  .tamland-wc-archive__category-icon {
    padding: 6px !important;
    border-radius: 8px !important;
  }

  .tamland-wc-archive__category-icon-inner {
    width: 22px !important;
    height: 22px !important;
  }

  .tamland-wc-archive__category-title {
    font-size: 13px !important;
  }

  .tamland-wc-archive__category-subtitle {
    font-size: 11px !important;
  }

  .tamland-wc-archive__stack {
    gap: 12px;
  }
}

.tamland-archive-banner{
  margin: 0;
  border-radius: 0;
  overflow: hidden;
}
.tamland-archive-banner img{
  width: 100%;
  display: block;
}
.tamland-archive-banner__link{
  display:block;
}

.tamland-wc-archive__product-link {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

