/* ============================================================
   یکپارچه‌سازی استایل‌های کراسل تملند
   شامل: Tamland Product Carousel + Product Categories Slider
   نسخه ساده و مسطح — کارت سفید، حاشیه‌ی نازک، سایه‌ی ملایم،
   قیمت قرمز پررنگ + بج تخفیف مربعی، مطابق طرح فعلی سایت
   ============================================================ */

/* ─── متغیرهای سراسری (مشترک) ────────────────────────────── */
:root {
  --primary: #C5161C;
  --primary-deep: #8f0f14;
  --primary-hover: #FBDADB;
  --text-dark: #231f20;
  --text-body: #58595B;
  --text-muted: #9e9e9e;
  --border-main: #d6d6d6;
  --border-light: #D7D7D7;
  --bg-light: #f5f5f5;
  --white: #ffffff;

  /* توکن‌های سیستم کارت — ساده و مسطح، مطابق طرح واقعی سایت */
  --ink: #231f20;
  --ink-soft: #8a8a8a;
  --paper-warm: #ffffff;
  --line: #ececec;
  --line-strong: #e2e2e2;
  --shadow-card-rest: 0 2px 10px rgba(0, 0, 0, .06);
  --shadow-card-hover: 0 6px 18px rgba(0, 0, 0, .10);
  --ease-card: cubic-bezier(.22, .61, .36, 1);

  --shadow-card: 0px 5px 20px rgba(0, 0, 0, 0.1);
  --radius-card: 16px;
  --radius-sm: 8px;
  --transition-default: all 0.3s ease;
  --font-primary: 'YekanBakhFaNum', sans-serif;
  --font-alt: 'YekanBakhFanum', sans-serif;
}

/* ============================================================
   بخش ۱ – Tamland Product Carousel (کراسل محصولات)
   ============================================================ */

/* ---- Filters ---- */
.tamland-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  font-size: 16px;
  font-family: var(--font-alt);
}

.filter-group label {
  font-weight: bold;
  color: var(--text-dark);
}

.tamland-category-filter,
.tamland-tag-filter {
  width: 250px;
  max-width: 500px;
  border-radius: 15px;
  border: 1px solid var(--border-light);
  font-family: inherit;
  color: var(--text-body);
  font-size: 14px;
}

.filter-group.teacher {
  display: none;
}

/* ---- Swiper Overrides ---- */
.tamland-swiper {
  padding: 10px 5px 40px;
}

/* ---- Tabs Carousel ---- */
.product-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 5px;
  background-color: var(--bg-light);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.product-tabs::-webkit-scrollbar {
  display: none;
}

.product-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 35px;
  padding: 10px 24px;
  background-color: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-default);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-body);
  border-color: #D5D5D6;
  scroll-snap-align: center;
  flex-shrink: 0;
}

.product-tab:hover {
  background-color: var(--primary-hover);
  color: var(--text-body);
}

.product-tab.active {
  background-color: var(--primary);
  color: var(--white);
}

/* ---- Slider Container ---- */
.product-slider-container {
  position: relative;
}

.tamland-swiper .swiper {
  padding: 10px 0 50px;
}

/* ---- Slide & Card Centering + ارتفاع یکسان ---- */
.tamland-swiper .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: stretch;
  height: 100%;
}

/* ---- Product Card Link ---- */
.product-card-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    width: 100%;
    justify-content: center;
}

.product-card-link:hover {
  text-decoration: none;
}

/* ======= کارت محصول ======= */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background-color: var(--paper-warm);
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  width: 100%;
  max-width: 245px;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: var(--shadow-card-rest);
  transition: transform .3s var(--ease-card), box-shadow .3s var(--ease-card);
  height: 100%;
}

.product-card:hover,
.product-card-link:hover .product-card {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.product-card-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0;
  flex: 1;
}

/* ---- تصویر — تمام‌عرض، بدون حاشیه داخلی ---- */
.product-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0;
  overflow: hidden;
  border: none;
  box-shadow: none;
}

.product-image-wrapper img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease-card);
}

.product-card:hover .product-image-wrapper img {
  transform: scale(1.04);
}

/* ---- عنوان ---- */
.product-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 12px 10px;
  align-self: stretch;
  width: 100%;
}

.product-title {
  width: 100%;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  line-height: 22px;
  text-align: center;
  direction: rtl;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- قیمت (ثابت در پایین) ---- */
.product-price-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 0 12px 14px;
  align-self: stretch;
  width: 100%;
  min-height: auto;
  margin-top: auto;
  flex-shrink: 0;
}

