/* ============================================================
   Products page — calm, elegant grid.
   Centred heading · one row of category pills · evenly sized cards (photo, name, category).
   Builds on krung.css + page-base.css. Behaviour: assets/js/products.js.
   ============================================================ */

.pg {
    max-width: calc(var(--wrap, 1400px) + 2 * var(--pad));
    margin: 0 auto;
    padding: clamp(140px, 14vw, 180px) var(--pad) clamp(80px, 9vw, 120px);
}

/* ---------------------------------------------------------------- heading */
.pg-head { max-width: 680px; margin: 0 auto clamp(36px, 4vw, 52px); text-align: center; }

.pg-kicker { margin-bottom: 14px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #005bac; }

.pg-title {
    margin-bottom: 16px;
    font-size: clamp(34px, 4.2vw, 58px);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -.04em;
    color: var(--ink);
}

.pg-sub { font-size: clamp(15px, 1.15vw, 17px); line-height: 1.65; color: var(--muted); }

.pg-kicker, .pg-title, .pg-sub, .pg-filters { opacity: 0; transform: translateY(16px); transition: opacity .8s, transform 1s var(--out); }
.pg-title { transition-delay: .08s; }
.pg-sub { transition-delay: .16s; }
.pg-filters { transition-delay: .24s; }
.ready .pg-kicker, .ready .pg-title, .ready .pg-sub, .ready .pg-filters { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- category pills */
.pg-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: clamp(40px, 5vw, 64px);
}

.pg-filter {
    padding: 10px 20px;
    border: 1px solid rgba(13, 35, 64, .12);
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    transition: background-color .3s, border-color .3s, color .3s;
}

.pg-filter:hover { border-color: rgba(13, 35, 64, .3); }
.pg-filter.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.pg-filter:focus-visible { outline: 2px solid #005bac; outline-offset: 2px; }

/* ---------------------------------------------------------------- grid */
.pg-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(36px, 4vw, 56px) clamp(20px, 2.4vw, 32px);
    list-style: none;
}

.pg-item { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .8s var(--out); }
.pg-item.show { opacity: 1; transform: none; }
.pg-item[hidden] { display: none; }

.pg-card { display: block; color: inherit; text-decoration: none; }

.pg-photo {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    margin-bottom: 18px;
    overflow: hidden;
    border-radius: 24px;
    background: #f4f6f9;
    transition: background-color .5s;
}

.pg-photo img {
    width: 66%;
    height: 66%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform .9s var(--out);
}

.pg-card:hover .pg-photo { background: #edf2f8; }
.pg-card:hover .pg-photo img { transform: scale(1.06); }

.pg-photo.no-photo { background: #f4f6f9; }
.pg-ph { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #fff; color: #b7c4d4; font-size: 28px; }

/* small round arrow appears on hover */
.pg-go {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: 16px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .35s, transform .5s var(--out);
}

.pg-card:hover .pg-go, .pg-card:focus-visible .pg-go { opacity: 1; transform: none; }
.pg-card:focus-visible { outline: none; }
.pg-card:focus-visible .pg-photo { box-shadow: 0 0 0 2px #005bac; }

.pg-name { display: block; margin-bottom: 4px; font-size: 17px; font-weight: 600; letter-spacing: -.015em; color: var(--ink); transition: color .3s; }
.pg-card:hover .pg-name { color: #005bac; }
.pg-cat { display: block; font-size: 14px; color: var(--light); }

.pg-help { margin-top: clamp(56px, 6vw, 80px); text-align: center; font-size: 15px; color: var(--muted); }
.pg-help a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(13, 35, 64, .3); }
.pg-help a:hover { color: #005bac; text-decoration-color: currentColor; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
    .pg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .pg { padding-top: 120px; }
    .pg-filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin-left: calc(-1 * var(--pad)); margin-right: calc(-1 * var(--pad)); padding: 0 var(--pad); }
    .pg-filters::-webkit-scrollbar { display: none; }
    .pg-filter { flex-shrink: 0; }
    .pg-grid { gap: 30px 14px; }
    .pg-photo { border-radius: 18px; margin-bottom: 12px; }
    .pg-name { font-size: 15px; }
    .pg-cat { font-size: 13px; }
    .pg-go { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .pg-kicker, .pg-title, .pg-sub, .pg-filters, .pg-item { opacity: 1; transform: none; transition: none; }
}

/* brand font only: accent words in headings stay Inter, upright, in brand blue */
.pg-title em, .ph2-title em { font-family: inherit; font-style: normal; font-weight: inherit; letter-spacing: inherit; }
.pg-title em { color: #005bac; }

/* products header: soft brand-blue gradient, drifting blobs and a faint dot grid behind the heading */
.products-page .pg-head { position: relative; isolation: isolate; }
.products-page .pg-head::before {
    content: "";
    position: absolute;
    z-index: -2;
    left: 50%;
    top: -260px;
    width: 100vw;
    height: calc(100% + 360px);
    translate: -50% 0;
    background:
        radial-gradient(38% 55% at 22% 30%, rgba(63, 124, 255, .20), rgba(63, 124, 255, 0) 70%),
        radial-gradient(34% 50% at 80% 24%, rgba(47, 224, 208, .16), rgba(47, 224, 208, 0) 70%),
        radial-gradient(60% 60% at 50% 0%, rgba(158, 203, 242, .45), rgba(158, 203, 242, 0) 75%);
    animation: pgDrift 16s ease-in-out infinite alternate;
    pointer-events: none;
}
.products-page .pg-head::after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 50%;
    top: -200px;
    width: min(1300px, 100vw);
    height: calc(100% + 260px);
    translate: -50% 0;
    background-image: radial-gradient(rgba(0, 91, 172, .16) 1px, transparent 1.4px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(50% 55% at 50% 45%, #000 20%, transparent 80%);
    mask-image: radial-gradient(50% 55% at 50% 45%, #000 20%, transparent 80%);
    pointer-events: none;
}
.products-page .pg { overflow-x: clip; }
@keyframes pgDrift {
    from { background-position: 0 0, 0 0, 0 0; filter: hue-rotate(0deg); }
    to   { background-position: 60px 30px, -50px 20px, 0 0; filter: hue-rotate(-10deg); }
}
@media (prefers-reduced-motion: reduce) { .products-page .pg-head::before { animation: none; } }
/* header gradient spans the full window */
.products-page .pg { overflow-x: visible !important; }
body.products-page { overflow-x: hidden; }
