/* Parin Jewellers – Shop / Product Listing (Figma: Parin Jewellers – Shop / Product Listing (Redesign),
   Mobile, and Mobile Filter Sheet). Builds on css/home-v2.css (tokens, header, footer, product card). */

/* ---------- Page header ---------- */
.pj-shop-head {
    padding: 40px 0;
    background: var(--pj-sand);
}

.pj-shop-head .pj-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pj-home .pj-crumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--pj-muted);
}

.pj-crumbs li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pj-crumbs li + li::before {
    content: "/";
    color: var(--pj-gold);
}

.pj-home .pj-crumbs a:hover {
    color: var(--pj-maroon);
}

.pj-home .pj-crumbs [aria-current] {
    font-weight: 500;
    color: var(--pj-ink);
}

.pj-home .pj-shop-head .pj-eyebrow {
    margin-bottom: 8px;
    font-size: 12px;
    letter-spacing: 2.64px;
}

.pj-home .pj-shop-head__title {
    font-family: var(--pj-serif);
    font-weight: 500;
    font-size: 52px;
    line-height: 1.1;
    color: var(--pj-ink);
}

.pj-home .pj-shop-head__lead {
    margin-top: 8px;
    font-size: 15px;
    color: var(--pj-muted);
}

/* Category chips */
.pj-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.pj-home .pj-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 38px;
    padding: 3px 18px 3px 3px;
    border: 1px solid var(--pj-line);
    border-radius: 999px;
    background: #fff;
    font-weight: 500;
    font-size: 14px;
    color: var(--pj-ink);
    white-space: nowrap;
    transition: background-color 0.2s var(--pj-ease), border-color 0.2s var(--pj-ease), color 0.2s var(--pj-ease);
}

.pj-home .pj-chip--all {
    padding: 8px 18px;
}

.pj-home .pj-chip:hover {
    border-color: var(--pj-maroon);
}

.pj-home .pj-chip.is-active {
    border-color: var(--pj-maroon);
    background: var(--pj-maroon);
    color: #fff;
}

.pj-chip__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--pj-maroon);
    color: var(--pj-ivory);
}

.pj-chip.is-active .pj-chip__icon {
    background: rgba(255, 255, 255, 0.14);
}

.pj-home .pj-chip__count {
    font-weight: 400;
    font-size: 12px;
    color: var(--pj-muted);
}

.pj-home .pj-chip.is-active .pj-chip__count {
    color: #e9c9a0;
}

/* ---------- Layout ---------- */
.pj-shop__layout {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    align-items: start;
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 64px;
}

/* Mobile/tablet only */
.pj-shopbar,
.pj-results__count,
.pj-filters__sheet-head,
.pj-filters__foot,
.pj-filters-overlay {
    display: none;
}

/* ---------- Filters (desktop sidebar) ---------- */
.pj-home .pj-filters {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    margin: 0;
}

.pj-filters__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 18px;
}

.pj-home .pj-filters__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-family: var(--pj-serif);
    font-weight: 500;
    font-size: 26px;
    line-height: normal;
    color: var(--pj-ink);
}

.pj-home .pj-filters__clear {
    font-weight: 500;
    font-size: 13px;
    color: var(--pj-maroon);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pj-home .pj-fgroup {
    min-width: 0;
    margin: 0;
    padding: 20px 0 22px;
    border: 0;
    border-top: 1px solid var(--pj-line);
}

.pj-home .pj-fgroup__head,
.pj-home .pj-fgroup__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font-weight: 600;
    font-size: 12px;
    line-height: normal;
    letter-spacing: 1.68px;
    color: var(--pj-ink);
}

.pj-fgroup__head .pj-icon {
    transform: rotate(180deg);
    transition: transform 0.2s var(--pj-ease);
}

.pj-fgroup__head[aria-expanded="false"] .pj-icon {
    transform: none;
}

.pj-fgroup__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 14px;
}

.pj-fgroup__body[hidden] {
    display: none;
}

.pj-fgroup .pj-opt--switch {
    margin-top: 14px;
}

