/* catalog.html — page-specific styles (tokens/navbar/footer live in pages' css/base.css) */
#catalog-hero {
  background: var(--navy);
  position: relative;
  overflow: hidden;
  padding: 70px 0 56px;
}
#catalog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 60% at 20% 30%,
    rgba(245, 158, 11, 0.1) 0%,
    transparent 70%
  );
}
#catalog-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.catalog-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
}
#catalog-hero h1 {
  font-size: clamp(28px, 4.5vw, 42px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}
#catalog-hero p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 15.5px;
  max-width: 560px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 16px;
}
.stat-pill iconify-icon {
  font-size: 20px;
  color: var(--accent);
}
.stat-pill b {
  color: #fff;
  font-size: 16px;
}
.stat-pill span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

/* ── Sidebar filter panel (constrained width, sticky) ───────── */
#filters-panel {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 84px;
}
.filters-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 800;
  font-size: 14.5px;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--card-border);
}
.filters-panel-head i {
  color: var(--accent);
  margin-inline-end: 6px;
}
.filters-clear {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}
.filters-clear:hover {
  color: var(--danger);
}
.filter-group {
  margin-bottom: 16px;
}
.filter-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.filter-search {
  position: relative;
}
.filter-search i {
  position: absolute;
  top: 50%;
  right: 13px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
}
.filter-search input {
  width: 100%;
  background: var(--body-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 9px 34px 9px 12px;
  font-family: var(--font-head);
  font-size: 13.5px;
  color: var(--text);
  outline: none;
}
.filter-search input:focus {
  border-color: var(--accent);
}
.form-select {
  width: 100%;
  background-color: var(--body-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-family: var(--font-head);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  padding: 9px 12px;
}
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ── Results toolbar ─────────────────────────────────────────── */
#results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.results-count {
  font-size: 13.5px;
  color: var(--muted);
}
.results-count strong {
  color: var(--text);
  font-family: var(--font-head);
  font-size: 15px;
}

/* ── Grid / list view toggle (used with .view-list on #offer-grid) ── */
#catalog-grid {
  padding: 48px 0 88px;
}
.view-toggle {
  display: inline-flex;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  overflow: hidden;
}
.view-toggle button {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #fff;
  background-image: none;
  box-shadow: none;
  outline: none;
  border: none;
  padding: 8px 14px;
  font-family: inherit;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}
.view-toggle button.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

/* ── Sort controls (results toolbar) ─────────────────────────── */
.sort-controls {
  padding-inline-end: 12px;
  border-inline-end: 1px solid var(--card-border);
}
.sort-dir-btn {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  background-image: none;
  box-shadow: none;
  outline: none;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.18s;
}
.sort-dir-btn:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-soft);
}
.sort-dir-btn:focus,
.sort-dir-btn:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-glow);
  border-color: var(--accent);
}
.sort-dir-btn iconify-icon {
  font-size: 15px;
}
@media (max-width: 575.98px) {
  .sort-controls {
    border-inline-end: none;
    padding-inline-end: 0;
  }
}

@media (max-width: 991.98px) {
  #filters-panel {
    position: static;
    margin-bottom: 24px;
  }
}

.offer-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 22px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
  transition:
    box-shadow 0.2s,
    transform 0.2s,
    border-color 0.2s;
}
.offer-card:hover {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  border-color: var(--accent);
  transform: translateY(-4px);
}
.offer-poster {
  margin: -22px -22px 0;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--body-bg);
}
.offer-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.offer-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.offer-code {
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 3px 9px;
  direction: ltr;
}
.offer-pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  background: rgba(245, 158, 11, 0.14);
  border-radius: 6px;
  padding: 3px 9px;
  white-space: nowrap;
}
.offer-updated-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
  border-radius: 6px;
  padding: 3px 9px;
  white-space: nowrap;
}
.offer-level {
  font-size: 11.5px;
  font-weight: 700;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 6px;
  padding: 3px 9px;
  margin-inline-start: auto;
}
.offer-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
}
.offer-formateur {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
}
.offer-formateur img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}
.offer-formateur i {
  font-size: 20px;
  color: var(--muted);
}
.offer-formateur:hover {
  color: var(--accent-dark);
}
.offer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.offer-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.offer-meta iconify-icon {
  color: var(--accent);
  font-size: 15px;
}
.offer-fee {
  font-weight: 800;
  color: var(--success);
  font-size: 1rem;
  direction: ltr;
  text-align: right;
}

