/* =========================================
   SETCO INKS: products.css  (v2)
   Load AFTER style.css (uses its tokens and .header-btn).
   1 Shared  2 Listing  3 Detail  4 Responsive
========================================= */

:root {
    --pr-ink: #111;
    --pr-line: rgba(17, 17, 17, .14);
    --pr-cyan: var(--color-1, #00adee);
    --pr-magenta: var(--color-2, #eb008b);
    --pr-yellow: var(--color-3, #ffdd00);
    --pr-black: var(--color-4, #231f20);
    --pr-paper: var(--paper, #F7F5EF);
    --pr-ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- 1. SHARED ---------- */
.pl-wrap, .pd-wrap { width: min(92%, 1440px); margin: 0 auto; }

.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

/* Colour fallback: cards stay coloured even if the inline --bg/--fg is ever removed.
   Inline style from products.js still wins when present. */
.pgrid .pc:nth-child(4n+1) { --bg: #00adee; --fg: #111; }
.pgrid .pc:nth-child(4n+2) { --bg: #eb008b; --fg: #fff; }
.pgrid .pc:nth-child(4n+3) { --bg: #ffdd00; --fg: #111; }
.pgrid .pc:nth-child(4n)   { --bg: #231f20; --fg: #F7F5EF; }

.pc {
    position: relative; display: flex; flex-direction: column; gap: 14px;
    min-height: 320px; padding: 28px; overflow: hidden; isolation: isolate;
    background: var(--bg, #00adee); color: var(--fg, #111);
    border: 2px solid var(--pr-ink); border-radius: 30px; box-shadow: 6px 6px 0 var(--pr-ink);
    text-decoration: none;
    transition: transform .4s var(--pr-ease), box-shadow .4s var(--pr-ease);
}
.pc:hover { transform: translate(-4px, -4px); box-shadow: 10px 10px 0 var(--pr-ink); color: var(--fg, #111); }
.pc:focus-visible { outline: 3px solid var(--pr-ink); outline-offset: 4px; }

.pc-dot {
    position: absolute; z-index: -1; right: -18%; top: -22%; width: 68%; aspect-ratio: 1;
    border-radius: 50%; background: currentColor; opacity: .13;
    transition: transform .7s var(--pr-ease);
}
.pc:hover .pc-dot { transform: scale(1.3) translate(-4%, 6%); }

.pc-top small {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 12px;
    border: 1.5px solid currentColor; border-radius: 99px;
    font: 600 .78rem var(--body-font);
}
.pc h3 {
    margin-top: auto; font: 700 clamp(1.45rem, 1.9vw, 1.85rem)/1.05 var(--title-font);
    letter-spacing: -.015em; overflow-wrap: anywhere;
}
.pc p { font-size: .92rem; line-height: 1.5; max-width: 36ch; opacity: .92; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-tags em {
    font: 500 .7rem var(--body-font); font-style: normal; padding: 5px 12px;
    border: 1.5px solid currentColor; border-radius: 99px;
}
.pc-more {
    display: inline-flex; align-items: center; gap: 10px; margin-top: 6px;
    font: 600 .82rem var(--body-font);
}
.pc-more i {
    display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    background: var(--fg, #111); color: var(--bg, #00adee); font-size: .68rem;
    transition: transform .35s var(--pr-ease);
}
.pc:hover .pc-more i { transform: translateX(6px); }

/* ---------- 2. LISTING ---------- */
.pl-hero {
    position: relative; overflow: hidden;
    padding: clamp(140px, 18vh, 200px) 0 clamp(2rem, 5vh, 3.5rem);
    background: var(--pr-paper);
}
.pl-hero::after {               /* four-colour registration dots */
    content: ""; position: absolute; right: 6%; top: clamp(120px, 16vh, 180px);
    width: 120px; height: 120px; border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, #00adee 0 22%, transparent 23%),
        radial-gradient(circle at 70% 30%, #eb008b 0 22%, transparent 23%),
        radial-gradient(circle at 30% 70%, #ffdd00 0 22%, transparent 23%),
        radial-gradient(circle at 70% 70%, #231f20 0 22%, transparent 23%);
    pointer-events: none;
}
.pl-hero h1 { font: 600 clamp(2.6rem, 6.4vw, 6.4rem)/.98 var(--title-font); letter-spacing: -.03em; }
.pl-hero p { margin-top: 1.5rem; max-width: 52ch; color: #555; font-size: 1.02rem; line-height: 1.6; }

.pl-tools {
    position: sticky; top: 72px; z-index: 20; padding: 1rem 0 1.1rem;
    background: rgba(247, 245, 239, .92);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--pr-ink);
}
.pl-tools .pl-wrap { display: grid; gap: 12px; }

.pl-search { position: relative; max-width: 560px; }
.pl-search i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: #777; font-size: .85rem; pointer-events: none; }
.pl-search input {
    width: 100%; min-height: 52px; padding: 12px 20px 12px 48px;
    border: 2px solid var(--pr-ink); border-radius: 99px; background: #fff; color: var(--pr-ink);
    font: 400 .92rem var(--body-font); outline: none;
    transition: box-shadow .25s ease, border-color .25s ease;
}
.pl-search input::placeholder { color: #8a8a85; }
.pl-search input:focus { border-color: var(--pr-cyan); box-shadow: 0 0 0 4px rgba(0, 173, 238, .2); }

.pl-filter { display: flex; align-items: center; gap: 14px; }
.pl-filter-label { flex: none; min-width: 78px; font: 600 .78rem var(--body-font); color: #555; text-transform: uppercase; letter-spacing: .06em; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none; padding: 8px 16px; border: 1.5px solid var(--pr-ink); border-radius: 99px;
    background: transparent; color: var(--pr-ink); font: 500 .8rem var(--body-font); cursor: pointer;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}
.chip:hover { background: rgba(0, 0, 0, .07); }
.chip.is-on { background: var(--pr-ink); color: var(--pr-paper); }
.chip:active { transform: scale(.96); }
.chip:focus-visible { outline: 3px solid var(--pr-cyan); outline-offset: 2px; }
.pl-count { font-size: .8rem; color: #666; }

.pl-list { padding: clamp(1.8rem, 4vw, 3rem) 0 clamp(4rem, 9vw, 8rem); background: var(--pr-paper); }
.pl-list .pgrid { padding-bottom: 10px; }
.pl-empty { max-width: 520px; padding: 3rem 0; }
.pl-empty h2 { font: 600 clamp(1.8rem, 3vw, 2.6rem)/1.05 var(--title-font); margin-bottom: .8rem; }
.pl-empty p { color: #555; margin-bottom: 1.5rem; line-height: 1.6; }
.pl-reset { padding: 13px 24px; border: 0; border-radius: 99px; background: var(--pr-ink); color: var(--pr-paper); font-size: .85rem; cursor: pointer; transition: background .3s ease, color .3s ease; }
.pl-reset:hover { background: var(--pr-cyan); color: var(--pr-ink); }

.pl-cta { padding: clamp(4rem, 9vw, 8rem) 0; background: var(--pr-ink); color: var(--pr-paper); text-align: center; }
.pl-cta h2 { font: 600 clamp(2.2rem, 5vw, 4.6rem)/1.02 var(--title-font); letter-spacing: -.02em; margin-bottom: 2.2rem; }
.pl-cta .header-btn { display: inline-flex; background: var(--pr-paper); color: var(--pr-ink); }
.pl-cta .header-btn:hover { background: var(--pr-yellow); color: var(--pr-ink); }

/* ---------- 3. DETAIL ---------- */
.pd-hero {
    position: relative; overflow: hidden; isolation: isolate;
    padding: clamp(140px, 19vh, 210px) 0 clamp(3rem, 7vw, 6rem);
    background: var(--bg, #00adee); color: var(--fg, #111);
}
.pd-blob {
    position: absolute; z-index: -1; right: -8vw; top: 50%;
    width: min(46vw, 640px); aspect-ratio: 1; margin-top: calc(min(46vw, 640px) / -2);
    border-radius: 50%; background: currentColor; opacity: .12;
}
.pd-crumbs { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: clamp(2rem, 5vw, 4rem); font: 500 .85rem var(--body-font); }
.pd-crumbs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1.5px solid currentColor; border-radius: 99px; color: inherit; text-decoration: none; transition: background .3s ease, color .3s ease; }
.pd-crumbs a:hover { background: var(--fg, #111); color: var(--bg, #00adee); }
.pd-crumbs span { opacity: .8; }
.pd-hero h1 { font: 700 clamp(2.4rem, 7vw, 7rem)/.95 var(--title-font); letter-spacing: -.035em; overflow-wrap: anywhere; max-width: 14ch; }
.pd-tagline { margin-top: 1.5rem; max-width: 42ch; font-size: clamp(1.05rem, 1.6vw, 1.4rem); line-height: 1.4; font-weight: 500; }
.pd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.8rem; }
.pd-tags span { padding: 7px 15px; border: 1.5px solid currentColor; border-radius: 99px; font: 500 .8rem var(--body-font); }

.pd-body { padding: clamp(3rem, 7vw, 6rem) 0; background: var(--pr-paper); }
.pd-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.pd-main h2 { margin: 0 0 1rem; font: 600 clamp(1.5rem, 2.2vw, 2.1rem)/1.1 var(--title-font); letter-spacing: -.01em; }
.pd-main h2:not(:first-child) { margin-top: clamp(2.5rem, 4vw, 3.5rem); }
.pd-intro { max-width: 62ch; font-size: 1.05rem; line-height: 1.75; color: #333; }

.pd-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pd-features li {
    position: relative; padding: 16px 18px 16px 50px; background: #fff;
    border: 1.5px solid var(--pr-ink); border-radius: 18px; font-size: .92rem; line-height: 1.5;
    transition: transform .3s var(--pr-ease), box-shadow .3s var(--pr-ease);
}
.pd-features li:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--pr-ink); }
.pd-features li::before {
    content: "\2713"; position: absolute; left: 16px; top: 15px;
    display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
    background: var(--pr-cyan); color: var(--pr-ink); font: 700 .7rem/1 var(--body-font);
}
.pd-features li:nth-child(4n+2)::before { background: var(--pr-magenta); color: #fff; }
.pd-features li:nth-child(4n+3)::before { background: var(--pr-yellow); }
.pd-features li:nth-child(4n)::before   { background: var(--pr-black); color: #fff; }

.pd-subs { display: flex; flex-wrap: wrap; gap: 10px; }
.pd-subs span { padding: 10px 20px; background: var(--pr-ink); color: var(--pr-paper); border-radius: 99px; font: 500 .85rem var(--body-font); }

.pd-note {
    display: flex; gap: 16px; margin-top: clamp(2rem, 4vw, 3rem); padding: 22px 24px;
    background: var(--pr-yellow); border: 2px solid var(--pr-ink); border-radius: 22px; box-shadow: 5px 5px 0 var(--pr-ink);
}
.pd-note i { flex: none; margin-top: 4px; font-size: 1.1rem; }
.pd-note p { margin: 0; font-size: .92rem; line-height: 1.6; max-width: 60ch; }

.pd-side { position: sticky; top: 110px; }
.pd-card { padding: clamp(22px, 2.5vw, 32px); background: #fff; border: 2px solid var(--pr-ink); border-radius: 28px; box-shadow: 8px 8px 0 var(--pr-ink); }
.pd-card h3 { margin: 0 0 1rem; font: 700 1.4rem/1 var(--title-font); }
.pd-card dl { margin: 0 0 1.5rem; }
.pd-spec-row { padding: 13px 0; border-top: 1px solid var(--pr-line); }
.pd-spec-row dt { font: 600 .7rem var(--body-font); color: #777; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .07em; }
.pd-spec-row dd { margin: 0; font: 500 .9rem/1.45 var(--body-font); }

.pd-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%;
    padding: 16px 22px; border-radius: 99px; background: var(--pr-ink); color: var(--pr-paper);
    font: 600 .85rem/1.3 var(--body-font); text-decoration: none; margin-top: 10px;
    transition: background .3s ease, color .3s ease, transform .3s var(--pr-ease);
}
.pd-cta:first-of-type { margin-top: 0; }
.pd-cta:hover { background: var(--pr-magenta); color: #fff; }
.pd-cta i { flex: none; font-size: .78rem; transition: transform .3s ease; }
.pd-cta:hover i { transform: translateX(5px); }

/* TDS download button */
.pd-cta-tds { justify-content: center; background: var(--pr-cyan); color: var(--pr-ink); border: 2px solid var(--pr-ink); box-shadow: 4px 4px 0 var(--pr-ink); margin-bottom: 12px; }
.pd-cta-tds i { font-size: 1rem; }
.pd-cta-tds:hover { background: var(--pr-yellow); color: var(--pr-ink); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--pr-ink); }
.pd-cta-tds:hover i { transform: translateY(3px); }

.pd-cta-ghost { justify-content: center; background: transparent; color: var(--pr-ink); border: 1.5px solid var(--pr-ink); }
.pd-cta-ghost:hover { background: var(--pr-ink); color: var(--pr-paper); }

.pd-related { padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem); background: #fff; border-top: 2px solid var(--pr-ink); }
.pd-related h2 { margin: 0 0 2rem; font: 600 clamp(1.8rem, 3.4vw, 3.2rem)/1.05 var(--title-font); letter-spacing: -.02em; }
.pd-related .pc { min-height: 260px; }
.pd-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: clamp(2.5rem, 5vw, 4rem); }
.pd-pager a { display: flex; flex-direction: column; gap: 4px; padding: 20px 24px; border: 1.5px solid var(--pr-ink); border-radius: 22px; color: var(--pr-ink); text-decoration: none; transition: background .3s ease, color .3s ease; }
.pd-pager a:last-child { text-align: right; }
.pd-pager a:hover { background: var(--pr-ink); color: var(--pr-paper); }
.pd-pager small { font-size: .75rem; opacity: .7; }
.pd-pager b { font: 600 1.05rem var(--title-font); overflow-wrap: anywhere; }

.pd-missing { padding: clamp(160px, 24vh, 260px) 0 clamp(4rem, 10vw, 8rem); background: var(--pr-paper); }
.pd-missing h1 { font: 600 clamp(2.4rem, 5vw, 4.5rem)/1 var(--title-font); letter-spacing: -.03em; margin-bottom: 1rem; }
.pd-missing p { margin-bottom: 2rem; color: #555; }
.pd-missing .header-btn { display: inline-flex; }

/* ---------- 4. RESPONSIVE ---------- */
@media (max-width: 1100px) {
    .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .pd-grid { grid-template-columns: 1fr; }
    .pd-side { position: static; }
    .pd-blob { width: 70vw; margin-top: calc(70vw / -2); right: -25vw; }
    .pl-hero::after { display: none; }
    .pl-tools { top: 64px; }
    .pd-missing .header-btn, .pl-cta .header-btn { display: inline-flex; }
}
@media (max-width: 767px) {
    .pgrid { grid-template-columns: 1fr; gap: 18px; }
    .pc { min-height: 250px; padding: 24px; border-radius: 26px; box-shadow: 4px 4px 0 var(--pr-ink); }
    .pl-tools { position: static; }
    .pl-filter { flex-direction: column; align-items: stretch; gap: 8px; }
    .pd-features { grid-template-columns: 1fr; }
    .pd-pager { grid-template-columns: 1fr; }
    .pd-pager a:last-child { text-align: left; }
    .pd-card { box-shadow: 5px 5px 0 var(--pr-ink); border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .pc, .pc-dot, .pc-more i, .pd-cta, .pd-cta i, .chip, .pd-features li { transition: none; }
    .pc:hover, .pd-features li:hover { transform: none; }
}