/* Checkbox rows */
.pj-home .pj-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-weight: 400;
    font-size: 14px;
    color: var(--pj-ink);
    cursor: pointer;
}

.pj-opt__label {
    flex: 1 1 auto;
    min-width: 0;
}

.pj-home .pj-opt__count {
    font-size: 12px;
    color: var(--pj-muted);
}

.pj-home .pj-opt input[type="checkbox"]:not([role="switch"]) {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.2px solid #cdbfaf;
    border-radius: 4px;
    background: #fff center / 12px no-repeat;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: background-color 0.15s var(--pj-ease), border-color 0.15s var(--pj-ease);
}

.pj-home .pj-opt input[type="checkbox"]:not([role="switch"]):checked {
    border-color: var(--pj-maroon);
    background-color: var(--pj-maroon);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2L5 8.5L9.5 3.5'/%3E%3C/svg%3E");
}

.pj-opt input:checked ~ .pj-opt__label {
    font-weight: 500;
}

.pj-opt:hover input:not(:checked) {
    border-color: var(--pj-maroon);
}

/* Switch */
.pj-home .pj-opt input[role="switch"] {
    position: relative;
    flex: none;
    width: 40px;
    height: 22px;
    margin: 0;
    border: 0;
    border-radius: 11px;
    background: var(--pj-line);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: background-color 0.2s var(--pj-ease);
}

.pj-opt input[role="switch"]::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(28, 20, 20, 0.2);
    transition: transform 0.2s var(--pj-ease);
}

.pj-home .pj-opt input[role="switch"]:checked {
    background: var(--pj-maroon);
}

.pj-opt input[role="switch"]:checked::after {
    transform: translateX(18px);
}

/* Price range: two range inputs over one track */
.pj-range {
    position: relative;
    height: 20px;
}

.pj-range__track {
    position: absolute;
    left: 0;
    right: 0;
    top: 8px;
    height: 4px;
    border-radius: 2px;
    background: var(--pj-line);
}

.pj-range__fill {
    position: absolute;
    top: 0;
    bottom: 0;
    /* Thumb centres run from 9px to (width - 9px) */
    left: calc(9px + (100% - 18px) * var(--lo, 0));
    right: calc(9px + (100% - 18px) * (1 - var(--hi, 1)));
    border-radius: 2px;
    background: var(--pj-maroon);
}

.pj-home .pj-range input[type="range"] {
    position: absolute;
    left: 0;
    width: 100%;
    top: 0;
    height: 20px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.pj-range input[type="range"]::-webkit-slider-runnable-track {
    height: 20px;
    background: none;
}

.pj-range input[type="range"]::-moz-range-track {
    height: 20px;
    background: none;
}

.pj-range input[type="range"]::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border: 2px solid var(--pj-maroon);
    border-radius: 50%;
    background: #fff;
    pointer-events: auto;
    cursor: grab;
    -webkit-appearance: none;
    appearance: none;
}

.pj-range input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 2px solid var(--pj-maroon);
    border-radius: 50%;
    background: #fff;
    pointer-events: auto;
    cursor: grab;
}

.pj-range input[type="range"]:focus-visible::-webkit-slider-thumb {
    outline: 2px solid var(--pj-gold);
    outline-offset: 2px;
}

.pj-home .pj-range input[type="range"]:focus-visible {
    outline: none;
}

.pj-minmax {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--pj-muted);
}

.pj-home .pj-minmax__field {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    gap: 4px;
    min-width: 0;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--pj-line);
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    color: var(--pj-ink);
}

.pj-minmax__field:focus-within {
    border-color: var(--pj-maroon);
}

.pj-home .pj-minmax__field input {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 13px;
    color: var(--pj-ink);
}

.pj-home .pj-minmax__field input:focus-visible {
    outline: none;
}

.pj-minmax__field input::placeholder {
    color: var(--pj-ink);
    opacity: 1;
}

.pj-js .pj-filters__nojs {
    display: none;
}

.pj-home .pj-filters__nojs {
    width: 100%;
    height: 44px;
    margin-top: 22px;
}