.product-price-discount-container {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.product-price-column {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-grow: 1;
  gap: 4px;
}

.current-price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.toman-icon {
  width: 17.47px;
  height: 24.09px;
  aspect-ratio: 0.73;
  object-fit: cover;
  margin-right: 5px;
}

.current-price {
  font-family: var(--font-primary);
  font-weight: 800;
  color: var(--primary);
  font-size: 18px;
  line-height: 18px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.original-price-container {
  width: 100%;
  height: 22.16px;
  position: relative;
}

.original-price {
  font-family: var(--font-primary);
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 18px;
  text-align: center;
  text-decoration: line-through;
}

.discount-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 6px;
  background-color: var(--primary);
  border-radius: 8px;
  flex-shrink: 0;
}

.discount-text {
  font-family: var(--font-primary);
  font-weight: 900;
  color: var(--white);
  font-size: 11px;
  line-height: 18px;
  white-space: nowrap;
  direction: rtl;
  text-align: center;
}

/* ---- "View All" Button ---- */
.view-all-btn-container {
  display: none;
}

.view-all-btn {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.view-all-btn button {
  background-color: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 12px 24px;
  border-radius: 12px;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-default);
}

.view-all-btn button:hover {
  background-color: var(--primary);
  color: var(--white);
}

/* ---- Swiper Navigation & Pagination ---- */
.tamland-swiper .swiper-button-next,
.tamland-swiper .swiper-button-prev {
  background-color: var(--bg-light);
  border: 1px solid var(--primary);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  color: var(--primary);
  transition: var(--transition-default);
}

.tamland-swiper .swiper-button-next:hover,
.tamland-swiper .swiper-button-prev:hover {
  background-color: var(--primary);
  color: var(--white);
}

.tamland-swiper .swiper-button-next::after,
.tamland-swiper .swiper-button-prev::after {
  font-size: 20px;
  font-weight: bold;
}

.tamland-swiper .swiper-button-next {
  left: 10px;
}
.tamland-swiper .swiper-button-prev {
  right: 10px;
}

.tamland-swiper .swiper-pagination-bullet-active {
  background: #0073aa;
}

.tamland-swiper .swiper-pagination {
  display: none;
}

/* ---- WooCommerce Currency Symbol Override ---- */
span.woocommerce-Price-currencySymbol {
  display: none !important;
}

/* ---- Loader ---- */
.pc-loader {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #1a73e8;
  border-radius: 50%;
  animation: pc-spin 1s linear infinite;
  margin: 40px auto;
}

@keyframes pc-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ---- Free Price ---- */
.free-price {
  color: #28a745;
  font-weight: 800;
  font-size: 17px;
}
.free-price + .toman-icon {
  display: none;
}

/* ============================================================
   بخش ۲ – Product Categories Slider (اسلایدر دسته‌بندی)
   ============================================================ */

/* ─── Base ────────────────────────────────────────────── */
.pcs-wrapper,
.pcs-search-grid-wrapper {
  direction: rtl;
  font-family: var(--font-primary);
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ─── Title ───────────────────────────────────────────── */
.pcs-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.pcs-title {
  font-family: var(--font-primary);
  font-size: 28px;
  font-weight: 800;
  color: #222;
  margin: 0;
}

a.pcs-see-all--mobile,
a.pcs-view-all-btn--mobile {
  display: none;
}

/* ─── Tabs row ────────────────────────────────────────── */
.pcs-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.pcs-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.pcs-tabs::-webkit-scrollbar { display: none; }

.pcs-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid rgba(68,68,68,0.25);
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 12px;
  color: #444;
  flex-shrink: 0;
  transition: var(--transition-default);
}
.pcs-tab:hover {
  background: var(--white);
  border-color: var(--primary);
  color: var(--primary);
}
.pcs-tab--active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  font-weight: 700;
}

/* ─── Sub-category dropdown ───────────────────────────── */
.pcs-subcat-row {
  margin-bottom: 14px;
}

