/* =========================================================
   CATALOG PAGE
   ========================================================= */
.catalog-section {
  padding: 120px 0 80px;
  background: var(--bone);
  min-height: 80vh;
}
.catalog-header {
  text-align: center;
  margin-bottom: 48px;
}
.catalog-header h1 { font-size: clamp(28px, 3vw, 42px); margin-top: 12px; }
.catalog-search-meta {
  margin-top: 14px;
  font-size: 14.5px;
  color: var(--ink-500);
}
.catalog-search-meta a {
  color: var(--royal-500);
  text-decoration: none;
  font-weight: 500;
}
.catalog-search-meta a:hover { text-decoration: underline; }

/* =========================================================
   CATALOG FILTERS — Premium card with gradient accent
   ========================================================= */
.catalog-filters {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr) auto auto;
  gap: 18px;
  margin-bottom: 48px;
  padding: 24px 28px;
  background: white;
  border-radius: var(--radius-lg, 20px);
  border: 1px solid var(--line);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 32px -16px rgba(15, 23, 42, 0.10);
  align-items: end;
  overflow: hidden;
}
.catalog-filters::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--royal-500), var(--royal-400), var(--whats-500));
  border-radius: var(--radius-lg, 20px) var(--radius-lg, 20px) 0 0;
}

.catalog-filters__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.catalog-filters__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-500);
  display: flex;
  align-items: center;
  gap: 6px;
}
.catalog-filters__label::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--royal-500);
  display: inline-block;
}

.catalog-filters__select {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--navy-900);
  background: var(--bone) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231A2740' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 14px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s var(--ease-out), background-color 0.2s, box-shadow 0.2s, transform 0.15s;
  box-sizing: border-box;
}
.catalog-filters__select:hover {
  border-color: var(--royal-400);
  background-color: white;
}
.catalog-filters__select:focus {
  border-color: var(--royal-500);
  background-color: white;
  box-shadow: 0 0 0 4px rgba(30, 91, 191, 0.10);
}

/* Stock checkbox styled as toggle pill */
.catalog-filters__group--checkbox {
  justify-content: flex-end;
}
.catalog-filters__check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-700);
  cursor: pointer;
  font-weight: 500;
  height: 46px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bone);
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}
.catalog-filters__check:hover {
  border-color: var(--royal-400);
  background: white;
  color: var(--navy-900);
}
.catalog-filters__check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--royal-500);
  cursor: pointer;
}

/* Action buttons */
.catalog-filters__actions {
  display: flex;
  align-items: end;
  gap: 14px;
}
.catalog-filters__submit {
  height: 46px;
  padding: 0 28px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 12px;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--royal-500), var(--navy-700));
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(30, 91, 191, 0.28);
  transition: transform 0.15s var(--ease-out), box-shadow 0.2s;
  align-self: end;
}
.catalog-filters__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(30, 91, 191, 0.4);
}
.catalog-filters__submit:active { transform: translateY(0); }

.catalog-filters__clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 6px;
  font-size: 13px;
  color: var(--ink-500);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  align-self: end;
  transition: color 0.15s;
}
.catalog-filters__clear::before {
  content: '×';
  font-size: 18px;
  line-height: 1;
}
.catalog-filters__clear:hover {
  color: #dc2626;
}

@media (max-width: 900px) {
  .catalog-filters {
    grid-template-columns: 1fr 1fr;
    padding: 22px;
    gap: 14px;
  }
  .catalog-filters__group--checkbox,
  .catalog-filters__actions {
    grid-column: 1 / -1;
  }
  .catalog-filters__actions {
    justify-content: space-between;
  }
}
@media (max-width: 520px) {
  .catalog-filters { grid-template-columns: 1fr; }
  .catalog-filters__submit { flex: 1; }
}

