.products-wrap,
.products-wrap * {
  box-sizing: border-box;
}

.products-wrap {
  --pr-visible-desktop: 4;
  --pr-visible-tablet: 2;
  --pr-visible-mobile: 1;
  --pr-visible: var(--pr-visible-desktop);
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 72px 0 80px;
  overflow: hidden;
  background: var(--pr-section-bg, #fbf8f3);
  font-family: Tahoma, "IRANSans", "Vazirmatn", sans-serif;
  direction: rtl;
}

.products-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 42% at 50% -10%, rgba(196, 160, 106, 0.12), transparent 58%),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 92px,
      rgba(27, 67, 50, 0.025) 92px,
      rgba(27, 67, 50, 0.025) 93px
    );
}

.products-head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto 28px;
  padding: 0 24px;
}

.products-title {
  margin: 0 0 18px;
  text-align: center;
  font-size: var(--pr-title-size, 30px);
  line-height: 1.55;
  font-weight: 800;
  color: var(--pr-title-color, #1b4332);
  animation: productsFadeUp 0.7s ease both;
}

.products-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: 14px auto 0;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--pr-accent, #c4a06a), transparent);
  transform-origin: center;
  animation: productsLine 0.8s ease 0.18s both;
}

.products-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 26px;
  border-radius: 999px;
  background: var(--pr-accent, #c4a06a);
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 10px 22px rgba(196, 160, 106, 0.28);
  animation: productsFadeUp 0.7s ease 0.12s both;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.products-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(196, 160, 106, 0.36);
}

.products-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 56px;
}

.products-viewport {
  overflow: hidden;
  direction: ltr;
}

.products-track {
  display: flex;
  flex-direction: row-reverse;
  will-change: transform;
}

.products-card {
  flex: 0 0 calc(100% / var(--pr-visible));
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 10px;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  direction: rtl;
}

.products-surface {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(27, 67, 50, 0.06);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(27, 67, 50, 0.06);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.products-card:hover .products-surface {
  transform: translateY(-8px);
  border-color: rgba(196, 160, 106, 0.35);
  box-shadow: 0 22px 48px rgba(27, 67, 50, 0.12);
}

.products-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #efe8dc;
}

.products-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.products-card:hover .products-media img {
  transform: scale(1.08);
}

.products-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 0 var(--pr-accent, #c4a06a);
  transition: box-shadow 0.4s ease;
}

.products-card:hover .products-media::after {
  box-shadow: inset 0 0 0 3px var(--pr-accent, #c4a06a);
}

.products-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 180px;
  color: #8a7a64;
  font-size: 13px;
  font-weight: 700;
  background:
    radial-gradient(circle at 30% 30%, rgba(196, 160, 106, 0.18), transparent 42%),
    linear-gradient(145deg, #f3ecdf, #e4d8c4);
}

.products-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 16px 22px;
}

.products-name {
  margin: 0;
  text-align: center;
  font-size: var(--pr-card-title-size, 15px);
  line-height: 1.65;
  font-weight: 800;
  color: var(--pr-card-title-color, #1b4332);
}

.products-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 142px;
  margin-top: auto;
  padding: 10px 22px;
  border-radius: 10px;
  background: #eceaf3;
  color: var(--pr-btn-text, #3d342b);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none !important;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.products-btn:hover,
.products-btn:focus {
  background: var(--pr-accent, #c4a06a);
  color: #fff;
  transform: translateY(-2px);
}

.products-nav {
  position: absolute;
  top: 44%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #1b4332;
  box-shadow: 0 10px 24px rgba(27, 67, 50, 0.14);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.products-nav:hover {
  background: var(--pr-accent, #c4a06a);
  color: #fff;
  transform: translateY(-50%) scale(1.06);
}

.products-nav--prev { right: 8px; }
.products-nav--next { left: 8px; }

@keyframes productsFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes productsLine {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 1100px) {
  .products-wrap { --pr-visible: var(--pr-visible-tablet); }
}

@media (max-width: 800px) {
  .products-wrap {
    --pr-visible: var(--pr-visible-tablet);
    padding: 44px 0 52px;
  }

  .products-head { padding: 0 16px; margin-bottom: 20px; }
  .products-title { font-size: 24px; }
  .products-stage { padding: 0 44px; }
  .products-card { padding: 0 6px; }
  .products-surface { border-radius: 16px; }
  .products-body { gap: 12px; padding: 14px 10px 16px; }
  .products-name { font-size: 13px; }
  .products-btn { min-width: 0; width: 100%; padding: 9px 12px; font-size: 12.5px; }
  .products-nav { width: 38px; height: 38px; font-size: 22px; }
}

@media (max-width: 520px) {
  .products-wrap { --pr-visible: var(--pr-visible-mobile); padding: 32px 0 40px; }
  .products-all { width: 100%; max-width: 320px; }
  .products-stage { padding: 0 16px 0 8px; }
  .products-nav { width: 34px; height: 34px; font-size: 20px; }
  .products-nav--prev { right: 4px; }
  .products-nav--next { left: 4px; }
  .products-card { padding: 0 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .products-wrap *,
  .products-title,
  .products-title::after,
  .products-all,
  .products-media img {
    animation: none !important;
    transition: none !important;
  }
}
