.product-page {
    padding-block: 16px 48px;
}

.product-page__content {
    display: grid;
    grid-template-columns: minmax(0, 774px) minmax(0, 546px);
    gap: 24px;
    align-items: start;
    padding-bottom: 48px;
}

.product-gallery__stage {
    position: relative;
    display: grid;
    height: 580px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
    border-radius: 12px;
    background: #f4f4f4;
}

.product-gallery__image {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    grid-area: 1 / 1;
    object-fit: contain;
    object-position: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.product-gallery__image.is-active,
.product-gallery__image:only-of-type {
    opacity: 1;
    pointer-events: auto;
}

.product-gallery__badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    padding: 2px 6px;
    color: #ffffff;
    background: #000000;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
}

.product-gallery__favorite,
.product-gallery__arrow {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    padding: 0;
    background: #ffffff;
}

.product-gallery__favorite {
    top: 8px;
    right: 8px;
    font-size: 26px;
    line-height: 1;
}

.product-gallery__favorite[aria-pressed="true"] {
    color: #ffffff;
    background: #010101;
}

.product-gallery__arrow {
    top: calc(50% - 20px);
}

.product-gallery__arrow--prev {
    left: 8px;
}

.product-gallery__arrow--next {
    right: 8px;
}

.product-gallery__dots {
    position: absolute;
    z-index: 2;
    bottom: 6px;
    left: 50%;
    display: flex;
    gap: 4px;
    transform: translateX(-50%);
}

.product-gallery__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    padding: 0;
    background: rgba(0, 0, 0, 0.2);
}

.product-gallery__dot.is-active {
    background: #000000;
}

.product-page__purchase {
    display: flex;
    min-height: 512px;
    flex-direction: column;
    border-radius: 16px;
    padding: 24px;
    background: #ffffff;
    box-shadow: 0 4px 60px rgba(0, 0, 0, 0.1);
}

.product-page__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(0, 0, 0, 0.4);
    font-size: 14px;
    line-height: 20px;
}

.product-page__availability {
    color: #82b443;
}

.product-page__title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 32px;
    letter-spacing: 0;
}

.product-page__meta + .product-page__title {
    margin-top: 4px;
}

.product-page__intro,
.product-tabs__panel {
    color: rgba(0, 0, 0, 0.4);
    font-size: 14px;
    line-height: 20px;
}

.product-page__title + .product-page__intro {
    margin-top: 4px;
}

.product-page__intro p,
.product-tabs__panel p {
    margin: 0 0 16px;
}

.product-page__intro p:last-child,
.product-tabs__panel p:last-child {
    margin-bottom: 0;
}

.product-page__properties {
    display: grid;
    margin: 12px 0 0;
}

.product-page__property,
.product-tabs__properties > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-block: 4px;
    font-size: 14px;
    line-height: 20px;
}

.product-page__property:last-child {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.product-page__property dt,
.product-tabs__properties dt {
    color: rgba(0, 0, 0, 0.4);
}

.product-page__property dd,
.product-tabs__properties dd {
    margin: 0;
    color: #000000;
}

.product-page__price {
    margin: auto 0 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 40px;
}

.product-page__price del {
    margin-left: 8px;
    color: rgba(0, 0, 0, 0.4);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.product-page__actions {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.product-page__quantity {
    display: grid;
    height: 56px;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    border-radius: 8px;
    background: #f3f3f3;
}

.product-page__quantity button {
    display: inline-flex;
    width: 36px;
    height: 56px;
    align-items: center;
    justify-content: center;
    justify-self: center;
    padding: 0;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
}

.product-page__quantity output {
    min-width: 20px;
    text-align: center;
    font-size: 16px;
    line-height: 24px;
}

.product-page__add,
.product-page__one-click {
    display: inline-flex;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    padding: 16px 24px;
    font-size: 14px;
    line-height: 24px;
}

.product-page__add {
    color: #ffffff;
    background: #010101;
}

.product-page__add.is-added {
    background: #3b68db;
}

.product-page__add.is-error {
    background: #bd2d2d;
}

.product-page__one-click {
    width: 100%;
    margin-top: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.product-tabs {
    max-width: 1344px;
}

.product-tabs__list {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.product-tabs__tab {
    min-height: 56px;
    flex: 0 0 auto;
    padding: 0 16px;
    color: rgba(0, 0, 0, 0.4);
    font-size: 14px;
    font-weight: 700;
    line-height: 20px;
}

.product-tabs__tab:first-child {
    padding-left: 0;
}

.product-tabs__tab.is-active {
    color: #000000;
    box-shadow: inset 0 -2px #000000;
}

.product-tabs__panel {
    display: none;
    max-width: 752px;
    padding-top: 20px;
    color: #000000;
}

.product-tabs__panel.is-active {
    display: block;
}

.product-tabs__properties {
    margin: 0;
}

.product-related {
    padding-block: 16px 48px;
}

@media (max-width: 1199px) {
    .product-page__content {
        grid-template-columns: minmax(0, 1fr) minmax(420px, 0.7fr);
    }

    .product-gallery__stage {
        height: min(580px, 52vw);
    }
}

@media (max-width: 899px) {
    .product-page__content {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-gallery__stage {
        height: min(580px, 72vw);
    }

    .product-page__purchase {
        min-height: 0;
    }

    .product-page__price {
        margin-top: 24px;
    }
}

@media (max-width: 767px) {
    .product-page {
        padding-block: 8px 32px;
    }

    .product-page__content {
        gap: 16px;
        padding-bottom: 32px;
    }

    .product-gallery__stage {
        height: calc((100vw - 32px) * 0.78);
        min-height: 288px;
        border-radius: 12px;
    }

    .product-page__purchase {
        border-radius: 12px;
        padding: 16px;
    }

    .product-page__title {
        font-size: 26px;
        line-height: 30px;
    }

    .product-page__property,
    .product-tabs__properties > div {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 12px;
    }

    .product-page__actions {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .product-page__quantity button {
        width: 32px;
    }

    .product-tabs__tab {
        padding-inline: 12px;
    }

    .product-tabs__panel {
        padding-top: 16px;
    }
}