.seats-bar {
  height: 7px;
  background: var(--body-bg);
  border-radius: 4px;
  overflow: hidden;
}
.seats-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  width: 0;
  transition: width 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.seats-label {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}

.btn-detail {
  margin-top: auto;
  text-align: center;
  text-decoration: none;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 11px;
  border-radius: 8px;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-detail:hover {
  background: var(--accent);
  color: var(--navy);
  transform: translateY(-1px);
}
.btn-detail.full {
  background: var(--body-bg);
  color: var(--muted);
  border: 1px solid var(--card-border);
}
.btn-detail.full:hover {
  background: #fef3c7;
  color: var(--accent-dark);
}

/* ── Add-to-cart entry point (TODO 4.2) ──────────────────────
   Cards now carry two actions side-by-side: view details, and queue the
   offering into the client's cart without leaving the catalog. */
.card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card-actions .btn-detail {
  margin-top: 0;
  flex: 1 1 100%;
  order: 1;
  white-space: nowrap;
}
.cart-form {
  flex: 1 1 auto;
  min-width: 0;
  order: 2;
  display: flex;
}
.btn-cart {
  flex: 1;
  min-width: 0;
  text-align: center;
  text-decoration: none;
  background: var(--accent);
  color: var(--navy);
  font-weight: 800;
  font-size: 14px;
  font-family: inherit;
  border: 0;
  cursor: pointer;
  padding: 11px;
  border-radius: 8px;
  transition: all 0.18s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-cart:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Save-for-later / wishlist toggle (TODO 4.4) ──────────────
   A small icon-only button alongside the detail/cart actions — filled
   heart when the offering is already saved, outline otherwise. */
.wishlist-form {
  display: flex;
  flex: 0 0 auto;
  order: 3;
}
.btn-wishlist {
  flex: 0 0 auto;
  width: 42px;
  text-align: center;
  text-decoration: none;
  background: var(--body-bg);
  color: var(--muted);
  border: 1px solid var(--card-border);
  font-size: 17px;
  cursor: pointer;
  padding: 11px;
  border-radius: 8px;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-wishlist:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.3);
}
.btn-wishlist.is-saved {
  background: #fef2f2;
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.3);
}

.no-results {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
  grid-column: 1 / -1;
}
.no-results iconify-icon {
  font-size: 40px;
  color: var(--card-border);
  margin-bottom: 12px;
}

/* ── List view mode ───────────────────────────────────────── */
#offer-grid.view-list .offer-item {
  flex: 0 0 100%;
  max-width: 100%;
}
#offer-grid.view-list .offer-card {
  flex-direction: row;
  align-items: stretch;
  gap: 20px;
  padding: 16px;
}
#offer-grid.view-list .offer-poster {
  margin: 0;
  flex: 0 0 220px;
  border-radius: 10px;
}
#offer-grid.view-list .btn-detail {
  margin-top: 0;
  align-self: center;
  flex: 0 0 auto;
  padding: 11px 22px;
}
#offer-grid.view-list .card-actions {
  align-self: center;
  flex: 0 0 auto;
  flex-direction: row;
}
#offer-grid.view-list .offer-card > div:not(.offer-poster) {
  flex: 1;
}
@media (max-width: 767.98px) {
  #offer-grid.view-list .offer-card {
    flex-direction: column;
  }
  #offer-grid.view-list .offer-poster {
    flex: none;
  }
}