/* Help card */
.pj-helpcard {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 22px;
    border-radius: 18px;
    background: var(--pj-maroon);
}

.pj-home .pj-helpcard__title {
    font-family: var(--pj-serif);
    font-weight: 500;
    font-size: 22px;
    color: var(--pj-ivory);
}

.pj-home .pj-helpcard__text {
    font-size: 13px;
    line-height: 1.5;
    color: #ebd9d0;
}

.pj-home .pj-helpcard__btn {
    margin-top: 4px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--pj-gold);
    font-weight: 500;
    font-size: 13px;
    color: #fff;
    transition: background-color 0.2s var(--pj-ease);
}

.pj-home .pj-helpcard__btn:hover {
    background: var(--pj-gold-text);
    color: #fff;
}

/* ---------- Toolbar ---------- */
.pj-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 42px;
}

.pj-toolbar__left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    min-width: 0;
}

.pj-home .pj-toolbar__count {
    font-size: 14px;
    color: var(--pj-muted);
    white-space: nowrap;
}

.pj-home .pj-active {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pj-home .pj-active__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 14px;
    border: 0;
    border-radius: 999px;
    background: var(--pj-sand);
    font-weight: 500;
    font-size: 12px;
    color: var(--pj-ink);
    white-space: nowrap;
    transition: background-color 0.2s var(--pj-ease);
}

.pj-home .pj-active__chip:hover {
    background: #ead9c2;
}

.pj-toolbar__right {
    display: flex;
    flex: none;
    align-items: center;
    gap: 12px;
}

.pj-home .pj-sort {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 14px 10px 16px;
    border: 1px solid var(--pj-line);
    border-radius: 12px;
    background: #fff;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
}

.pj-sort:focus-within {
    outline: 2px solid var(--pj-gold);
    outline-offset: 2px;
}

.pj-home .pj-sort__label {
    color: var(--pj-muted);
}

.pj-home .pj-sort__value {
    font-weight: 500;
    color: var(--pj-ink);
}

/* Native select sits invisibly on top, so the system picker opens. */
.pj-home .pj-sort select,
.pj-home .pj-shopbar__sort select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 16px;
}

.pj-viewtoggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--pj-line);
    border-radius: 12px;
    background: #fff;
}

.pj-home .pj-viewtoggle button {
    display: flex;
    padding: 7px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--pj-muted);
    transition: background-color 0.2s var(--pj-ease), color 0.2s var(--pj-ease);
}

.pj-home .pj-viewtoggle button:hover {
    color: var(--pj-maroon);
}

.pj-home .pj-viewtoggle button[aria-pressed="true"] {
    background: var(--pj-maroon);
    color: #fff;
}

/* ---------- Product grid (reuses the home page card) ---------- */
.pj-home .pj-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.pj-grid .pj-product {
    flex: none;
    min-width: 0;
}

.pj-grid .pj-product[hidden] {
    display: none;
}

.pj-grid .pj-product__media {
    height: auto;
    aspect-ratio: 282 / 300;
}

.pj-grid .pj-product__info {
    flex: 1 1 auto;
    justify-content: space-between;
}

.pj-product__text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pj-grid .pj-product.is-new {
    animation: pj-card-in 0.35s var(--pj-ease) both;
}

@keyframes pj-card-in {
    from { opacity: 0; transform: translateY(8px); }
}

/* List view (desktop) */
.pj-home .pj-grid.is-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.pj-grid.is-list .pj-product {
    flex-direction: row;
}

.pj-grid.is-list .pj-product__media {
    flex: none;
    width: 220px;
    aspect-ratio: 1;
}

.pj-grid.is-list .pj-product__info {
    justify-content: center;
    gap: 16px;
    padding: 24px 28px;
}

.pj-home .pj-grid.is-list .pj-product__name {
    font-size: 24px;
}

.pj-grid.is-list .pj-product__row {
    padding-top: 0;
}

/* Empty state */
.pj-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 64px 24px;
    border: 1px dashed var(--pj-line);
    border-radius: var(--pj-radius-card);
    text-align: center;
}

