/* ---------- Head ---------- */

.plp-head {
    background: var(--blue);
    color: var(--white);
    padding: clamp(28px, 4vw, 48px) 0 0;
    overflow: hidden;
}

.plp-head__inner {
    display: grid;
    grid-template-columns: 1fr minmax(0, 420px);
    grid-template-areas: "crumbs crumbs" "title side";
    align-items: end;
    gap: 16px 48px;
}

.plp-head .crumbs {
    grid-area: crumbs;
}

.plp-head h1 {
    grid-area: title;
    font-size: clamp(1.9rem, 8.5vw, 8rem);
    line-height: .78;
    margin-bottom: -.04em;
}

.plp-head__side {
    grid-area: side;
    padding-bottom: 12px;
}

.plp-head__side p {
    margin: 0;
    color: var(--muted-on-blue);
    font-size: .9375rem;
}

.plp-head__count {
    margin-bottom: 8px !important;
    color: var(--white) !important;
    font-stretch: 87.5%;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.plp-head__count b {
    font-size: 2.6rem;
    color: var(--yellow);
    margin-right: 4px;
}

.chips {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 28px 0 0;
    scrollbar-width: none;
}

.chip {
    flex: none;
    min-height: 44px;
    padding: 0 26px 0 16px;
    background: var(--blue-deep);
    border: 0;
    color: var(--white);
    font-stretch: 87.5%;
    font-weight: 700;
    font-size: .875rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    transition: background .2s;
}

.chip:hover {
    background: var(--blue-night);
}

.chip.is-on {
    background: var(--yellow);
    color: var(--ink);
}

.chip--hot {
    color: var(--yellow);
}

/* ---------- Filter bar ---------- */

.plp-bar {
    position: sticky;
    top: var(--hdr-top);
    z-index: 20;
    background: var(--ink);
    color: var(--white);
}

.plp-filters {
    display: flex;
    align-items: center;
    gap: 2px;
    min-height: 60px;
    overflow-x: auto;
    scrollbar-width: none;
}

.sel select,
.sel .dd {
    appearance: none;
    height: 44px;
    padding: 0 38px 0 14px;
    background: var(--ink-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6f53a' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
    border: 0;
    color: var(--white);
    font-stretch: 87.5%;
    font-weight: 700;
    font-size: .875rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
}

.sel select:hover,
.sel .dd:hover {
    background-color: var(--ink-3);
}

.sel--sort {
    margin-left: auto;
}

.plp-reset {
    flex: none;
    height: 44px;
    padding: 0 14px;
    background: none;
    border: 0;
    color: var(--muted-on-ink);
    cursor: pointer;
}

.plp-reset:hover {
    color: var(--yellow);
}

/* ---------- Grid ---------- */

/* Products sit on the light concrete ground: the emerald head and the black filter bar above
   are the only dark fields, so the page reads as head, then shelf. */
.plp {
    background: var(--studio);
    padding: clamp(24px, 3vw, 40px) 0 clamp(64px, 8vw, 110px);
}

.pc.is-hidden {
    display: none;
}

.pc.is-picked {
    outline: 3px solid var(--yellow);
    outline-offset: -3px;
}

.plp-empty {
    display: grid;
    justify-items: start;
    gap: 20px;
    padding: 64px 0;
}

.plp-empty .d {
    font-size: clamp(2.4rem, 6vw, 4rem);
    margin: 0;
}

/* ---------- Quiz band ---------- */

.quizband {
    background: var(--yellow);
    padding: 36px 0;
}

.quizband__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 32px;
}

.quizband__inner p {
    margin: 0;
}

.quizband .d {
    font-size: clamp(2rem, 4vw, 3rem);
}

.quizband .btn {
    margin-left: auto;
}

/* ---------- Compare tray ---------- */

.tray {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: var(--ink);
    color: var(--white);
    box-shadow: 0 -12px 30px -10px rgba(0, 0, 0, .4);
    animation: cmp-in .45s var(--ease);
}

@keyframes cmp-in {
    from {
        transform: translateY(100%);
    }
}

.tray__inner {
    display: flex;
    align-items: center;
    gap: 16px 24px;
    min-height: 76px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.tray__label {
    color: var(--yellow);
    margin: 0;
}

.tray__slots {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.tray__slots li {
    flex: 1;
    max-width: 280px;
    min-width: 0;
    padding: 10px 14px;
    background: var(--ink-2);
    font-stretch: 87.5%;
    font-weight: 700;
    font-size: .875rem;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tray__slots li.is-empty {
    color: var(--muted-on-ink);
    font-weight: 600;
    border: 1px dashed var(--ink-3);
    background: none;
}

.tray [aria-disabled="true"] {
    --bg: var(--ink-3);
    --fg: var(--muted-on-ink);
    pointer-events: none;
}

@media (max-width: 760px) {
    .plp-head__inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "crumbs" "title" "side";
    }

    .plp-bar {
        top: var(--hdr-top);
    }

    .sel--sort {
        margin-left: 0;
    }

    .quizband .btn {
        margin-left: 0;
    }

    .tray__label {
        display: none;
    }

    .tray__inner {
        gap: 8px;
    }

    .tray__slots li {
        padding: 8px 10px;
        font-size: .75rem;
    }

    .tray .btn {
        padding: 0 calc(.9em + var(--slant)) 0 .9em;
    }
}

/* ---------- Compare tile inside the grid ---------- */

.plp-cmp {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 14px;
    min-height: 100%;
    padding: 28px 26px;
    background: var(--ink);
    color: var(--white);
    text-decoration: none;
    clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
    transition: background .25s;
}

.plp-cmp[hidden] {
    display: none;
}

.plp-cmp > .ico {
    width: 44px;
    height: 44px;
    margin-bottom: auto;
    color: var(--yellow);
}

.plp-cmp .d {
    font-size: clamp(1.4rem, 2.2vw, 2.2rem);
    line-height: .88;
}

.plp-cmp span {
    color: var(--muted-on-ink);
    font-size: .9375rem;
}

.plp-cmp .plp-cmp__go {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--yellow);
}

.plp-cmp:hover {
    background: var(--blue);
}

.plp-cmp:hover span {
    color: var(--white);
}

.plp-cmp:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: -3px;
}

/* ---------- Compare toggle: an ink plate pinned on the photo, yellow once picked ---------- */

.pc__cmp {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    gap: 6px;
    height: 34px;
    margin: 0;
    padding: 0 calc(12px + 8px) 0 10px;
    background: var(--ink);
    color: var(--white);
    clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .25s, transform .3s var(--ease), background .2s;
}

.pc__cmp input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.pc__cmp .ico {
    width: 16px;
    height: 16px;
}

.pc__cmp-on,
.pc__cmp:has(input:checked) .pc__cmp-add,
.pc__cmp:has(input:checked) .pc__cmp-off {
    display: none;
}

.pc__cmp:has(input:checked) .pc__cmp-on {
    display: inline;
}

/* Shown on hover and focus, always once picked, always on touch screens. */
.pc:hover .pc__cmp,
.pc__cmp:has(input:focus-visible),
.pc__cmp:has(input:checked) {
    opacity: 1;
    transform: none;
}

@media (hover: none) {
    .pc__cmp {
        opacity: 1;
        transform: none;
    }
}

.pc__cmp:hover {
    background: var(--ink-3);
}

.pc__cmp:has(input:checked) {
    background: var(--yellow);
    color: var(--ink);
}

.pc__cmp:has(input:focus-visible) {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}

/* Phones: icon only, the words stay for screen readers. */
@media (max-width: 640px) {
    .pc__cmp {
        top: 8px;
        right: 8px;
        width: 40px;
        height: 36px;
        justify-content: center;
        padding: 0 8px 0 0;
    }

    .pc__cmp span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}
