.product-index {
    padding: clamp(4rem, 8vw, 8rem) clamp(1.25rem, 5vw, 5rem);
    background: #fff;
    color: #171717;
}

.product-index-heading {
    max-width: 52rem;
    margin: 0 auto clamp(2.5rem, 5vw, 4.5rem);
    text-align: center;
}

.product-index-heading p {
    margin: 0 0 1rem;
    font-size: 0.66rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.product-index-heading h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 3.4vw, 3.5rem);
    font-weight: 400;
}

.product-index-tools,
.product-index-filters,
.product-index-count,
.product-index-grid,
.product-index-empty {
    max-width: 92rem;
    margin-inline: auto;
}

.product-index-tools {
    display: grid;
    max-width: 42rem;
    margin-bottom: 2.5rem;
    gap: 0.65rem;
}

.product-index-tools label {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.product-index-tools input {
    width: 100%;
    padding: 1rem 0;
    border: 0;
    border-bottom: 1px solid rgb(17 17 17 / 32%);
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 1.1rem;
}

.product-index-tools input:focus-visible {
    border-color: #171717;
    outline: 2px solid transparent;
}

.product-index-filters {
    display: flex;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    border-bottom: 1px solid rgb(17 17 17 / 17%);
    gap: 0.35rem;
}

.product-index-filters button {
    padding: 0.85rem 1rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #77726b;
    cursor: pointer;
    font: inherit;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: none;
    white-space: nowrap;
}

.product-index-filters button[aria-pressed="true"] {
    border-color: #171717;
    color: #171717;
}

.product-index-count {
    margin-bottom: 2rem;
    color: #77726b;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-align: end;
    text-transform: uppercase;
}

.product-index-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(2rem, 4vw, 5rem) clamp(1rem, 2.2vw, 2.5rem);
}

.product-index-card[hidden] {
    display: none;
}

.product-index-card {
    position: relative;
    container-type: inline-size;
}

.product-index-card a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.product-index-favorite {
    position: absolute;
    z-index: 2;
    right: 0;
    top: calc(56.25cqi + 1rem);
}

.product-index-copy {
    padding-inline-end: 3.5rem;
}

.product-index-image {
    position: relative;
    display: grid;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #f1efe9;
    place-items: center;
}

.product-index-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 350ms ease, transform 500ms ease;
}

.product-index-image-hover {
    opacity: 0;
}

.product-index-card a:hover .product-index-image-primary,
.product-index-card a:focus-visible .product-index-image-primary {
    opacity: 0;
}

.product-index-card a:hover .product-index-image-hover,
.product-index-card a:focus-visible .product-index-image-hover {
    opacity: 1;
}

.product-index-card a:hover img,
.product-index-card a:focus-visible img {
    transform: scale(1.025);
}

.product-index-copy {
    display: grid;
    padding-top: 1rem;
    gap: 0.45rem;
}

.product-index-copy small,
.product-index-copy > span {
    color: #77726b;
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.product-index-copy small {
    letter-spacing: 0.06em;
    text-transform: none;
}

.product-index-copy strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.2rem, 1.7vw, 1.65rem);
    font-weight: 400;
}

.product-index-empty {
    padding: 4rem 1rem;
    text-align: center;
}

@media (max-width: 64rem) {
    .product-index-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 40rem) {
    .product-index-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-index-image img {
        transition: none;
    }
}
