@import "../category_list.css";
@import "../catalog.css";

.header-top {
    color: var(--black1) !important;
}

.global_logo {
    display: none !important;
}

.global_logo_black {
    display: block !important;
}

#product-info {
    padding: 0 var(--section-padding-x);
}

.form-section {
    padding: var(--section-padding);
    padding-top: var(--section-padding-y);
}

.product-article {
    font-size: var(--text4);
    color: var(--gray1);
    margin-top: 20px;
    margin-bottom: 30px;
}

.price-container {
    .price {
        font-size: 25px !important;
    }
}

.price-new {
    font-size: 25px !important;
}

.color-more {
    font-size: var(--text3);
}

.colors-container--pending {
    visibility: hidden;
}

.buy-button-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.buy-action-button {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
}

.buy-button-container.mobile {
    margin-top: 40px;
    padding: 0 var(--section-padding-x);
}

.product-actions-desktop {
    display: none;
    width: 100%;
}

.product-actions-mobile.product-actions-mobile {
    display: flex;
}

.product-actions-mobile-row {
    width: 100%;
}

@media (min-width: 1200px) {
    .product-actions-desktop {
        display: flex;
    }

    .product-actions-mobile {
        display: none;
    }
}

.product-wishlist-button {
    border: 1px solid var(--black1);
    border-radius: 30px;
    width: 60px;
    flex-shrink: 0;
    margin-left: 10px;
    background-image: url("/image/header/heart.svg");
    background-repeat: no-repeat;
    background-position: center;
}

.product-wishlist-button.active {
    background-image: url("/image/header/heart_fill.svg");

}

@media (max-width: 1599.98px) {
    .product-wishlist-button {
        width: 50px;
    }
}

.configurator-offer {
    font-size: var(--text4);
    color: var(--gray1);
    margin: 20px 0 40px 0 !important;
}

.product-main-image {
    img {
        width: 100%;
        height: 100%;
    }
}

.product-main-row {
    display: flex;
    flex-direction: row;
    flex: 1 1 100%;
    gap: 40px;
}

.product-second-row {
    margin-top: 10px;
    padding: 0 var(--section-padding-x);
    display: flex;
    flex-direction: row;

    .right-side {
        width: 50%;
    }

    .left-side {
        width: 50%;
    }
}

.product-list {
    padding-left: 20px;
    list-style: disc;

}

.recommended-products-section {
    h2 {
        padding-left: var(--section-padding-x);
        padding-top: calc(var(--section-padding-y) * 2);
        margin-bottom: 30px;
    }
}

.color-item {
    margin-left: -21px;
}

.main-row-left {
    width: 50%;
    flex-shrink: 1;
    flex-grow: 0;

    img {
        border-radius: 20px;
    }
}
.main-row-right {
    width: 50%;
    flex-shrink:0;
    min-width: 0;
}

.right-min {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.product-card-container {
    flex: unset;
}

.related-products-container {
    display: flex;
    flex-direction: row;
    padding-left: var(--section-padding-x);
    user-select: none;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
}
.related-products-container:active {
    cursor: grabbing;
}
.related-products-container img {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

.related-products-container::-webkit-scrollbar {
    display: none;
}

.related-products-container {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.product-image {
    padding: 0;
    object-fit: cover;
}

.options-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex-wrap: wrap;
}

.reviews-section {
    .reviews-slider {
        overflow-y: hidden;
    }
}

@media (max-width: 1199.98px) {
    .options-container {
        gap: 10px;
    }

    .left-side {
        display: none;
    }

    .product-second-row {
        flex-direction: column;
        margin-top: 50px;
    }
    .buy-button-container.mobile {

    }
    .right-side {
        width: 100% !important;
    }

    .colors-container {
        margin-bottom: 0;
    }

    #product {
        display: none;
    }

    .color-item {
        img {
            width: 70px;
            height: 70px;
        }
    }

    .related-products-container {
        gap: 10px;
    }

    #form-product,
    #form-product-cart {
        margin-top: 50px;
    }

    h1 {
        max-width: 358px;
    }
}


@media (max-width: 767.98px) {
    .main-row-left {
        width: 100%;

        img {
            height: 100%;
        }
    }

    .main-row-right {
        width: 100%;
    }

    .product-main-row {
        flex-direction: column;
        gap: 40px !important;
    }

    .product-main-row {
        gap: 10px;
    }

    .product-image {
        width: 220px;
        height: 250px;
        img {
            height: 100%;
        }
    }
    .buy-button-container.mobile {
        flex-direction: column;
        gap: 10px;
    }

    .product-actions-mobile-row-secondary {
        display: flex;
        align-items: stretch;
        gap: 10px;
    }

    #button-cart-mobile {
        flex: 1 1 auto;
        width: auto;
    }

    #button-buy-now-mobile {
        width: 100%;
    }

    .product-actions-mobile .product-wishlist-button {
        margin-left: 0;
    }

    .text-alert {
        font-size: 14px;
        max-width: 340px;
    }
    .colors-container {
        max-width: 460px;
    }

    .product-gallery-slider__slide {
        img {
            object-fit: contain;
            background-color: white;
            height: 100%;
        }
    }
}