.pcs-subcat-select {
  width: 100%;
  max-width: 220px;
  height: 32px;
  padding: 0 12px;
  background: var(--white);
  border: 1px solid rgba(68,68,68,0.25);
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 12px;
  color: #444;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.pcs-subcat-select:hover,
.pcs-subcat-select:focus {
  border-color: var(--primary);
  color: var(--primary);
  outline: none;
}

/* ─── Dropdown row ────────────────────────────────────── */
.pcs-dropdown-wrap {
  flex: 1;
  min-width: 0;
}

.pcs-dropdown-select {
  width: 100%;
  max-width: 260px;
  height: 36px;
  padding: 0 14px;
  background: var(--white);
  border: 1px solid rgba(68,68,68,0.25);
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 12px;
  color: #444;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.pcs-dropdown-select:hover,
.pcs-dropdown-select:focus {
  border-color: var(--primary);
  color: var(--primary);
  outline: none;
}

/* ─── Actions row ─────────────────────────────────────── */
.pcs-tabs-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pcs-see-all {
  height: var(--tamland-space-32, 2rem);
  padding: 0 var(--tamland-space-16, 1rem);
  border-radius: var(--tamland-radius-8, 0.5rem);
  border: 1px solid var(--tamland-color-primary, var(--primary));
  background: var(--tamland-color-surface-bg, var(--white));
  color: var(--tamland-color-primary, var(--primary));
  font-size: var(--tamland-font-size-label-lg, 0.875rem);
  font-weight: var(--tamland-font-weight-semibold, 600);
  line-height: var(--tamland-line-height-label-lg, 1.25rem);
  font-family: var(--tamland-font-family, var(--font-primary));
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--tamland-space-8, 0.5rem);
  white-space: nowrap;
  box-sizing: border-box;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.pcs-see-all:hover,
.pcs-see-all:focus-visible {
  background: var(--tamland-color-primary, var(--primary));
  color: var(--tamland-color-text-white, var(--white));
  border-color: var(--tamland-color-primary, var(--primary));
  text-decoration: none;
}
.pcs-see-all--hidden { display: none; }

.pcs-nav-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pcs-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  transition: background 0.2s ease;
}
.pcs-nav-btn:hover:not(:disabled) {
  background: var(--primary-deep);
}
.pcs-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.pcs-nav-icon {
  width: 18px;
  height: 18px;
  display: block;
}

/* ─── Slider panes ────────────────────────────────────── */
.pcs-sliders { position: relative; }
.pcs-slider-pane { position: relative; }

/* ─── Card link ──────────────────────────────────────── */
.pcs-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  width: 100%;
  height: 100%;
}
.pcs-card-link:hover { text-decoration: none; }

/* ─── Swiper slide ───────────────────────────────────── */
.pcs-slider-pane .swiper-slide {
  display: flex;
  align-items: stretch;
}

/* Fallback slide width before Swiper JS sets inline sizes */
.tamland-swiper:not(.swiper-initialized) .swiper-wrapper,
.tamland-product-carousel-wrapper .swiper:not(.swiper-initialized) .swiper-wrapper,
.pcs-slider-pane .swiper:not(.swiper-initialized) .swiper-wrapper {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow: hidden !important;
  gap: var(--tamland-space-20, 20px) !important;
  box-sizing: border-box !important;
}

.tamland-swiper:not(.swiper-initialized) .swiper-slide,
.tamland-product-carousel-wrapper .swiper:not(.swiper-initialized) .swiper-slide,
.pcs-slider-pane .swiper:not(.swiper-initialized):not(.pcs-skeleton-swiper) .swiper-slide {
  --pcs-spv: var(--pcs-spv-mobile, 1.5);
  width: calc((100% - (var(--pcs-spv) - 1) * var(--pcs-gap, var(--tamland-space-10, 10px))) / var(--pcs-spv)) !important;
  flex: 0 0 calc((100% - (var(--pcs-spv) - 1) * var(--pcs-gap, var(--tamland-space-10, 10px))) / var(--pcs-spv)) !important;
  max-width: calc((100% - (var(--pcs-spv) - 1) * var(--pcs-gap, var(--tamland-space-10, 10px))) / var(--pcs-spv)) !important;
  box-sizing: border-box !important;
}

