/* bnshowcase – home page product showcases.
   The cards themselves use the birdnet theme's .bn-home-block / .bn-pgrid / .bn-pcard styles
   (birdnet-pages.css). This file only adds what a showcase can change: columns, background,
   intro text, two-line names and the optional "Add to cart" form. */

/* Columns on bigger screens (phones: 2, from the theme). Default 4 = the theme's own grid. */
@media (min-width: 768px) {
  .bn-showcase--cols-2 .bn-pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .bn-showcase--cols-3 .bn-pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bn-showcase--cols-5 .bn-pgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Background panels */
.bn-showcase.bn-showcase--paper,
.bn-showcase.bn-showcase--green {
  padding: 1.25rem 1.25rem 1.5rem;
  border-radius: var(--bn-radius, 10px);
}
.bn-showcase.bn-showcase--paper { background: var(--bn-paper, #F5F3EC); }
.bn-showcase.bn-showcase--green { background: var(--bn-green-tint, #E6F0E8); }
@media (max-width: 767px) {
  .bn-showcase.bn-showcase--paper,
  .bn-showcase.bn-showcase--green { padding: 1rem 0.75rem 1.25rem; }
}

/* Intro text under the title */
.bn-showcase__intro {
  margin: -0.4rem 0 1rem;
  max-width: 48em;
  color: var(--bn-ink, #1B1B18);
  font-size: 1rem;
  line-height: 1.5;
}

/* Product name: at most two lines (the full name stays in the page for screen readers and search engines) */
.bn-showcase .bn-showcase__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* Optional "Add to cart" form under the "View" button */
.bn-showcase .bn-pcard__add {
  display: flex;
  flex-direction: column;
  margin: 0;
}
.bn-showcase .bn-pcard__add .bn-pcard__btn { margin-top: 0.5rem; }

/* ------------------------------------------------------------------
   Tab groups (views/js/front.js adds .is-tabs; without JS the blocks stay stacked)
   ------------------------------------------------------------------ */
.bn-sc-group { margin: 2rem 0 0; }
.bn-sc-group.is-tabs .bn-sc-panel { margin-top: 0; }
.bn-sc-group.is-tabs .bn-sc-panel[hidden] { display: none; }

.bn-sc-tabbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 1rem;
  margin: 0 0 1.25rem;
  border-bottom: 3px solid var(--bn-green, #1F5F3A);
}
.bn-sc-tabbar[hidden] { display: none; }
.bn-sc-tablist {
  display: flex;
  flex-wrap: wrap;          /* every tab stays visible: they wrap onto a second line */
  gap: 0.4rem;
  flex: 1 1 auto;
  min-width: 0;
}
.bn-sc-tab {
  min-height: 52px;
  margin: 0;
  padding: 0.45em 1.1em;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--bn-green, #1F5F3A);
  background: #fff;
  border: 2px solid var(--bn-green, #1F5F3A);
  border-bottom: 0;
  border-radius: var(--bn-radius, 10px) var(--bn-radius, 10px) 0 0;
  cursor: pointer;
}
.bn-sc-tab:hover { background: var(--bn-green-tint, #E6F0E8); }
.bn-sc-tab[aria-selected="true"],
.bn-sc-tab[aria-selected="true"]:hover {
  color: #fff;
  background: var(--bn-green, #1F5F3A);
}
.bn-sc-tab:focus-visible,
.bn-sc-pause:focus-visible {
  outline: 3px solid var(--bn-help, #8F360A);
  outline-offset: 2px;
}

.bn-sc-pause {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  min-height: 48px;
  margin: 0 0 0.4rem auto;
  padding: 0.3em 0.9em;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--bn-ink, #1B1B18);
  background: #fff;
  border: 2px solid var(--bn-edge, #6F6C63);
  border-radius: var(--bn-radius, 10px);
  cursor: pointer;
}
.bn-sc-pause[hidden] { display: none; }
.bn-sc-pause:hover { background: var(--bn-paper, #F5F3EC); }
/* pause icon: two bars; play icon: a triangle */
.bn-sc-pause__icon {
  display: inline-block;
  width: 0.8em;
  height: 0.9em;
  border-left: 0.28em solid currentColor;
  border-right: 0.28em solid currentColor;
  box-sizing: border-box;
}
.bn-sc-pause.is-paused .bn-sc-pause__icon {
  width: 0;
  height: 0;
  border-top: 0.5em solid transparent;
  border-bottom: 0.5em solid transparent;
  border-left: 0.8em solid currentColor;
  border-right: 0;
}

/* Phones: tabs become full-width-ish buttons that wrap, no underline bar */
@media (max-width: 767px) {
  .bn-sc-tabbar { border-bottom: 0; gap: 0.5rem; }
  .bn-sc-tab {
    flex: 1 1 auto;
    font-size: 1.05rem;
    border-bottom: 2px solid var(--bn-green, #1F5F3A);
    border-radius: var(--bn-radius, 10px);
  }
  .bn-sc-pause { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .bn-sc-tab, .bn-sc-pause { transition: none; }
}
