.products-page__title {
    text-transform: none;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.products-card {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--soft-line);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.products-card:hover,
.products-card:focus-visible {
    border-color: var(--line);
    box-shadow: 0 0 0 1px rgba(255, 45, 33, 0.22), var(--shadow);
}

.products-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* opacity: 1; */
}

.products-card__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.products-card__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
}

.products-card__name {
    position: relative;
    display: inline-block;
    width: fit-content;
    margin: 0;
    padding: 0.18rem 0.3rem;
    font-size: 1.35rem;
    font-weight: 700;
    text-shadow:
        0 0 10px rgba(0, 0, 0, 0.42),
        0 0 22px rgba(0, 0, 0, 0.24),
        0 1px 6px rgba(0, 0, 0, 0.34);
}

.products-card__name::before {
    content: none;
}

.product-detail__hero {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(360px, 2fr);
    gap: 2rem;
    align-items: start;
}

.product-detail__image-frame,
.product-detail__thumb {
    border: 1px solid var(--soft-line);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: var(--shadow);
}

.product-detail__media {
    display: grid;
    gap: 1rem;
}

.product-detail__copy {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100%;
    padding: 2rem;
}

.product-detail__title {
    margin: 0;
    font-size: clamp(1.7rem, 2.8vw, 2.8rem);
    line-height: 1.02;
    text-transform: none;
}

.product-detail__description {
    line-height: 1.75;
}

.product-detail__image-frame {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.product-detail__image-trigger {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.product-detail__image,
.product-detail__thumb-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-detail__thumbs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3rem) / 4);
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
}

.product-detail__thumb {
    padding: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.product-detail__thumb:hover,
.product-detail__thumb:focus-visible,
.product-detail__thumb.is-active {
    border-color: var(--line);
    box-shadow: 0 0 0 1px rgba(255, 45, 33, 0.22), var(--shadow);
}

.product-detail__thumb:not(.is-active) {
    opacity: 0.75;
}

.product-detail__links {
    display: grid;
    gap: 0.75rem;
}

.product-detail__link {
    width: 100%;
    background: rgba(255, 45, 33, 0.08);
}

.product-detail__link:hover,
.product-detail__link:focus-visible {
    background: rgba(255, 45, 33, 0.16);
    border-color: var(--line);
}

.product-image-modal-open {
    overflow: hidden;
}

.product-image-modal[hidden] {
    display: none;
}

.product-image-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.product-image-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
}

.product-image-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(92vw, 1100px);
    max-height: 92vh;
    padding: 0.75rem;
    border: 1px solid var(--soft-line);
    background: rgba(12, 12, 12, 0.96);
    box-shadow: var(--shadow);
}

.product-image-modal__image {
    display: block;
    width: 100%;
    max-height: calc(92vh - 1.5rem);
    object-fit: contain;
}

.product-image-modal__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--soft-line);
    background: #000;
    color: var(--text);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.product-image-modal__close:hover,
.product-image-modal__close:focus-visible {
    border-color: var(--line);
}

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-detail__hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-image-modal {
        padding: 0.75rem;
    }

    .product-image-modal__dialog {
        width: 100%;
        padding: 0.5rem;
    }
}