@media (max-width: 419.98px) {
    .colors-container {
        --mobile-color-size: 70px;
        --mobile-color-overlap: 25px;
        --mobile-color-more-gap: 8px;
    }

    .color-item {
        margin-left: calc(var(--mobile-color-overlap) * -1);

        img {
            width: var(--mobile-color-size);
            height: var(--mobile-color-size);
        }
    }

    .color-more {
        margin-left: var(--mobile-color-more-gap) !important;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .colors-container {
        max-width: 360px;
    }
    .product-actions-mobile {
        flex-direction: row;
        align-items: stretch;
    }

    .product-actions-mobile-row {
        display: contents;
    }

    #button-buy-now-mobile,
    #button-cart-mobile {
        flex: 1 1 0;
        width: auto;
    }

    .product-actions-mobile .product-wishlist-button {
        margin-left: 0;
    }

    .faq-inner-container {
        max-width: 700px;
    }

    .product-main-row {
        gap: 10px;
    }

    .product-image {
        width: 350px;
        height: 280px;
        img {
            height: 100%;
        }
    }

    .main-row-left {
        
        .image {
            background-color: var(--white);
            border-radius: 20px;
        }
        img {
            object-fit: contain;
            max-height: 420px;
            min-height: 360px;
        }
    }

    .text-alert {
        max-width: 380px;
        font-size: 14px;
    }
}

@media (min-width: 1600px) {
    .colors-container {
        max-width: 800px;
    }
    .buy-button-container.mobile {
        display: none;
    }

    .color-item {
        img {
            width: 85px;
            height: 85px;
        }
    }

    .main-row-left {
        width: 100%;

        img {
            min-height: 683px;
            max-height: 683px;
            object-fit: contain;
        }
        .image {
            background-color: var(--white);
            border-radius: 20px;
        }
    }

    .product-image {
        width: 365px;
        height: 360px;
        img {
            height: 100%;
        }
    }

    .related-products-container {
        gap: 20px;
    }

    .reviews-section {
        padding-top: 46px;
    }

    .text-alert {
        display: none !important;

        &.desktop {
            display: block !important;
            max-width: 370px;
        }
    }

    .buy-button-container.mobile {
        display: none;
    }
}



#form-product,
#form-product-cart {
    margin-top: 60px;
    margin-bottom: 20px;
}

.product-form {
    width: 100%;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
}

.form-col {
    display: flex;
    flex-direction: column;
}

