/* ============================================================
   چرخ گستر سهند - Products Grid Section
   تمام محصولات - کارت‌های صنعتی
   نسخه: 1.0 - Mobile First
   ============================================================ */

:root {
  --atlas-deep-blue: #0a1a2f;
  --atlas-mid-blue: #0d2240;
  --atlas-tech-blue: #134074;
  --atlas-gold: #d4af37;
  --atlas-gold-light: #e5c767;
  --atlas-copper: #b87333;
  --atlas-white: #ffffff;
  --atlas-light-gray: #e8ecf1;
  --atlas-text-on-dark: #ccd6e0;
  --atlas-text-muted: #8899aa;
  --transition-smooth: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1.2);
  --border-radius: 18px;
  --font-primary: 'IRANSans', 'Vazirmatn', 'Tahoma', sans-serif;
}

/* ==================== بخش اصلی ==================== */
.products-grid-section {
  background: linear-gradient(180deg, var(--atlas-mid-blue) 0%, var(--atlas-deep-blue) 100%);
  padding: 5rem 1rem;
  font-family: var(--font-primary);
  direction: rtl;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* پس‌زمینه خطوط شبکه */
.products-grid-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

.pg-container {
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ==================== هدر بخش ==================== */
.pg-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.pg-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212, 175, 55, 0.1);
  color: var(--atlas-gold);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-size: 0.8rem;
  letter-spacing: 2px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  margin-bottom: 1rem;
}

.pg-badge-dot {
  width: 7px;
  height: 7px;
  background: var(--atlas-gold);
  border-radius: 50%;
  animation: pgDotPulse 2s ease-in-out infinite;
}

@keyframes pgDotPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.8);
    opacity: 0.3;
  }
}

.pg-title {
  color: var(--atlas-white);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.pg-title-accent {
  color: var(--atlas-gold);
}

.pg-subtitle {
  color: var(--atlas-text-muted);
  font-size: 1rem;
  max-width: 550px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ==================== گرید محصولات ==================== */
.pg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ==================== کارت محصول ==================== */
.product-card {
  background: linear-gradient(145deg, rgba(19, 64, 116, 0.3), rgba(10, 26, 47, 0.7));
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all var(--transition-smooth);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateY(-10px);
  box-shadow: 0 25px 50px -15px rgba(212, 175, 55, 0.2);
}

/* خط بالای کارت */
.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--atlas-gold), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
}

.product-card:hover::before {
  opacity: 1;
}

/* ==================== تصویر محصول ==================== */
.product-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #060e1a;
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1.2);
}

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

/* اورلی تصویر */
.product-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 26, 47, 0.9) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.5rem;
}

.product-card:hover .product-image-overlay {
  opacity: 1;
}

/* دکمه اورلی */
.product-overlay-btn {
  background: var(--atlas-gold);
  color: var(--atlas-deep-blue);
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  transform: translateY(20px);
  transition: all 0.4s ease 0.1s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.product-card:hover .product-overlay-btn {
  transform: translateY(0);
}

.product-overlay-btn:hover {
  background: var(--atlas-white);
  color: var(--atlas-deep-blue);
}

.product-overlay-btn svg {
  width: 16px;
  height: 16px;
}

/* ==================== نشان‌ها ==================== */
.product-badges {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 2;
}

.product-badge-featured {
  background: linear-gradient(135deg, var(--atlas-gold), var(--atlas-copper));
  color: var(--atlas-deep-blue);
  padding: 0.25rem 0.8rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.product-badge-unavailable {
  background: rgba(231, 76, 60, 0.85);
  color: white;
  padding: 0.25rem 0.8rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ==================== محتوای کارت ==================== */
.product-content {
  padding: 1.3rem 1.3rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category-label {
  color: var(--atlas-gold);
  font-size: 0.72rem;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.product-category-label::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--atlas-gold);
  border-radius: 50%;
}

.product-title {
  color: var(--atlas-white);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1.4;
  text-decoration: none;
  display: block;
  transition: color 0.3s ease;
}

a.product-title:hover {
  color: var(--atlas-gold);
}

.product-description {
  color: var(--atlas-text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* ==================== فوتر کارت ==================== */
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1rem;
  margin-top: auto;
}

.product-price {
  color: var(--atlas-gold);
  font-size: 1.1rem;
  font-weight: 800;
}

.product-price-currency {
  font-size: 0.7rem;
  margin-right: 0.2rem;
  opacity: 0.8;
}

.product-cta-link {
  color: var(--atlas-text-on-dark);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.3s ease;
}

.product-cta-link:hover {
  color: var(--atlas-gold);
}

.product-cta-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.product-cta-link:hover svg {
  transform: translateX(-4px);
}

/* ==================== حالت خالی ==================== */
.pg-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
}

.pg-empty-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto 1.5rem;
  background: rgba(212, 175, 55, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--atlas-gold);
}

.pg-empty-icon svg {
  width: 45px;
  height: 45px;
  opacity: 0.5;
}

.pg-empty-title {
  color: var(--atlas-white);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.pg-empty-text {
  color: var(--atlas-text-muted);
  font-size: 0.9rem;
}

/* ==================== دکمه مشاهده همه ==================== */
.pg-load-more {
  text-align: center;
  margin-top: 3rem;
}

.btn-pg-all {
  background: transparent;
  color: var(--atlas-gold);
  border: 2px solid var(--atlas-gold);
  padding: 0.8rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.btn-pg-all:hover {
  background: var(--atlas-gold);
  color: var(--atlas-deep-blue);
}

.btn-pg-all svg {
  width: 18px;
  height: 18px;
}

/* ==================== Responsive ==================== */

/* تبلت */
@media (max-width: 992px) {
  .pg-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  .pg-title {
    font-size: 1.8rem;
  }
}

/* موبایل بزرگ */
@media (max-width: 768px) {
  .products-grid-section {
    padding: 3rem 0.8rem;
  }

  .pg-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .pg-title {
    font-size: 1.6rem;
  }

  .product-content {
    padding: 1rem;
  }

  .product-title {
    font-size: 1rem;
  }

  .product-price {
    font-size: 0.95rem;
  }
}

/* موبایل کوچک */
@media (max-width: 480px) {
  .pg-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .pg-title {
    font-size: 1.4rem;
  }

  .product-card:hover {
    transform: translateY(-5px);
  }

  .product-image-wrapper {
    aspect-ratio: 16/10;
  }
}