.pj-empty[hidden] {
    display: none;
}

.pj-home .pj-empty__title {
    font-family: var(--pj-serif);
    font-weight: 500;
    font-size: 28px;
}

.pj-home .pj-empty__text {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--pj-muted);
}

/* Load more */
.pj-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-top: 48px;
}

.pj-more[hidden] {
    display: none;
}

.pj-home .pj-more__text {
    font-size: 13px;
    color: var(--pj-muted);
}

.pj-more__bar {
    position: relative;
    width: 240px;
    height: 4px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--pj-line);
}

.pj-more__bar span {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: 2px;
    background: var(--pj-maroon);
    transition: width 0.3s var(--pj-ease);
}

.pj-home .pj-more__btn {
    height: auto;
    padding: 15px 32px;
}

.pj-home .pj-more__btn[hidden] {
    display: none;
}

/* ---------- Trust strip ---------- */
.pj-truststrip {
    background: var(--pj-maroon);
}

.pj-home .pj-truststrip__list {
    display: flex;
    gap: 24px;
    padding-top: 36px;
    padding-bottom: 36px;
}

.pj-truststrip__list li {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.pj-truststrip__icon {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--pj-gold-light);
}

.pj-home .pj-truststrip__list li > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: #d9c2b8;
}

.pj-home .pj-truststrip strong {
    font-weight: 500;
    font-size: 15px;
    color: var(--pj-ivory);
}

/* ---------- Buying guide + FAQ ---------- */
.pj-guide {
    background: var(--pj-ivory);
}

.pj-guide__inner {
    display: flex;
    align-items: flex-start;
    gap: 64px;
    padding-top: 80px;
    padding-bottom: 80px;
}

.pj-guide__copy,
.pj-faq {
    flex: 1 1 0;
    min-width: 0;
}

.pj-guide__copy {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pj-home .pj-guide .pj-eyebrow {
    font-size: 12px;
    letter-spacing: 2.64px;
}

.pj-home .pj-guide__title {
    font-family: var(--pj-serif);
    font-weight: 500;
    font-size: 40px;
    line-height: 1.1;
    color: var(--pj-ink);
}

.pj-home .pj-guide__copy p:not(.pj-eyebrow) {
    font-size: 15px;
    line-height: 1.65;
    color: var(--pj-muted);
}

.pj-faq__item {
    border-bottom: 1px solid var(--pj-line);
}

.pj-faq__item:first-child {
    border-top: 1px solid var(--pj-line);
}

.pj-home .pj-faq__q {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 0;
    font-family: var(--pj-serif);
    font-weight: 500;
    font-size: 22px;
    color: var(--pj-ink);
    list-style: none;
    cursor: pointer;
}

.pj-faq__q::-webkit-details-marker {
    display: none;
}

.pj-faq__q .pj-icon {
    margin-left: auto;
    color: var(--pj-ink);
}

.pj-faq__minus,
.pj-faq__item[open] .pj-faq__plus {
    display: none;
}

.pj-faq__item[open] .pj-faq__minus {
    display: inline-block;
}

.pj-home .pj-faq__a {
    margin-top: -12px;
    padding-bottom: 22px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--pj-muted);
}

/* ---------- Laptop ---------- */
@media (max-width: 1199px) {
    .pj-shop__layout {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 32px;
    }

    .pj-home .pj-grid {
        gap: 16px;
    }

    .pj-grid .pj-product__info {
        padding: 16px;
    }

    .pj-home .pj-grid .pj-product__name {
        font-size: 18px;
    }

    .pj-toolbar {
        align-items: flex-start;
    }

    .pj-home .pj-truststrip__list {
        flex-wrap: wrap;
        gap: 24px 32px;
    }

    .pj-truststrip__list li {
        flex: 1 1 calc(50% - 16px);
    }

    .pj-guide__inner {
        gap: 48px;
    }
}

