/* Catalog page (design/NUK Catalog.dc.html) and the catalog section of the home page
   (design/NUK Oilseal Website.dc.html #catalog), pushed by site/partials/catalog-grid.blade.php.

   The first part — page hero, buttons, sticky filter bar with pills — is shared by the
   "products" pages: category.blade.php and gallery.blade.php load this file before their own.
   Section headings use the shared .sec-head / .sec-head__eyebrow from site.css. */

/* ---------------- page hero (catalog, gallery, category) ---------------- */

.inner-hero {
  position: relative; overflow: hidden;
  background-color: var(--navy);
  background-image: linear-gradient(135deg, #0b1746 0%, #16296b 55%, #0f1f57 100%);
}
.inner-hero__wrap { max-width: var(--wrap); margin: 0 auto; padding: clamp(26px, 4vw, 44px) 20px clamp(30px, 5vw, 52px); }

.crumbs__list {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0; padding: 0; list-style: none; font-size: 18px; color: var(--border-5);
}
.crumbs__item { display: flex; align-items: center; gap: 8px; }
.crumbs__item + .crumbs__item::before { content: "/"; opacity: 0.5; }
.crumbs__link { display: inline-block; margin: -6px 0; padding: 6px 0; color: var(--border-5); } /* 44px tap height, same layout */
.crumbs__link:hover { color: var(--yellow); }
.crumbs__current { color: var(--yellow); font-weight: 600; }

.inner-hero__badge {
  display: inline-block; margin-top: 18px; padding: 5px 13px; border-radius: 100px;
  background: var(--red); color: #fff; font-size: 15.6px; font-weight: 700; letter-spacing: 0.16em;
}
.inner-hero__badge--yellow { background: var(--yellow); color: var(--navy-950); }
.inner-hero__title {
  margin: 12px 0 0; font-size: clamp(33.6px, 4.6vw, 52.8px); font-weight: 700; line-height: 1.3;
  color: #fff; text-wrap: pretty; text-shadow: 0 2px 14px rgba(3, 8, 24, 0.55);
}
.inner-hero__lead {
  margin: 16px 0 0; max-width: 820px; font-size: 22.2px; line-height: 1.85;
  color: #e4ebfb; text-shadow: 0 2px 14px rgba(3, 8, 24, 0.5);
}
.inner-hero__actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------- buttons ---------------- */

.nbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 22px; border: 0; border-radius: 4px;
  font-family: var(--font); font-size: 21px; font-weight: 700; line-height: 1.75; text-align: center;
  white-space: nowrap; overflow-wrap: normal; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.nbtn--sm { padding: 13px 20px; font-size: 19.8px; }
.nbtn--wrap { white-space: normal; overflow-wrap: anywhere; }
.nbtn--call { background: linear-gradient(180deg, #ffce23, #ffc400); color: var(--navy-950); box-shadow: 0 3px 0 var(--yellow-press); }
.nbtn--call:hover { background: var(--yellow-3); color: var(--navy-950); }
.nbtn--flat { box-shadow: none; }
.nbtn--line { background: var(--line); color: var(--on-line); }
.nbtn--line:hover { background: var(--line-hover); color: var(--on-line); }
.nbtn--line.nbtn--raised { box-shadow: 0 3px 0 #05a446; }
.nbtn--ghost { border: 1px solid rgba(255, 255, 255, 0.34); background: transparent; color: #fff; }
.nbtn--ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.nbtn--outline { border: 1px solid var(--navy); background: #fff; color: var(--navy); }
.nbtn--outline:hover { background: var(--navy); color: #fff; }

.nbtn:focus-visible, .pill:focus-visible, .catalog-home__more:focus-visible, .catalog-home__less:focus-visible,
.crumbs__link:focus-visible, .pmodal__ctl:focus-visible {
  outline: 3px solid var(--navy); outline-offset: 2px;
}
.inner-hero :focus-visible, .pmodal__bar :focus-visible { outline-color: var(--yellow); }

/* ---------------- sticky filter bar (catalog, gallery) ---------------- */

.filterbar {
  position: relative; z-index: 40;
  background: #fff; border-top: 3px solid var(--yellow); box-shadow: 0 6px 18px rgba(15, 31, 87, 0.07);
}
/* sticks under the site header on desktop; on phones it would cover half the screen */
@media (min-width: 901px) {
  .filterbar { position: sticky; top: var(--sticky-top, 0px); }
}
.filterbar__wrap { max-width: var(--wrap); margin: 0 auto; padding: 16px 20px; }
.filterbar__row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.filterbar__count { margin: 0; font-size: 19.2px; color: var(--muted); white-space: nowrap; }
.filterbar__num { color: var(--red); font-size: 21.6px; }

.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 10px;
  padding: 11px 15px; border: 1px solid var(--border-4); border-radius: 4px; background: #f8f9fc; cursor: text;
}
.search:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15, 31, 87, 0.14); }
.search__icon { color: var(--navy); }
.search__input { flex: 1; border: 0; background: transparent; font-size: 20.4px; color: var(--ink); outline: none; }
.search__input::placeholder { color: #8a93a8; opacity: 1; }

.pills { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 9px 15px; border: 1px solid var(--border-4); border-radius: 100px; background: #fff;
  color: var(--muted); font-size: 19.2px; font-weight: 600; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pill:hover { border-color: var(--yellow); background: #fffaea; color: var(--navy); }
.pill[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; font-weight: 700; }

/* ---------------- catalog page results ---------------- */

.catalog__results { background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%); }
.catalog__wrap { max-width: var(--wrap); margin: 0 auto; padding: clamp(28px, 4.5vw, 46px) 20px clamp(36px, 6vw, 64px); }

.catalog__empty {
  padding: clamp(30px, 6vw, 60px) 24px; text-align: center;
  border: 1px dashed var(--border-4); border-radius: 8px; background: #fff;
}
.catalog__empty-title { margin: 0; font-size: 25.2px; font-weight: 700; color: var(--navy); }
.catalog__empty-lead { margin: 10px 0 18px; font-size: 20.4px; color: var(--muted); }
.catalog__empty-title + .catalog__empty-actions { margin-top: 18px; }
.catalog__empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.catalog__empty-actions .nbtn { padding-inline: 22px; }

/* ---------------- product cards ---------------- */

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 20px; }
.pgrid--home { grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }

.pcard {
  position: relative; display: flex; flex-direction: column; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; border-radius: 10px;
  background-image: linear-gradient(#fff, #fff), linear-gradient(135deg, #ffc400 0%, #c8102e 55%, #0f1f57 100%);
  background-origin: border-box; background-clip: padding-box, border-box;
  /* `translate`, not `transform`: the home page's reveal script writes inline transforms */
  transition: translate 0.16s ease, box-shadow 0.16s ease;
}
.pcard:hover { translate: 0 -4px; box-shadow: 0 16px 34px rgba(15, 31, 87, 0.22); }
.pcard__media {
  position: relative; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1; padding: 14px; background: linear-gradient(140deg, #fffaea 0%, #eef1f9 100%);
}
.pcard__img { width: 100%; height: 100%; object-fit: contain; }
.pcard__noimg, .pmodal__noimg {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 12px;
  background-image: repeating-linear-gradient(135deg, #eef0f5 0 12px, #e5e8f0 12px 24px);
  font-family: ui-monospace, monospace; font-size: 13.2px; line-height: 1.7; color: var(--muted-2); text-align: center;
}
.pcard__no {
  position: absolute; top: 10px; left: 10px; padding: 3px 8px; border-radius: 3px;
  background: var(--red); color: #fff; font-size: 13.2px; font-weight: 700;
}
.pcard__group {
  position: absolute; right: 10px; bottom: 10px; padding: 4px 9px; border-radius: 3px;
  background: rgba(15, 31, 87, 0.86); color: #fff; font-size: 14.4px; font-weight: 600;
}
.pcard__body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.pcard__title { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.5; color: var(--ink-2); }
.pcard__link, .pcard__link:hover { color: inherit; }
/* the title link covers the whole card */
.pcard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 8px; }
.pcard__link:focus-visible { outline: none; }
.pcard__link:focus-visible::after { box-shadow: inset 0 0 0 3px var(--navy); }
.pcard:has(.pcard__link:focus-visible) { outline: 3px solid var(--navy); outline-offset: 3px; }
.pcard__short {
  margin: 0; font-size: 18px; line-height: 1.7; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard__more { margin-top: auto; padding-top: 8px; font-size: 17.4px; font-weight: 700; color: var(--red); }

/* ---------------- home page section ---------------- */

.catalog-home { background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%); border-top: 3px solid var(--red); }
.catalog-home__wrap { max-width: var(--wrap); margin: 0 auto; padding: clamp(38px, 6.5vw, 68px) 20px clamp(40px, 6.5vw, 72px); }
.catalog-home__head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-bottom: 34px; }
.catalog-home__headline { margin-bottom: 0; }
.catalog-home__title { margin: 6px 0 0; font-size: clamp(33.6px, 4.1vw, 48px); font-weight: 700; color: var(--navy); }
.catalog-home__note { margin: 0 0 4px auto; font-size: 19.8px; color: var(--muted); }
.catalog-home__toggle { margin-top: 30px; text-align: center; }
.catalog-home__more, .catalog-home__less {
  border-radius: 4px; background: #fff; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.catalog-home__more { padding: 14px 34px; border: 1px solid var(--navy); color: var(--navy); font-size: 21px; font-weight: 700; }
.catalog-home__more:hover { background: var(--navy); color: #fff; }
.catalog-home__less { padding: 12px 28px; border: 1px solid var(--border); color: var(--muted); font-size: 19.8px; font-weight: 600; }
.catalog-home__less:hover { border-color: var(--navy); color: var(--navy); }

/* ---------------- detail modal (<dialog>) ---------------- */

html.has-dialog { overflow: hidden; }

.pmodal {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: clamp(10px, 3vw, 24px); border: 0;
  background: rgba(8, 20, 54, 0.62); color: var(--ink); overflow-y: auto; overscroll-behavior: contain;
}
.pmodal[open] { display: flex; align-items: flex-start; justify-content: center; }
.pmodal::backdrop { background: transparent; }
.pmodal__box {
  width: 100%; max-width: 880px; margin: auto; overflow: hidden; border-radius: 8px;
  background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4); animation: nukFade 0.18s ease-out;
}
.pmodal__bar { display: flex; align-items: center; gap: 14px; padding: 18px 24px; background: var(--navy); }
.pmodal__heads { flex: 1; }
.pmodal__headline { display: flex; align-items: center; gap: 14px; }
.pmodal__no {
  flex: none; padding: 4px 9px; border-radius: 3px;
  background: linear-gradient(180deg, #ffce23, #ffc400); color: var(--navy-950); font-size: 15.6px; font-weight: 700;
}
.pmodal__title { flex: 1; margin: 0; font-size: 26.4px; font-weight: 700; line-height: 1.4; color: #fff; }
.pmodal__ctl {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; border: 1px solid var(--navy-500); border-radius: 4px;
  background: transparent; color: #fff; cursor: pointer;
}
.pmodal__ctl::before { content: ""; position: absolute; inset: -5px; } /* 46px touch target */
/* phones: number + buttons on the first row, the name gets the full width below */
@media (max-width: 560px) {
  .pmodal__bar {
    display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 10px 14px; padding: 16px 18px;
    grid-template-areas: "no . prev next close" "title title title title title";
  }
  .pmodal__heads, .pmodal__headline { display: contents; }
  .pmodal__no { grid-area: no; justify-self: start; }
  .pmodal__title { grid-area: title; }
  [data-pmodal-prev] { grid-area: prev; }
  [data-pmodal-next] { grid-area: next; }
  [data-pmodal-close] { grid-area: close; }
}
.pmodal__ctl:hover { background: linear-gradient(180deg, #ffce23, #ffc400); color: var(--navy-950); }

.pmodal__body {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 26px; align-items: start;
  padding: clamp(18px, 3.5vw, 26px);
}
.pmodal__media {
  position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1;
  padding: 18px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
}
.pmodal__img { width: 100%; height: 100%; object-fit: contain; }
.pmodal__noimg { font-size: 15.6px; padding: 16px; }
.pmodal__thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.pmodal__thumb {
  width: 84px; height: 84px; padding: 6px; object-fit: contain;
  background: var(--bg); border: 1px solid var(--border); border-radius: 4px;
}
.pmodal__desc { margin: 0; font-size: 20.4px; line-height: 1.9; color: var(--ink-3); text-wrap: pretty; white-space: pre-line; }
.pmodal__spec { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.pmodal__spec-title { margin: 0 0 10px; font-size: 19.8px; font-weight: 700; color: var(--navy); }
.pmodal__chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.pmodal__chip {
  padding: 6px 11px; background: var(--bg); border: 1px solid var(--border); border-radius: 3px;
  font-size: 18px; color: var(--ink-3);
}
.pmodal__actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
