/*
 * Catalog pages: product sections and the ribbon catalog.
 * Kept in public/ so the page works without re-running assets:precompile.
 */

.section-card {
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.section-card .card-body {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.section-card h3 {
  font-size: 1.12rem;
  margin: 0;
}

.section-card p {
  color: var(--muted);
  font-size: .93rem;
  margin: 0;
}

.ribbon-showcase-simple {
  position: relative;
  /* Matches the photos (1491 × 1222) so they fill the frame exactly. */
  aspect-ratio: 1491 / 1222;
  overflow: hidden;
}

.ribbon-showcase {
  position: relative;
  /* Matches the photos (1491 × 1222) so they fill the frame exactly. */
  aspect-ratio: 1491 / 1222;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--brand-050);
  box-shadow: var(--shadow-card);
}

.ribbon-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* The whole photo stays visible and touches the frame; nothing is cropped. */
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.ribbon-slide.is-active {
  opacity: 1;
}

.ribbon-facts {
  display: grid;
  gap: .5rem;
  padding: 0;
  list-style: none;
}

.ribbon-facts li {
  position: relative;
  padding-left: 1.6rem;
  color: #33415c;
  font-size: .95rem;
}

.ribbon-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45rem;
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: var(--accent-500);
  box-shadow: 0 0 0 3px var(--accent-100);
}

.ribbon-filter-card .filter-group + .filter-group {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.filter-group-title {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  margin: 0 0 .55rem;
  text-transform: uppercase;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.filter-chips-scroll {
  max-height: 11rem;
  overflow-y: auto;
  padding-right: .35rem;
}

.filter-chip {
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.filter-chip-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.filter-chip span {
  display: inline-flex;
  align-items: center;
  padding: .28rem .68rem;
  border: 1px solid var(--line);
  border-radius: 100rem;
  background: #fff;
  color: #33415c;
  font-size: .82rem;
  line-height: 1.4;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.filter-chip:hover span {
  border-color: rgba(53, 99, 171, .55);
  color: var(--brand-700);
}

.filter-chip-input:checked + span {
  border-color: var(--brand-700);
  background: var(--brand-700);
  color: #fff;
  box-shadow: 0 2px 8px rgba(29, 58, 107, .25);
}

.filter-chip-input:focus-visible + span {
  outline: 2px solid var(--accent-500);
  outline-offset: 2px;
}

.ribbon-count {
  color: var(--muted);
  font-size: .92rem;
}

.ribbon-count b {
  color: var(--brand-800);
}

.ribbon-results {
  overflow: hidden;
}

.ribbon-table {
  font-size: .92rem;
}

.ribbon-table thead th {
  white-space: nowrap;
}

/* Sortable headers */
.ribbon-table thead th.sortable {
  padding: 0;
}

.ribbon-table .sort-btn {
  align-items: center;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-weight: inherit;
  gap: .3rem;
  padding: .5rem;
  text-align: left;
  width: 100%;
}

.ribbon-table thead th.text-end .sort-btn {
  justify-content: flex-end;
  text-align: right;
}

.ribbon-table .sort-btn:hover {
  color: #cfdcf5;
}

.ribbon-table .sort-btn:focus-visible {
  outline: 2px solid var(--accent-500);
  outline-offset: -2px;
}

.ribbon-table .sort-btn::after {
  content: "\2195";
  font-size: .85em;
  opacity: .45;
}

.ribbon-table thead th[aria-sort="ascending"] .sort-btn::after {
  content: "\2191";
  opacity: 1;
}

.ribbon-table thead th[aria-sort="descending"] .sort-btn::after {
  content: "\2193";
  opacity: 1;
}

.ribbon-name {
  min-width: 17rem;
}

.ribbon-articul {
  color: var(--brand-800);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
}

.copy-btn {
  align-items: center;
  display: inline-flex;
  gap: .35rem;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .copy-btn .copy-label {
    display: none;
  }
}
