.products {
    padding: 64px 0;
    background-color: var(--theme-page);
    border-top: 1px solid var(--theme-line);
    border-bottom: 1px solid var(--theme-line);
}

.products__header {
    max-width: 620px;
    margin-bottom: 32px;
}

.products__label {
    margin: 0 0 6px;
    color: var(--brand-primary);
    font-size: .9rem;
    font-weight: 600;
}

.site .products__title {
    margin: 0;
    /* font-size: clamp(1.75rem, 1.1rem + 1.6vw, 2.5rem); */
    font-weight: 600;
    line-height: 1.3;
    text-wrap: balance;
}

.products__intro {
    margin: 10px 0 0;
    color: var(--theme-muted);
    font-size: .95rem;
    line-height: 1.75;
}

.products__empty {
    margin: 0;
    padding: 40px;
    border: 1px dashed var(--theme-line);
    border-radius: 20px;
    color: var(--theme-muted);
    text-align: center;
}

.products__list {
    display: grid;
    gap: 20px;
}

.product {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--theme-line);
    border-radius: 20px;
    background-color: var(--theme-surface);
    transition: border-color .3s ease, box-shadow .4s ease;
}

.product:hover {
    border-color: var(--input-border-hover);
    box-shadow: var(--shadow-lg);
}

.product--with-media {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.product__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 32px;
}

.product__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.product__platform,
.product__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 500;
}

.product__platform {
    border: 1px solid var(--theme-line);
    color: var(--theme-text);
}

.product__platform i {
    color: var(--brand-primary);
    font-size: .8rem;
}

.product__status {
    background-color: rgba(245, 158, 11, .12);
    color: #B45309;
}

.site .product__name {
    margin: 0 0 8px;
    font-size: clamp(1.15rem, 1.05rem + .4vw, 1.35rem);
    font-weight: 600;
}

.product__text {
    max-width: 620px;
    margin: 0 0 18px;
    color: var(--theme-muted);
    font-size: .95rem;
    line-height: 1.8;
}

.product__features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 20px;
    width: 100%;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.product__features li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: .9rem;
    line-height: 1.6;
}

.product__features i {
    color: var(--brand-primary);
    font-size: .85rem;
}

.product__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.product__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--theme-line);
    border-radius: 10px;
    font-size: .9rem;
    color: var(--theme-text) !important;
    font-weight: 600;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}

.product__link:hover {
    border-color: var(--brand-primary);
    background-color: var(--brand-primary);
    color: #FFFFFF !important;
}

.product__link--primary {
    border-color: var(--brand-primary);
    background-color: var(--brand-primary);
    color: #FFFFFF !important;
}

.product__link--primary:hover {
    border-color: var(--brand-primary-deep);
    background-color: var(--brand-primary-deep);
}

.site .product__name a {
    color: inherit;
}

.site .product__name a:hover {
    color: var(--brand-primary);
}

.product-hero .product__meta {
    margin-bottom: 18px;
}

.gallery {
    position: relative;
    max-width: 1040px;
    margin: 48px auto 0;
}

.gallery__track {
    display: flex;
    overflow-x: auto;
    border: 1px solid var(--theme-line);
    border-radius: 22px;
    background-color: var(--theme-page);
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.gallery__track::-webkit-scrollbar {
    display: none;
}

.gallery__slide {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    scroll-snap-align: center;
    cursor: zoom-in;
}

.site .gallery__slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery__nav {
    position: absolute;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--theme-line);
    border-radius: 50%;
    background-color: var(--theme-surface);
    color: var(--theme-text);
    box-shadow: 0 10px 24px -12px rgb(15 23 42 / .35);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}

.gallery__nav:hover,
.gallery__nav:focus-visible {
    border-color: var(--brand-primary);
    background-color: var(--brand-primary);
    color: #FFFFFF;
}

.gallery__nav:disabled {
    opacity: 0;
    pointer-events: none;
}

.gallery__nav--prev {
    inset-inline-start: -24px;
}

.gallery__nav--next {
    inset-inline-end: -24px;
}

.gallery__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.gallery__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background-color: var(--theme-line);
    cursor: pointer;
    transition: width .25s ease, background-color .25s ease;
}

.gallery__dot.is-active {
    width: 28px;
    background-color: var(--brand-primary);
}

@media (max-width: 1199.98px) {
    .gallery__nav--prev {
        inset-inline-start: 12px;
    }

    .gallery__nav--next {
        inset-inline-end: 12px;
    }
}

@media (max-width: 575.98px) {
    .gallery {
        margin-top: 28px;
    }

    .gallery__track {
        border-radius: 16px;
    }

    .gallery__nav {
        width: 38px;
        height: 38px;
    }
}

.product__link:active {
    transform: scale(.97);
}

.product__media {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: var(--theme-page);
}

/* The image keeps its natural ratio and stays pinned while a long feature
   list scrolls past, instead of being stretched to the card's height. */
.product__media-link {
    position: sticky;
    top: 120px;
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 14px;
    cursor: zoom-in;
}

.site .product__media img {
    display: block;
    width: 100%;
    height: auto;
}

@media (max-width: 991.98px) {
    .products {
        padding: 56px 0;
    }

    .products__header {
        grid-template-columns: 1fr;
        margin-bottom: 28px;
    }

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

    .product__media {
        order: -1;
        padding: 20px;
    }

    .product__media-link {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .product {
        border-radius: 18px;
    }

    .product__body {
        padding: 22px 18px;
    }

    .product__features {
        grid-template-columns: minmax(0, 1fr);
    }

    .product__link {
        width: 100%;
        justify-content: center;
    }
}