/* =====================================================
   Products Page – redesigned
===================================================== */

/* ---- Filter bar ---- */
.prod-filter-wrap {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
  background: #fff;
  border-bottom: 2px solid #e2e8f0;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.prod-filter-inner {
  max-width: 1170px; margin: 0 auto; padding: 0 24px;
}
.prod-filter {
  display: flex; align-items: center; gap: 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 calc(100% / 24);
}
.prod-filter::-webkit-scrollbar { display: none; }
.prod-filter-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 14px 22px; white-space: nowrap; flex-shrink: 0;
  font-size: 13.5px; font-weight: 600; color: #64748b;
  text-decoration: none; border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s; background: none; border-top: none; border-left: none; border-right: none; cursor: pointer;
}
.prod-filter-btn i { font-size: 14px; }
.prod-filter-btn:hover { color: #1a3a6b; text-decoration: none; }
.prod-filter-btn.active {
  color: #1a3a6b; border-bottom-color: #1a3a6b;
}
.prod-filter-count {
  display: none;
}

/* ---- Page header ---- */
.prod-page-head {
  padding: 36px 0 24px;
}
.prod-page-head h1 {
  font-size: 26px; font-weight: 800; color: #0f172a; margin: 0 0 6px;
}
.prod-page-head p {
  font-size: 14px; color: #64748b; margin: 0;
}

/* ---- Product grid ---- */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 60px;
}
@media (max-width: 991px) { .prod-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (max-width: 767px) { .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 400px)  { .prod-grid { grid-template-columns: 1fr; } }

/* ---- Product card ---- */
.prod-card {
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid #e8edf4;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: transform .18s, box-shadow .18s;
  position: relative;
  display: flex; flex-direction: column;
}
.prod-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
  border-color: #bfdbfe;
}

/* ---- Ribbon badges ---- */
.prod-badge {
  position: absolute; top: 12px; right: 12px;
  z-index: 2; display: flex; flex-direction: column; gap: 5px; align-items: flex-end;
}
.prod-badge span {
  display: inline-block; padding: 3px 9px;
  border-radius: 20px; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; line-height: 1.4;
}
.badge-new  { background: #e53e3e; color: #fff; }
.badge-sale { background: #f97316; color: #fff; }
.badge-pop  { background: #7c3aed; color: #fff; }
.badge-esim { background: #0f172a; color: #fff; }

/* ---- Image area ---- */
.prod-img-wrap {
  display: block; overflow: hidden;
  background: #f8fafc; aspect-ratio: 1/1;
}
.prod-img-wrap img {
  width: 100%; height: 100%;
  object-fit: contain; padding: 12px;
  transition: transform .3s;
}
.prod-card:hover .prod-img-wrap img { transform: scale(1.05); }

/* ---- Card body ---- */
.prod-card-body {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1;
}
.prod-card-name {
  font-size: 14px; font-weight: 700; color: #1e293b;
  line-height: 1.4; min-height: 2.8em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.prod-card-price {
  font-size: 20px; font-weight: 800; color: #e53e3e;
  line-height: 1;
}
.prod-card-price small { font-size: 13px; font-weight: 400; color: #94a3b8; margin-left: 2px; }
.prod-card-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: #1a3a6b; color: #fff;
  padding: 10px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 700;
  text-decoration: none; transition: background .16s;
  margin-top: auto;
}
.prod-card-btn:hover { background: #0f2347; color: #fff; text-decoration: none; }

/* ---- Empty state ---- */
.prod-empty {
  text-align: center; padding: 80px 20px; color: #94a3b8;
  grid-column: 1 / -1;
}
.prod-empty i { font-size: 48px; margin-bottom: 16px; display: block; }
.prod-empty p { font-size: 15px; }
