.react-product-page {
    background: var(--theme-background);
    color: var(--theme-text);
    font-family: var(--theme-font-family);
}

.react-product-page * {
    box-sizing: border-box;
}

.rtd-container {
    width: min(100% - 30px, 1320px);
    margin: 0 auto;
}

.rtd-main {
    padding: 34px 0;
}

.rtd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr);
    gap: 42px;
    align-items: start;
}

.rtd-gallery-main {
    background: var(--theme-box-background);
}

.rtd-gallery-main img {
    display: block;
    width: 100%;
    aspect-ratio: 5 / 7;
    object-fit: cover;
}

.rtd-thumbs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.rtd-thumb {
    padding: 0;
    border: 1px solid transparent;
    background: var(--theme-box-background);
    cursor: pointer;
}

.rtd-thumb.active {
    border-color: var(--theme-button-background);
}

.rtd-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 5 / 7;
    object-fit: cover;
}

.rtd-info {
    position: sticky;
    top: 88px;
}

.rtd-title {
    margin: 0 0 12px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0;
}

.rtd-about {
    margin: 0 0 16px;
    color: color-mix(in srgb, var(--theme-text), transparent 25%);
    line-height: 1.65;
}

.rtd-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 18px;
}

.rtd-price {
    font-size: 22px;
    font-weight: 600;
}

.rtd-old-price {
    opacity: .58;
    text-decoration: line-through;
}

.rtd-badge {
    display: inline-flex;
    padding: 6px 10px;
    background: var(--theme-button-background);
    color: var(--theme-button-text);
    font-size: 12px;
}

.rtd-option {
    margin-top: 18px;
}

.rtd-option-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.rtd-choice-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rtd-choice {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid color-mix(in srgb, var(--theme-text), transparent 78%);
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.rtd-choice.active {
    border-color: var(--theme-button-background);
    background: var(--theme-button-background);
    color: var(--theme-button-text);
}

.rtd-choice:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.rtd-field,
.rtd-select {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid color-mix(in srgb, var(--theme-text), transparent 78%);
    background: var(--theme-background);
    color: var(--theme-text);
    font: inherit;
}

.rtd-qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

.rtd-qty {
    display: inline-grid;
    grid-template-columns: 38px 50px 38px;
    min-height: 38px;
    border: 1px solid color-mix(in srgb, var(--theme-text), transparent 78%);
}

.rtd-qty button,
.rtd-qty input {
    border: 0;
    background: transparent;
    color: inherit;
    text-align: center;
    font: inherit;
}

.rtd-qty button {
    cursor: pointer;
}

.rtd-submit {
    width: 100%;
    min-height: 46px;
    margin-top: 18px;
    border: 1px solid var(--theme-button-background);
    background: var(--theme-button-background);
    color: var(--theme-button-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.rtd-submit:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.rtd-error {
    margin-top: 10px;
    color: #b42318;
    font-size: 13px;
}

.rtd-sizechart {
    display: inline-flex;
    margin-top: 10px;
    color: inherit;
    font-weight: 600;
}

.rtd-description,
.rtd-related {
    padding: 28px 0;
}

.rtd-section-title {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 600;
}

.rtd-description-body {
    line-height: 1.75;
}

.rtd-related-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 14px;
}

.rtd-product-card {
    color: inherit;
    text-decoration: none;
}

.rtd-product-card a:first-child {
    display: block;
    aspect-ratio: 5 / 7;
    overflow: hidden;
    background: var(--theme-box-background);
}

.rtd-product-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rtd-product-card-title {
    display: block;
    min-height: 40px;
    margin-top: 10px;
    color: inherit;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.35;
}

.rtd-product-card-price {
    margin-top: 5px;
    text-align: center;
    font-size: 14px;
}

@media (max-width: 991px) {
    .rtd-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .rtd-info {
        position: static;
    }

    .rtd-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .rtd-container {
        width: min(100% - 20px, 1320px);
    }

    .rtd-main {
        padding: 24px 0;
    }

    .rtd-thumbs {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.rtd-payment-widgets {
    display: grid;
    gap: 10px;
    margin: -4px 0 18px;
}

.rtd-payment-widgets iframe,
.rtd-payment-widgets deema-widget,
.rtd-payment-widgets tamara-widget {
    display: block;
    width: 100%;
}