/* Legacy filter chips (kept for any old templates still using them) */
.filter-chip {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  border: 1.5px solid var(--line);
  color: var(--ink-700);
  background: white;
  transition: all 0.2s;
  text-decoration: none;
  cursor: pointer;
}
.filter-chip:hover,
.filter-chip.active,
.filter-chip.is-active {
  background: var(--navy-900);
  color: white;
  border-color: var(--navy-900);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

/* Product Card */
.product-card {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Image area */
.product-card__image-link {
  display: block;
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--mist);
}
.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
  display: block;
}
.product-card:hover .product-card__image { transform: scale(1.04); }

.product-card__image--placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mist);
  color: var(--ink-400);
}

/* Badge */
.product-card__badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  z-index: 1;
}
.product-card__badge--novo { background: var(--royal-400); color: white; }
.product-card__badge--oferta { background: var(--amber-500); color: var(--navy-900); }
.product-card__badge--mais-vendido { background: var(--whats-500); color: white; }

/* Body */
.product-card__body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-card__category {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--royal-500);
}
.product-card__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.product-card__title a {
  color: inherit;
  text-decoration: none;
}
.product-card__title a:hover {
  text-decoration: underline;
}
.product-card__desc {
  font-size: 13.5px;
  color: var(--ink-500);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Stock pill */
.product-card__stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  width: fit-content;
}
.product-card__stock::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
}
.product-card__stock--in_stock { background: #e8faf0; color: #1a7a47; }
.product-card__stock--in_stock::before { background: var(--whats-500); }
.product-card__stock--backorder { background: #fff7e6; color: #92540a; }
.product-card__stock--backorder::before { background: var(--amber-500); }
.product-card__stock--out_of_stock { background: #fef2f2; color: #991b1b; }
.product-card__stock--out_of_stock::before { background: #ef4444; }

/* Actions */
.product-card__actions {
  padding: 12px 18px 18px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.product-card__actions .btn .arrow { display: none; }

/* Circle cart button */
.product-card__cart-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy-900);
  color: white;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s var(--ease-out), transform 0.15s var(--ease-out), box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(8, 16, 38, 0.18);
  padding: 0;
}
.product-card__cart-btn:hover {
  background: var(--royal-500);
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(30, 91, 191, 0.38);
}
.product-card__cart-btn:active { transform: scale(0.95); }
.product-card__cart-btn svg {
  pointer-events: none;
  display: block;
}

/* WhatsApp button takes remaining space */
.product-card__whats-btn {
  flex: 1;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  border-radius: 999px;
  text-decoration: none;
  background: var(--whats-500);
  color: white;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.28);
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.product-card__whats-btn:hover {
  background: var(--whats-600);
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.4);
  transform: translateY(-1px);
}

/* Pagination */
/* Catalog pagination — premium pill style */
.catalog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 32px 0 16px;
}
.catalog-pagination .page-numbers {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--line);
  color: var(--ink-700);
  background: white;
  text-decoration: none;
  transition: all 0.18s var(--ease-out);
  white-space: nowrap;
  line-height: 1;
  box-sizing: border-box;
}
.catalog-pagination a.page-numbers:hover {
  background: var(--navy-900);
  color: white;
  border-color: var(--navy-900);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
.catalog-pagination .page-numbers.current {
  background: linear-gradient(135deg, var(--royal-500), var(--navy-700));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(30, 91, 191, 0.32);
}
/* Prev / Next buttons — wider, with arrow icon */
.catalog-pagination .page-numbers.prev,
.catalog-pagination .page-numbers.next {
  padding: 0 20px;
  gap: 6px;
  font-weight: 600;
}
.catalog-pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
  color: var(--ink-400);
  pointer-events: none;
  padding: 0 4px;
  min-width: 24px;
}

.catalog-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--ink-500);
}
.catalog-empty svg { width: 80px; height: 80px; margin: 0 auto 24px; opacity: 0.3; }

@media (max-width: 768px) {
  .catalog-section { padding: 100px 0 60px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .product-card__body { padding: 14px; }
  .product-card__actions { padding: 10px 14px 14px; gap: 8px; }
  .product-card__cart-btn { width: 40px; height: 40px; }
  .product-card__whats-btn { font-size: 12px; padding: 9px 10px; }
}
@media (max-width: 400px) {
  .products-grid { grid-template-columns: 1fr; }
}
