/* ════════════════════════════════════════════════════════════════
   FILTER.CSS — System filtrowania produktów (chipy/tagi)
   ogrodowy.expert | 2026
   ════════════════════════════════════════════════════════════════ */

/* ═══ 1. WRAPPER FILTRÓW ════════════════════════════════════════ */

.filter-section {
  padding: 48px 0 32px;
  background: var(--bg-alt, #F4F0E8);
}

.filter-section--dark {
  background: #1a1a1a;
}

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ═══ 2. JEDNA GRUPA FILTRÓW ════════════════════════════════════ */

.filter-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-group__label {
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted, #888);
  padding-top: 8px;
  min-width: 120px;
  flex-shrink: 0;
}

.filter-group--dark .filter-group__label {
  color: rgba(255,255,255,0.4);
}

.filter-group__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ═══ 3. CHIP ════════════════════════════════════════════════════ */

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(0,0,0,0.18);
  background: transparent;
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 500;
  color: var(--text, #1a1a1a);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
  user-select: none;
}

.filter-chip:hover {
  border-color: var(--gold, #c8a96e);
  color: var(--gold, #c8a96e);
}

.filter-chip.is-active {
  background: var(--gold, #c8a96e);
  border-color: var(--gold, #c8a96e);
  color: #fff;
}

/* Wariant ciemny (na dark bg) */
.filter-section--dark .filter-chip {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
}

.filter-section--dark .filter-chip:hover {
  border-color: var(--gold, #c8a96e);
  color: var(--gold, #c8a96e);
}

.filter-section--dark .filter-chip.is-active {
  background: var(--gold, #c8a96e);
  border-color: var(--gold, #c8a96e);
  color: #fff;
}

/* Chip "Resetuj" */
.filter-chip--reset {
  border-color: transparent;
  color: var(--text-muted, #888);
  padding-left: 4px;
  font-size: 12px;
}

.filter-chip--reset:hover {
  border-color: transparent;
  color: var(--text, #1a1a1a);
  background: transparent;
}

.filter-chip--reset svg {
  width: 14px;
  height: 14px;
}

/* ═══ 4. PASEK WYNIKÓW ══════════════════════════════════════════ */

.filter-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin-top: 8px;
}

.filter-results-bar--dark {
  border-color: rgba(255,255,255,0.08);
}

.filter-count {
  font-size: 13px;
  color: var(--text-muted, #888);
}

.filter-count strong {
  color: var(--text, #1a1a1a);
  font-weight: 600;
}

.filter-section--dark .filter-count strong {
  color: #fff;
}

/* ═══ 5. SIATKA PRODUKTÓW ═══════════════════════════════════════ */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
  padding: 40px 0 80px;
}

/* ═══ 6. KARTA PRODUKTU ═════════════════════════════════════════ */

.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.product-card__img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-alt, #F4F0E8);
}

.product-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card__img-wrap img {
  transform: scale(1.04);
}

.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gold, #c8a96e);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.product-card__body {
  padding: 20px 20px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card__name {
  font-family: var(--font-serif, 'Cormorant Garamond', serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--text, #1a1a1a);
  line-height: 1.25;
  margin: 0;
}

.product-card__desc {
  font-size: 13px;
  color: var(--text-muted, #888);
  line-height: 1.55;
  margin: 0;
}

.product-card__features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.product-card__feature-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #888);
  background: var(--bg-alt, #F4F0E8);
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.product-card__footer {
  padding: 12px 20px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(0,0,0,0.06);
  margin-top: auto;
}

.product-card__price {
  display: flex;
  flex-direction: column;
}

.product-card__price-main {
  font-size: 22px;
  font-weight: 700;
  color: var(--text, #1a1a1a);
  line-height: 1;
}

.product-card__price-year {
  font-size: 11px;
  color: var(--text-muted, #888);
  margin-top: 2px;
}

.product-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--gold, #c8a96e);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}

.product-card__cta:hover {
  background: var(--gold-dark, #b8944f);
  transform: translateY(-1px);
}

.product-card__cta svg {
  width: 14px;
  height: 14px;
}

/* ═══ 7. EMPTY STATE ════════════════════════════════════════════ */

.filter-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted, #888);
  grid-column: 1 / -1;
}

.filter-empty__icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.filter-empty p {
  font-size: 15px;
  margin: 0 0 16px;
}

.filter-empty .filter-chip--reset {
  border: 1.5px solid rgba(0,0,0,0.18);
  padding: 8px 20px;
  color: var(--text, #1a1a1a);
  font-size: 14px;
}

/* ═══ 8. ANIMACJA KART ══════════════════════════════════════════ */

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.product-card {
  animation: cardFadeIn 0.25s ease both;
}

/* ═══ 9. RESPONSIVE ═════════════════════════════════════════════ */

@media (max-width: 768px) {
  .filter-group {
    flex-direction: column;
    gap: 8px;
  }

  .filter-group__label {
    min-width: auto;
    padding-top: 0;
  }

  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .product-card__name {
    font-size: 17px;
  }

  .product-card__price-main {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}