/* ---------- Tablet & mobile: filters become a bottom sheet ---------- */
@media (max-width: 1023px) {
    .pj-shop-head {
        padding: 32px 0;
    }

    .pj-home .pj-shop-head__title {
        font-size: 44px;
    }

    .pj-shop__layout {
        display: block;
        padding-top: 0;
        padding-bottom: 56px;
    }

    .pj-shopbar {
        position: sticky;
        top: var(--pj-header-bottom, 64px);
        z-index: 20;
        display: flex;
        gap: 10px;
        padding: 12px var(--pj-gutter);
        border-bottom: 1px solid var(--pj-line);
        background: var(--pj-ivory);
    }

    .pj-home .pj-shopbar__btn {
        position: relative;
        display: flex;
        flex: 1 1 0;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-width: 0;
        margin: 0;
        padding: 11px 14px;
        border: 1px solid var(--pj-line);
        border-radius: 12px;
        background: #fff;
        font-weight: 500;
        font-size: 13px;
        line-height: normal;
        color: var(--pj-ink);
        white-space: nowrap;
        cursor: pointer;
    }

    .pj-shopbar__sort:focus-within {
        outline: 2px solid var(--pj-gold);
        outline-offset: 2px;
    }

    .pj-home .pj-shopbar__count {
        padding: 1px 7px;
        border-radius: 999px;
        background: var(--pj-maroon);
        font-weight: 600;
        font-size: 11px;
        color: #fff;
    }

    .pj-shopbar__count[hidden] {
        display: none;
    }

    .pj-toolbar {
        display: none;
    }

    .pj-home .pj-results__count {
        display: block;
        padding-top: 16px;
        font-size: 13px;
        color: var(--pj-muted);
    }

    .pj-home .pj-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 14px;
    }

    /* List view is a desktop option */
    .pj-home .pj-grid.is-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .pj-grid.is-list .pj-product {
        flex-direction: column;
    }

    .pj-grid.is-list .pj-product__media {
        width: auto;
        aspect-ratio: 282 / 300;
    }

    .pj-grid.is-list .pj-product__info {
        justify-content: space-between;
        padding: 16px;
    }

    .pj-home .pj-grid.is-list .pj-product__name {
        font-size: 18px;
    }

    /* The sheet */
    .pj-home .pj-filters {
        position: fixed;
        left: 50%;
        bottom: 0;
        z-index: 1100;
        width: 100%;
        max-width: 600px;
        height: min(700px, calc(100% - 64px));
        overflow: hidden;
        border-radius: 24px 24px 0 0;
        background: var(--pj-ivory);
        box-shadow: 0 -12px 40px rgba(28, 20, 20, 0.18);
        transform: translate(-50%, 105%);
        visibility: hidden;
        transition: transform 0.32s var(--pj-ease), visibility 0s linear 0.32s;
    }

    .pj-home .pj-filters.is-open {
        transform: translate(-50%, 0);
        visibility: visible;
        transition: transform 0.32s var(--pj-ease), visibility 0s;
    }

    .pj-filters-overlay {
        position: fixed;
        inset: 0;
        z-index: 1090;
        display: block;
        background: rgba(28, 20, 20, 0.45);
        opacity: 0;
        transition: opacity 0.32s var(--pj-ease);
    }

    .pj-filters-overlay.is-visible {
        opacity: 1;
    }

    .pj-filters-overlay[hidden] {
        display: none;
    }

    body.pj-sheet-open {
        overflow: hidden;
    }

    .pj-filters__head,
    .pj-helpcard {
        display: none;
    }

    .pj-filters__sheet-head {
        display: flex;
        flex: none;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 10px 20px 14px;
    }

    .pj-filters__handle {
        width: 40px;
        height: 4px;
        border-radius: 2px;
        background: #d8cabb;
    }

    .pj-filters__sheet-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .pj-home .pj-filters__close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        padding: 0;
        border: 1px solid var(--pj-line);
        border-radius: 50%;
        background: #fff;
        color: var(--pj-ink);
    }

    .pj-filters__body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 0 20px;
    }

    .pj-filters__foot {
        display: flex;
        flex: none;
        gap: 12px;
        padding: 14px 20px 24px;
        padding-bottom: max(24px, env(safe-area-inset-bottom));
        border-top: 1px solid var(--pj-line);
        background: var(--pj-ivory);
    }

    .pj-home .pj-filters__foot .pj-btn {
        height: auto;
        padding: 14px 20px;
        font-size: 14px;
    }

    .pj-home .pj-filters__foot .pj-btn--primary {
        flex: 1 1 auto;
    }

    .pj-js .pj-filters__nojs {
        display: none;
    }

    .pj-home .pj-truststrip__list li {
        flex: 1 1 calc(50% - 16px);
    }

    .pj-guide__inner {
        flex-direction: column;
        gap: 40px;
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .pj-guide__copy,
    .pj-faq {
        width: 100%;
    }
}

