/* =========================================================
   PrintBull — Products page (mahsulot tanlash)
   home.css ustiga qo'shimcha — faqat shu sahifa uchun
   ========================================================= */

/* ─── Hero (sahifa boshlang'ich qismi) ─────────────────── */
.products-hero {
  background: var(--gray-3);
  padding: 64px 0 48px;
  text-align: center;
}
.products-hero__title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.products-hero__sub {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--gray);
  max-width: 540px;
  margin: 0 auto;
}

/* ─── Sahifa asosiy bo'limi ────────────────────────────── */
.products-section {
  padding: 48px 0 96px;
}

/* ─── Filter chiplar ───────────────────────────────────── */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
  justify-content: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--white);
  border: 1.5px solid var(--gray-2);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  transition: all .15s ease;
}
.chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.chip__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: .9;
}
/* Admin yuklagan ikonka (rasm) */
.chip__img { object-fit: contain; opacity: 1; }
/* Tanlangan (qora) chipda rangli rasm ko'rinmay qolmasin: oq siluetga
   aylanadi — chizilgan ikonkalar ham aynan shunday oqaradi (currentColor). */
.chip.is-active .chip__img { filter: brightness(0) invert(1); }
/* Shaffof foni YO'Q ikonka (JPG, oq fonli rasm): siluet qilinsa yaxlit oq
   kvadrat chiqardi — o'z rangida, kichik oq plitka ustida qoladi. */
.chip__img--solid { border-radius: 4px; }
.chip.is-active .chip__img--solid { filter: none; background: #fff; }
.chip__name {
  white-space: nowrap;
}
.chip__count {
  display: inline-flex;
  align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  background: var(--gray-3);
  color: var(--ink);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.chip.is-active .chip__count {
  background: rgba(255,255,255,.2);
  color: var(--white);
}

/* Mobile'da icon kichikroq, tartib qisqa */
@media (max-width: 480px) {
  .chip { padding: 8px 14px; font-size: 13px; gap: 6px; }
  .chip__icon { width: 14px; height: 14px; }
  .chip__count { min-width: 18px; height: 18px; font-size: 10px; padding: 0 5px; }
}

/* ─── Products grid ────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 1100px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .products-section { padding: 32px 0 64px; }
  .products-hero { padding: 48px 0 32px; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* ─── Mahsulot kartlari ────────────────────────────────── */
.prod-tile {
  display: block;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-2);
  transition: transform .25s cubic-bezier(.2,.8,.2,1),
              box-shadow .25s ease,
              border-color .2s ease;
}
.prod-tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.prod-tile__image {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--gray-3);
  overflow: hidden;
}
.prod-tile__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.prod-tile:hover .prod-tile__image img {
  transform: scale(1.04);
}

/* "Customize →" overlay (hover'da chiqadi) */
.prod-tile__cta {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  padding: 10px 18px;
  background: var(--pb-red);
  color: var(--white);
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.prod-tile:hover .prod-tile__cta {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Body — text qism */
.prod-tile__body {
  padding: 16px 20px 20px;
}
.prod-tile__cat {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.prod-tile__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prod-tile__price {
  font-size: 18px;
  font-weight: 700;
  color: var(--pb-red);
}

/* ─── Empty state ──────────────────────────────────────── */
.products-empty {
  text-align: center;
  padding: 80px 24px;
  background: var(--gray-3);
  border-radius: var(--radius-lg);
  max-width: 520px;
  margin: 0 auto;
}
.products-empty svg {
  width: 64px; height: 64px;
  color: var(--gray-2);
  margin-bottom: 20px;
}
.products-empty h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.products-empty p {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 24px;
}
.products-empty .btn { width: auto; display: inline-flex; }