.pcs-slider-pane .swiper.swiper-initialized .swiper-slide {
  width: auto;
  max-width: none !important;
  flex: 0 0 auto !important;
}
@media (min-width: 480px) {
  .tamland-swiper:not(.swiper-initialized) .swiper-slide,
  .tamland-product-carousel-wrapper .swiper:not(.swiper-initialized) .swiper-slide,
  .pcs-slider-pane .swiper:not(.swiper-initialized):not(.pcs-skeleton-swiper) .swiper-slide {
    --pcs-spv: var(--pcs-spv-mobile-lg, 2);
  }
}
@media (min-width: 640px) {
  .tamland-swiper:not(.swiper-initialized) .swiper-slide,
  .tamland-product-carousel-wrapper .swiper:not(.swiper-initialized) .swiper-slide,
  .pcs-slider-pane .swiper:not(.swiper-initialized):not(.pcs-skeleton-swiper) .swiper-slide {
    --pcs-spv: var(--pcs-spv-tablet-sm, 2.8);
  }
}
@media (min-width: 768px) {
  .tamland-swiper:not(.swiper-initialized) .swiper-slide,
  .tamland-product-carousel-wrapper .swiper:not(.swiper-initialized) .swiper-slide,
  .pcs-slider-pane .swiper:not(.swiper-initialized):not(.pcs-skeleton-swiper) .swiper-slide {
    --pcs-spv: var(--pcs-spv-tablet, 3);
  }
}
@media (min-width: 992px) {
  .tamland-swiper:not(.swiper-initialized) .swiper-slide,
  .tamland-product-carousel-wrapper .swiper:not(.swiper-initialized) .swiper-slide,
  .pcs-slider-pane .swiper:not(.swiper-initialized):not(.pcs-skeleton-swiper) .swiper-slide {
    --pcs-spv: var(--pcs-spv-tablet-lg, 4);
  }
}
@media (min-width: 1200px) {
  .tamland-swiper:not(.swiper-initialized) .swiper-slide,
  .tamland-product-carousel-wrapper .swiper:not(.swiper-initialized) .swiper-slide,
  .pcs-slider-pane .swiper:not(.swiper-initialized):not(.pcs-skeleton-swiper) .swiper-slide {
    --pcs-spv: var(--pcs-spv-desktop, 5);
    --pcs-gap: var(--tamland-space-10, 10px);
  }
}

/* ======= کارت دسته‌بندی ======= */
.pcs-card {
  position: relative;
  width: 100%;
  background: var(--paper-warm);
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card-rest);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 285px;
  box-sizing: border-box;
  transition: transform .3s var(--ease-card), box-shadow .3s var(--ease-card);
}
.pcs-card:hover {
  transform: none;
  box-shadow: var(--shadow-card-hover);
}

/* ─── Image wrap ─────────────────────────────────────── */
.pcs-card__img-wrap {
  width: 100%;
  height: 168px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
  background-size: 400% 100%;
  animation: pcs-shimmer 1.4s ease-in-out infinite;
}
.pcs-card__img-wrap.pcs-img-loaded {
  animation: none;
  background: none;
}
.pcs-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s var(--ease-card);
}
.pcs-card:hover .pcs-card__img {
  transform: scale(1.04);
}

/* ─── Badges ─────────────────────────────────────────── */
.pcs-badge {
  position: absolute;
  top: 8px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-primary);
  padding: 3px 9px;
  border-radius: 20px;
  line-height: 1.5;
  white-space: nowrap;
  z-index: 5;
}
.pcs-badge--type {
  right: 8px;
  background: rgba(32, 29, 30, .55);
  color: var(--white);
  backdrop-filter: blur(3px);
}
.pcs-badge--discount {
  left: 8px;
  background: var(--primary);
  color: var(--white);
}
.pcs-badge--free100 {
  left: 8px;
  background: #2E7D32;
  color: var(--white);
}

.custom-course-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-primary);
  padding: 3px 9px;
  border-radius: 20px;
  line-height: 1.5;
  white-space: nowrap;
  z-index: 5;
  color: var(--white);
}
.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(32, 29, 30, .55); }
.custom-course-badge ~ .pcs-badge--free100 { top: 40px; }

/* ─── Title ──────────────────────────────────────────── */
.pcs-card__title {
  margin: 0;
  padding: 10px 12px 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--ink);
  direction: rtl;
  text-align: right;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

/* ─── Footer / price ─────────────────────────────────── */
.pcs-card__footer {
  padding: 6px 12px 14px;
  margin-top: auto;
  direction: rtl;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
}

