/* Product layout for the mobile stylesheet linked by the product view. */
.product-hero.product-hero--mobile {
    grid-template-columns: minmax(0, 1fr);
    row-gap: .95rem;
    padding-block-start: .8rem;
    padding-inline: 1rem;
}

.product-hero--mobile .product-gallery {
    --product-photo-size: clamp(12.5rem, 61vw, 15rem);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: .55rem;
}

.product-hero--mobile .product-main-image {
    flex: 0 1 var(--product-photo-size);
    min-inline-size: 0;
}

.product-hero--mobile .product-main-image > img,
.product-hero--mobile .product-main-image > picture > img {
    min-inline-size: 0;
    min-block-size: 0;
    object-fit: contain;
}

.product-hero--mobile .product-thumbnails {
    flex: 0 0 3.75rem;
    flex-direction: column;
    gap: .32rem;
    max-block-size: var(--product-photo-size);
    margin: 0;
    padding: .25rem;
    overflow: hidden auto;
    scrollbar-width: thin;
}

.product-hero--mobile .product-thumbnails :is(button, a[data-gallery-image]) {
    flex: 0 0 2.75rem;
    inline-size: 2.75rem;
    block-size: 2.75rem;
}

.product-hero--mobile .product-purchase {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: .38rem;
    scroll-margin-block-start: 5.25rem;
}

/* The summary is plain text. Keep the order of all interactive controls. */
.product-hero--mobile .product-purchase > :is(
    .eyebrow, h1, .product-rating, .product-page-badges, .product-page-price,
    .stock-message, .product-buy-form, .waitlist-form
) {
    order: -1;
}

.product-hero--mobile .product-purchase h1 {
    font-size: clamp(1.7rem, 6vw, 2.35rem);
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.product-hero--mobile .product-purchase > :is(
    .eyebrow, .product-rating, .product-page-badges, .product-page-price, .stock-message
) {
    margin-block: 0;
}

.product-hero--mobile .product-page-badges:empty {
    display: none;
}

.product-hero--mobile .product-page-price {
    flex-wrap: wrap;
    gap: .15rem .6rem;
}

.product-hero--mobile .product-page-price strong {
    font-size: 1.85rem;
}

.product-hero--mobile .product-summary {
    margin-block: .45rem;
}

.product-hero--mobile .product-buy-form {
    grid-template-columns: 4.45rem minmax(0, 1fr);
    align-items: end;
    gap: .5rem;
    margin-block-start: .2rem;
}

.product-hero--mobile .product-buy-form > .product-variation {
    grid-column: 1 / -1;
}

.product-hero--mobile .product-buy-form :is(input[type="number"], select) {
    font-size: 1rem;
    padding: .5rem .55rem;
}

.product-hero--mobile .product-buy-actions {
    position: static;
    grid-column: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .4rem;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.product-hero--mobile .product-buy-actions .public-button {
    min-inline-size: 0;
    min-block-size: 46px;
    padding: .5rem .4rem;
    font-size: .78rem;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
}

@media (max-width: 360px) {
    .product-hero--mobile .product-buy-actions {
        grid-column: 1 / -1;
    }
}