/* ---------- Mobile (Figma 390) ---------- */
@media (max-width: 767px) {
    .pj-shop-head {
        padding: 24px 0;
    }

    .pj-home .pj-crumbs ol {
        gap: 8px;
        margin-bottom: 12px;
        font-size: 12px;
    }

    .pj-crumbs li {
        gap: 8px;
    }

    .pj-home .pj-shop-head__title {
        font-size: 34px;
    }

    .pj-home .pj-shop-head__lead {
        margin-top: 12px;
        font-size: 13px;
    }

    /* One scrolling row of chips, running to the screen edge */
    .pj-chips {
        flex-wrap: nowrap;
        gap: 8px;
        align-self: stretch;
        margin: 12px calc(-1 * var(--pj-gutter)) 0;
        padding: 0 var(--pj-gutter);
        overflow-x: auto;
        scrollbar-width: none;
        scroll-padding: 0 var(--pj-gutter);
    }

    .pj-chips::-webkit-scrollbar {
        display: none;
    }

    .pj-home .pj-chip {
        flex: none;
        height: 36px;
        padding: 2px 14px 2px 2px;
        font-size: 13px;
    }

    .pj-home .pj-chip--all {
        padding: 8px 18px;
    }

    .pj-home .pj-results__count {
        padding-top: 14px;
        font-size: 12px;
    }

    .pj-home .pj-grid,
    .pj-home .pj-grid.is-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 12px;
        margin-top: 14px;
    }

    .pj-grid .pj-product {
        border-radius: 16px;
        box-shadow: 0 4px 16px rgba(59, 13, 15, 0.06);
    }

    .pj-grid .pj-product__media,
    .pj-grid.is-list .pj-product__media {
        aspect-ratio: 169 / 184;
    }

    .pj-home .pj-grid .pj-product__badge {
        left: 8px;
        top: 8px;
        padding: 4px 8px;
        font-size: 8px;
        letter-spacing: 0.8px;
    }

    .pj-home .pj-grid .pj-product__wish {
        right: 8px;
        top: 8px;
        width: 30px;
        height: 30px;
    }

    .pj-grid .pj-product__info,
    .pj-grid.is-list .pj-product__info {
        gap: 10px;
        padding: 12px 12px 14px;
    }

    .pj-product__text {
        gap: 4px;
    }

    .pj-home .pj-grid .pj-product__cat {
        font-size: 9px;
        letter-spacing: 1.26px;
    }

    .pj-home .pj-grid .pj-product__name,
    .pj-home .pj-grid.is-list .pj-product__name {
        font-size: 16px;
        line-height: 1.1;
    }

    .pj-home .pj-grid .pj-product__meta {
        font-size: 11px;
    }

    .pj-grid .pj-product__row {
        padding-top: 6px;
    }

    .pj-home .pj-grid .pj-product__price {
        flex-wrap: wrap;
        gap: 2px 6px;
    }

    .pj-home .pj-grid .pj-product__price span {
        font-size: 15px;
    }

    .pj-home .pj-grid .pj-product__price s {
        font-size: 11px;
    }

    .pj-home .pj-grid .pj-product__buy {
        display: none;
    }

    .pj-more {
        padding-top: 24px;
    }

    .pj-home .pj-more__btn {
        width: 100%;
    }

    /* Full-width sheet on phones */
    .pj-home .pj-filters {
        max-width: none;
    }

    .pj-home .pj-truststrip__list {
        flex-wrap: wrap;
        gap: 20px 14px;
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .pj-home .pj-truststrip__list li {
        flex: 1 1 calc(50% - 7px);
        align-items: flex-start;
        gap: 10px;
    }

    .pj-truststrip__icon {
        width: 37px;
        height: 37px;
    }

    .pj-truststrip__icon .pj-icon {
        width: 14px;
        height: 14px;
    }

    .pj-home .pj-truststrip__list li > span:last-child {
        font-size: 11px;
    }

    .pj-home .pj-truststrip strong {
        font-size: 13px;
    }

    .pj-guide__inner {
        gap: 32px;
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .pj-home .pj-guide__title {
        font-size: 30px;
    }

    .pj-home .pj-guide__copy p:not(.pj-eyebrow) {
        font-size: 14px;
    }

    .pj-home .pj-faq__q {
        font-size: 19px;
    }
}

@media (max-width: 359px) {
    .pj-home .pj-grid,
    .pj-home .pj-grid.is-list {
        gap: 12px 8px;
    }

    .pj-home .pj-shopbar__btn {
        padding: 11px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pj-home .pj-filters,
    .pj-filters-overlay,
    .pj-grid .pj-product.is-new {
        transition: none;
        animation: none;
    }
}

/* Without JavaScript the sheet can't open, so show the filters in the page instead. */
@media (max-width: 1023px) {
    html:not(.pj-js) .pj-home .pj-filters {
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        margin-top: 16px;
        border-radius: 0;
        background: none;
        box-shadow: none;
        transform: none;
        visibility: visible;
    }

    html:not(.pj-js) .pj-filters__sheet-head,
    html:not(.pj-js) .pj-filters__foot,
    html:not(.pj-js) [data-pj-open-filters] {
        display: none;
    }

    html:not(.pj-js) .pj-filters__body {
        padding: 0;
        overflow: visible;
    }
}

/* =====================================================================
   Search results header (Figma: Search Results 173:47305, mobile 173:47734)
   products.php?q=… – the rest of the page is the shop listing above.
   ===================================================================== */
.pj-shop-head__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    align-self: stretch;
}

.pj-shop-head__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.pj-home .pj-shop-head--search .pj-shop-head__title {
    overflow-wrap: anywhere;
}

.pj-home .pj-qbox {
    display: flex;
    flex-direction: row;
    flex: 0 1 460px;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 12px 12px 12px 18px;
    border: 1px solid var(--pj-line);
    border-radius: 999px;
    background: #fff;
    transition: border-color 0.2s var(--pj-ease), box-shadow 0.2s var(--pj-ease);
}

.pj-home .pj-qbox:focus-within {
    border-color: var(--pj-gold);
    box-shadow: 0 0 0 3px rgba(184, 137, 59, 0.15);
}

.pj-qbox > .pj-icon {
    flex-shrink: 0;
    color: var(--pj-ink);
}

.pj-home .pj-qbox input {
    flex: 1 1 0;
    min-width: 0;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    box-shadow: none;
    color: var(--pj-ink);
    font-size: 15px;
    line-height: 23px;
    -webkit-appearance: none;
    appearance: none;
}

.pj-qbox input::-webkit-search-cancel-button,
.pj-qbox input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.pj-home .pj-qbox__clear {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--pj-sand);
    color: var(--pj-muted);
    cursor: pointer;
}

.pj-qbox__clear[hidden] {
    display: none;
}

.pj-shop-head--search .pj-chips {
    margin-top: 20px;
}

@media (max-width: 1023px) {
    .pj-shop-head__row {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .pj-home .pj-qbox {
        flex: none;
        max-width: 460px;
    }
}

@media (max-width: 767px) {
    .pj-shop-head__row {
        gap: 12px;
    }

    .pj-home .pj-qbox {
        max-width: none;
    }

    .pj-home .pj-qbox input {
        font-size: 16px; /* 14px in Figma; 16px stops iOS zooming into the field */
        line-height: 21px;
    }

    .pj-shop-head--search .pj-chips {
        margin-top: 12px;
    }
}