.pcs-card--discounted .pcs-card__footer {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.pcs-discount-box {
  background: var(--primary);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-primary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pcs-card__price-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: flex-end;
}

.pcs-card__price {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 3px;
  padding-top: 10px;
  font-variant-numeric: tabular-nums;
}
.pcs-card__price em {
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-soft);
  font-style: normal;
}
.pcs-card__price--free {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.pcs-card--discounted .pcs-card__price {
  color: var(--primary);
}

.pcs-card__old-price {
  font-size: 11px;
  color: #bbb;
  text-decoration: line-through;
  direction: rtl;
  margin-top: -10px;
}
.pcs-card__old-price .woocommerce-Price-amount {
  font-size: 11px;
}

/* ─── Skeleton ───────────────────────────────────────── */
.pcs-skeleton-card {
  background: var(--tamland-color-surface-card, var(--paper-warm));
  border-radius: var(--tamland-radius-16, 16px);
  border: 1px solid var(--tamland-color-border, var(--line));
  overflow: hidden;
  height: 100%;
  min-height: 285px;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 0 var(--tamland-space-12, 0.75rem);
}
.pcs-skeleton__img {
  width: 100%;
  height: var(--tamland-shop-thumb-h, 12.5rem);
  border-radius: var(--tamland-radius-16, 16px) var(--tamland-radius-16, 16px) 0 0;
  flex-shrink: 0;
}
.pcs-skeleton__line {
  height: 12px;
  border-radius: 6px;
  margin: 10px 12px 0;
}

/* ─── Skeleton slide sizing ──────────────────────────── */
.pcs-skeleton-swiper .swiper-wrapper {
  gap: var(--pcs-gap, 20px);
}
.pcs-skeleton-swiper .swiper-slide {
  flex-shrink: 0;
  --pcs-spv: var(--pcs-spv-mobile, 1);
  width: calc((100% - (var(--pcs-spv) - 1) * var(--pcs-gap, 20px)) / var(--pcs-spv));
}
@media (min-width: 640px) {
  .pcs-skeleton-swiper .swiper-slide {
    --pcs-spv: var(--pcs-spv-tablet, 2);
  }
}
@media (min-width: 1024px) {
  .pcs-skeleton-swiper .swiper-slide {
    --pcs-spv: var(--pcs-spv-desktop, 4.15);
    --pcs-gap: var(--tamland-space-12, 12px);
  }
}

.pcs-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
  background-size: 400% 100%;
  animation: pcs-shimmer 1.4s ease-in-out infinite;
}
@keyframes pcs-shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

/* ─── Search grid ─────────────────────────────────────── */
.pcs-search-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.pcs-search-grid .pcs-card {
  height: 100%;
}
.pcs-search-grid .pcs-grid-item {
  display: flex;
  align-items: stretch;
}

.pcs-search-view-all {
  margin-top: 20px;
  text-align: center;
}