#form-product,
#form-product-cart {
    width: 100%;

    input, select {
        padding: 15px;

        border: 1px solid var(--black1);
        border-radius: 40px;
        font-size: var(--text4);
        text-align: center;
        background-color: var(--back);
        line-height: 1;

        &.form-select {
            padding-right: 32px;
        }
    }
    .quantity-group {
        border: 1px solid var(--black1);
        border-radius: 40px;
        padding: 13px;

        input {
            padding: 0 5px;
        }

        button {
            border: 0;
            font-size: var(--text3);
            color: var(--black1);
            padding: 0;
            flex: 1;

            &:active, &:focus {
                background-color: unset;
                color: var(--black1);
            }

            &.js-qty-minus {
                text-align: end;
            }
            &.js-qty-plus {
                text-align: start;
            }
        }
    }


    div.row {
        gap: 10px;
        width: 100%;
        padding: 12px;
        flex-wrap: nowrap;
    }
    .form-col-container {
        width: 114px;
        padding: 0;
    }
    .form-label {
        font-size: var(--text3);
    }

    #input-quantity {
        border: 0;
    }

    input {
        padding: 15px;
        border: 1px solid var(--black1);
        border-radius: 40px;
        font-size: var(--text4);
        text-align: center;
        background-color: var(--back);
        line-height: 1;
    }

    /* ===== Custom select ===== */

    .custom-select {
        position: relative;
        width: 100%;
    }

    .custom-select__trigger {
        width: 100%;
        padding: 15px;

        border: 1px solid var(--black1);
        border-radius: 40px;
        font-size: var(--text4);
        text-align: center;
        background-color: var(--back);
        line-height: 1;

        cursor: pointer;
    }

    .custom-select__value {
        display: block;
        pointer-events: none;
        white-space: nowrap;
    }

    .custom-select__list {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;

        margin-top: 8px;
        padding: 6px 0;

        background-color: var(--back);
        border: 1px solid var(--black1);
        border-radius: 24px;

        list-style: none;
        z-index: 1000;

        max-height: 240px;
        overflow-y: auto;

        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);

        transition:
                opacity 0.18s ease,
                transform 0.22s ease,
                visibility 0.18s ease;
    }

    .custom-select.open .custom-select__list {

        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .custom-select__option {
        padding: 10px 12px;
        font-size: var(--text4);
        text-align: center;
        cursor: pointer;
    }

    /* ===== Quantity ===== */

    .quantity-group {
        border: 1px solid var(--black1);
        border-radius: 40px;
        padding: 13px;

        input {
            padding: 0 5px;
            border: 0;
        }

        button {
            border: 0;
            font-size: var(--text3);
            color: var(--black1);
            padding: 0;
            flex: 1;

            &:active,
            &:focus {
                background-color: unset;
                color: var(--black1);
            }

            &.js-qty-minus {
                text-align: end;
            }

            &.js-qty-plus {
                text-align: start;
            }
        }
    }

    /* ===== Layout ===== */

    .row {
        gap: 10px;
        width: 100%;
        padding: 12px;
        flex-wrap: nowrap;
    }

    .form-col-container {
        width: 114px;
        padding: 0;
        overflow: visible; // важно для выпадающего списка
    }

    .form-label {
        font-size: var(--text3);
    }

    #input-quantity {
        border: 0;
    }

    .custom-select__trigger {
        position: relative;
        padding-right: 30px;

        &::after {
            content: '';
            position: absolute;
            top: 50%;
            right: 14px;

            width: 10px;
            height: 6px;

            background: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23000' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")
            no-repeat center / contain;

            transform: translateY(-50%);
            transition: transform 0.25s ease;
            pointer-events: none;
        }
    }

    .custom-select.open .custom-select__trigger::after {
        transform: translateY(-50%) rotate(180deg);
    }
}


.form-col select,
.form-col input {
    width: 100%;
}

.quantity-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quantity-wrapper input {
    text-align: center;
}

.qty-btn {
    cursor: pointer;
    user-select: none;
}


.reviews-slider {
    user-select: none;
    cursor: grab;
}

.reviews-slider.is-dragging {
    cursor: grabbing;
}

.reviews-slider img {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

input#input-option-256 {
    height: 48px !important;
}

.input-group.quantity-group {
    .btn {
        line-height: 1;
    }
}



@media (max-width: 1199.98px) {
    .reviews-section {
        padding-top: calc(var(--section-padding-y) * 2) ;
    }
}

@media (min-width: 1200px) and (max-width: 1599.98px) {
    .main-row-left,
    .main-row-right {
        width: auto;
        flex: 1 1 0;
    }

    .product-second-row .left-side,
    .product-second-row .right-side {
        width: auto;
        flex: 1 1 0;
        min-width: 0;
    }

    .reviews-section {
        padding-top: 100px;
    }

    .related-products-container {
        gap: 20px;
    }

    .product-image {
        width: 270px;
        height: 266px;
        img {
            width: 270px;
            height: 266px;
        }
    }

    .product-gallery-slider__slide {
        background-color: var(--white);
        border-radius: 20px;
        img {
            height: 43.3vw;
            max-height: 605.4px;
            object-fit: contain;
        }
    }

    .main-row-right {
        max-height: 625.4px;
    }

    h1 {
        max-width: 560px;
    }

    .buy-button-container.mobile {
        display: none;
    }
    .colors-container {
        max-width: 430px;
    }
}


.form-section {
    padding-top: calc(var(--section-padding-y) * 2) ;
}

@media (min-width: 1920px) {
    #form-product,
    #form-product-cart {
        .form-col-container {
            width: auto;
            padding: 0;
        }
    }

    .text-alert.desktop {
        max-width: 25vw;
    }

    #form-product, #form-product-cart {
        .custom-select__trigger {
            width: auto;
        }

        .quantity-group {
            max-width: 120px;
        }
    }


}

.page-product {
    .product-card-container {
        .price-new {
            font-size: var(--text4) !important;
        }
    }
}

.text-alert {
    font-size: 14px;
}

/* Prevent configurator.css global rules from breaking product layout */
.page-product h1 {
    margin-bottom: 0;
}

.page-product .one-click-remove-wrap {
    display: none;
}

.product-one-click-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translate(-50%, 12px);
    padding: 14px 22px;
    border-radius: 24px;
    background: rgb(187, 196, 197);
    color: var(--black1);
    font-size: 16px;
    line-height: 1.35;
    text-align: center;
    max-width: min(92vw, 520px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 2005;
    pointer-events: none;
}

.product-one-click-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}
