/* ==========================================================================
   CATALOG GRID & PRODUCT CARDS
   ========================================================================== */
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 25px 0 35px; }
.product-card { background: #fff; border: 1px solid #ebe6f5; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 4px 15px rgba(22, 14, 46, 0.04); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(35, 12, 82, 0.1); }
.product-img-wrap { width: 100%; height: 220px; background: #fbf9fe; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 6px; }
.product-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 8px; }
.badge-discount { position: absolute; top: 8px; left: 8px; background: linear-gradient(135deg, #f20aa5, #ff2cae); color: #fff; font-weight: 900; font-size: 13px; padding: 4px 8px; border-radius: 8px; box-shadow: 0 3px 8px rgba(242, 10, 165, 0.3); z-index: 2; }
.badge-status { position: absolute; bottom: 8px; left: 8px; right: 8px; text-align: center; padding: 5px 6px; border-radius: 6px; font-size: 10px; font-weight: 800; z-index: 2; }
.badge-out-of-stock { background: rgba(30, 30, 30, 0.9); color: #fff; }
.badge-price-changed { background: rgba(255, 140, 0, 0.92); color: #fff; }
.badge-points { display: inline-flex; align-items: center; gap: 5px; background: #eef6ff; color: #0b66c3; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 8px; margin-bottom: 8px; width: fit-content; border: 1px solid #d4e8fd; }
.badge-points b { font-weight: 900; }

/* Info block */
.product-info { padding: 12px 14px 14px; display: flex; flex-direction: column; flex-grow: 1; }
.product-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.product-brand { font-size: 11px; font-weight: 800; color: #5b21b6; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-grow: 1; }
.product-sku { font-size: 11px; font-weight: 600; color: #334155; white-space: nowrap; flex-shrink: 0; background: #f1f5f9; padding: 2px 8px; border-radius: 6px; letter-spacing: 0.2px; cursor: pointer; transition: all 0.2s ease; user-select: none; }
.product-sku:hover { background: #e2e8f0; color: #0f172a; }
.product-sku.copied { background: #15803d; color: #ffffff; }
.product-title { font-size: 13px; line-height: 1.35; color: #172044; margin: 0 0 10px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 35px; }
.product-prices { display: flex; align-items: baseline; gap: 8px; margin-top: auto; margin-bottom: 8px; }
.price-current { font-size: 18px; font-weight: 900; color: #111; }
.price-old { font-size: 12px; color: #64748b; text-decoration: line-through; }
.product-meta { display: flex; justify-content: space-between; font-size: 11px; color: #475569; margin-bottom: 10px; font-weight: 600; }
.product-time { font-size: 11px; font-weight: 600; color: #475569; white-space: nowrap; letter-spacing: 0.1px; }

/* Alerts & Archive */
.card-top-alert { padding: 6px 10px; font-size: 11px; font-weight: 800; text-align: center; color: #fff; letter-spacing: 0.3px; }
.alert-price-changed { background: linear-gradient(135deg, #ff8c00, #ff4500); }
.alert-out-of-stock { background: #2b2b2b; }
.alert-archive { background: #64748b; }
.product-card-archived { opacity: 0.9; background: #fafafc; border-color: #e2e8f0; }
.product-card-archived:hover { opacity: 1; }
.product-card-archived .btn-buy { background: #475569 !important; color: #ffffff; }
.product-card-archived .btn-buy:hover { background: #334155 !important; }

/* Buttons */
.btn-buy { display: flex; align-items: center; justify-content: center; padding: 9px 12px; border-radius: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 12px; transition: opacity 0.2s; }
.btn-buy:hover { opacity: 0.88; }
.btn-buy.magaz-1 { background: linear-gradient(135deg, #ec00a8, #7424e8); }
.btn-buy.magaz-2 { background: #111; }
.btn-buy.magaz-3 { background: #0876e8; }
.btn-load-more { background: #f7f4ff; color: #5b21b6; border: 2px solid #e7ddff; border-radius: 14px; padding: 12px 28px; font-size: 14px; font-weight: 800; cursor: pointer; transition: all 0.2s; }
.btn-load-more:hover { background: #5b21b6; color: #fff; border-color: #5b21b6; }

/* Search & Filters */
.catalog-search-wrap { margin: 0 0 24px; }
.catalog-search-input { width: 100%; padding: 14px 20px; font-size: 15px; border: 2px solid #ebe6f5; border-radius: 14px; background: #ffffff; color: #172044; outline: none; transition: all 0.2s ease; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02); }
.catalog-search-input:focus { border-color: #5b21b6; box-shadow: 0 4px 16px rgba(91, 33, 182, 0.12); }
.catalog-filters { display: flex; gap: 8px; margin-bottom: 22px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.catalog-filters::-webkit-scrollbar { display: none; }
.filter-chip { display: inline-flex; align-items: center; padding: 8px 18px; border-radius: 20px; border: 1px solid #ebe6f5; background: #ffffff; color: #172044; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: all 0.2s ease; user-select: none; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02); }
.filter-chip:hover { border-color: #5b21b6; color: #5b21b6; background: #fbf9fe; }
.filter-chip.active { background: #5b21b6; border-color: #5b21b6; color: #ffffff; box-shadow: 0 4px 14px rgba(91, 33, 182, 0.28); }

/* Pagination */
.catalog-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 35px 0 25px; flex-wrap: wrap; }
.page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 14px; border: 1px solid #e2dbf0; background: #ffffff; color: #172044; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 14px; transition: all 0.2s ease; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03); }
.page-link:hover { border-color: #5b21b6; color: #5b21b6; background: #fbf9fe; transform: translateY(-1px); }
.page-link.active { background: linear-gradient(135deg, #5b21b6, #ec00a8); border-color: transparent; color: #ffffff; box-shadow: 0 4px 12px rgba(91, 33, 182, 0.25); }
.page-link.prev, .page-link.next { font-weight: 800; padding: 0 16px; }
.page-dots { color: #64748b; font-weight: 700; padding: 0 6px; user-select: none; }

/* Media */
@media (max-width: 1080px) {
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-img-wrap { height: 200px; }
}
@media (max-width: 760px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-img-wrap { height: 160px; padding: 4px; }
  .price-current { font-size: 16px; }
  .product-info { padding: 10px; }
  .btn-buy { font-size: 11px; padding: 8px; }
}