.pcs-view-all-btn {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 24px;
  border-radius: 10px;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.pcs-view-all-btn:hover {
  background: var(--primary);
  color: var(--white);
  text-decoration: none;
}

/* ─── Empty state ─────────────────────────────────────── */
.pcs-no-products {
  text-align: center;
  padding: 32px 16px;
  color: #999;
  font-size: 14px;
}

/* ============================================================
   پاسخگویی (Responsive) – هر دو بخش با هم
   ============================================================ */

/* ---- Tamland Product Carousel ---- */
@media (max-width: 1023px) {
  .product-image-wrapper {
    aspect-ratio: 1 / 1;
  }
  .product-title {
    font-size: 13px;
    line-height: 20px;
  }
  .current-price {
    font-size: 18px;
  }
  .tamland-swiper .swiper-button-next,
  .tamland-swiper .swiper-button-prev {
    width: 40px;
    height: 40px;
  }
  .tamland-swiper .swiper-button-next::after,
  .tamland-swiper .swiper-button-prev::after {
    font-size: 18px;
  }
}

@media (max-width: 767px) {
  .product-categories-slider-wrapper {
    margin: 15px 0;
  }
  .product-tabs {
    margin-bottom: 15px;
    padding: 8px 5px;
    gap: 8px;
  }
  .product-tab {
    height: 30px;
    padding: 8px 16px;
    font-size: 12px;
  }
  .tamland-swiper .swiper {
    padding-bottom: 40px;
  }
  .product-card-inner {
    max-width: 280px;
  }
  .product-image-wrapper {
    aspect-ratio: 1 / 1;
  }
  .product-title-wrapper {
    margin: 0 12px;
    padding: 14px 4px 10px;
  }
  .product-title {
    font-size: 12px;
    line-height: 18px;
    -webkit-line-clamp: 2;
  }
  .product-price-wrapper {
    gap: 12px;
    padding: 10px 12px 12px;
  }
  .current-price {
    font-size: 16px;
  }
  .toman-icon {
    width: 15px;
    height: 20px;
  }
  .discount-badge {
    width: 32px;
    height: 32px;
  }
  .discount-text {
    font-size: 11px;
  }
  .view-all-btn {
    margin-top: 20px;
  }
  .view-all-btn button {
    padding: 10px 20px;
    font-size: 13px;
  }
  .tamland-swiper .swiper-button-next,
  .tamland-swiper .swiper-button-prev {
    width: 35px;
    height: 35px;
  }
  .tamland-swiper .swiper-button-next::after,
  .tamland-swiper .swiper-button-prev::after {
    font-size: 16px;
  }
  .tamland-swiper .swiper-button-next {
    left: 5px;
  }
  .tamland-swiper .swiper-button-prev {
    right: 5px;
  }
}

@media (max-width: 480px) {
  .product-tab {
    font-size: 11px;
    padding: 6px 12px;
  }
  .product-title {
    font-size: 11px;
    line-height: 16px;
  }
  .current-price {
    font-size: 15px;
  }
  .view-all-btn button {
    font-size: 12px;
    padding: 8px 16px;
  }
}

/* ---- Product Categories Slider ---- */
@media (max-width: 1023px) {
  .pcs-card {
    height: 255px;
  }
  .pcs-card__img-wrap {
    height: 148px;
  }
  .pcs-skeleton-card {
    height: 255px;
  }
  .pcs-skeleton__img {
    height: 148px;
  }
  .pcs-search-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  /* ======= تغییر کلیدی برای نمایش ۱٫۲ کارت در موبایل ======= */
  .pcs-slider-pane .swiper:not(.swiper-initialized):not(.pcs-skeleton-swiper) .swiper-slide {
    --pcs-spv-mobile: var(--tamland-shop-carousel-spv-mobile, 1.5);
    --pcs-gap: var(--tamland-shop-carousel-gap, var(--tamland-space-10, 10px));
    width: calc((100% - (var(--pcs-spv-mobile) - 1) * var(--pcs-gap)) / var(--pcs-spv-mobile));
  }
  .pcs-skeleton-swiper .swiper-slide {
    --pcs-spv-mobile: var(--tamland-shop-carousel-spv-mobile, 1.5);
    --pcs-gap: var(--tamland-shop-carousel-gap, var(--tamland-space-10, 10px));
    width: calc((100% - (var(--pcs-spv-mobile) - 1) * var(--pcs-gap)) / var(--pcs-spv-mobile));
  }
  /* ======================================================== */

  .pcs-tab {
    height: 28px;
    padding: 0 12px;
    font-size: 11px;
  }
  .pcs-nav-btn {
    display: none;
  }
  .pcs-see-all {
    height: 1.75rem;
    font-size: var(--tamland-font-size-label-sm, 0.6875rem);
    padding: 0 var(--tamland-space-12, 0.75rem);
  }
  .pcs-search-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .pcs-title-row .pcs-see-all--mobile,
  .pcs-title-row .pcs-view-all-btn--mobile,
  a.pcs-see-all--mobile,
  a.pcs-view-all-btn--mobile {
    display: none !important;
  }
  .pcs-tabs-actions .pcs-see-all {
    display: inline-flex !important;
    height: 1.75rem !important;
    font-size: var(--tamland-font-size-label-sm, 0.6875rem) !important;
    line-height: var(--tamland-line-height-label-sm, 1.4) !important;
    padding: 0 var(--tamland-space-12, 0.75rem) !important;
    border-radius: var(--tamland-radius-8, 0.5rem) !important;
    border: 1px solid var(--tamland-color-primary, var(--primary)) !important;
    background: var(--tamland-color-surface-bg, var(--white)) !important;
    color: var(--tamland-color-primary, var(--primary)) !important;
    flex-shrink: 0 !important;
  }
  .pcs-title {
    font-size: 20px;
  }
  .pcs-wrapper,
  .pcs-search-grid-wrapper {
    padding: 0 12px;
  }
  .pcs-card {
    height: auto;
  }
  .pcs-card__img-wrap {
    height: auto;
    aspect-ratio: 4 / 3;
  }
  .pcs-card__img {
    object-fit: cover;
  }
  .pcs-skeleton-card {
    height: auto;
  }
  .pcs-skeleton__img {
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 480px) {
  .pcs-tab {
    font-size: 12px;
    padding: 0 8px;
    height: 26px;
  }
  .pcs-search-grid {
    grid-template-columns: 1fr;
  }
  .pcs-wrapper,
  .pcs-search-grid-wrapper {
    padding: 0 10px;
  }
  .pcs-card {
    height: auto;
  }
  .pcs-card__img-wrap {
    height: auto;
    aspect-ratio: 4 / 3;
  }
  .pcs-card__img {
    object-fit: cover;
  }
}