/* =====================================================
   CONSTRUCTOR.CSS
===================================================== */


/* =====================================================
   КОНСТРУКТОР — ОСНОВНАЯ ГЕОМЕТРИЯ
===================================================== */

body.single-product:has(.frame-constructor-wrap) div.product {
    display: block !important;
}

body.single-product:has(.frame-constructor-wrap) div.product > .woocommerce-product-gallery,
body.single-product:has(.frame-constructor-wrap) div.product > .summary,
body.single-product:has(.frame-constructor-wrap) .woocommerce-tabs,
body.single-product:has(.frame-constructor-wrap) .related,
body.single-product:has(.frame-constructor-wrap) .upsells {
    display: none !important;
}

body.single-product:has(.frame-constructor-wrap) .col-full,
body.single-product:has(.frame-constructor-wrap) .site-main {
    max-width: 1300px !important;
    width: 94vw !important;

    margin-left: auto !important;
    margin-right: auto !important;
}

body.single-product:has(.frame-constructor-wrap) .frame-constructor-wrap {
    width: 100% !important;
    max-width: 1300px !important;

    margin: 0 auto 40px auto !important;

    padding-top: 18px !important;

    border-top: 1px solid rgba(0,0,0,0.15);
}


/* =====================================================
   LAYOUT
===================================================== */

body.single-product:has(.frame-constructor-wrap) .constructor-layout {
    display: grid !important;

    grid-template-columns:
        minmax(0, 66%)
        minmax(360px, 34%) !important;

    gap: 22px !important;

    align-items: start !important;
}

.constructor-main-title {
    font-size: 32px !important;
    font-weight: 600 !important;

    margin: 0 0 22px 0 !important;
}

.constructor-product-title {
    font-size: 22px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;

    margin: 0 0 18px 0 !important;
}


/* =====================================================
   CANVAS
===================================================== */

.frame-canvas-wrap {
    width: 100% !important;

    padding: 8px !important;

    margin: 0 auto 14px auto !important;

    background: rgba(255,255,255,0.3) !important;

    border-radius: 18px !important;
}

#frameCanvas {
    width: 100% !important;
    height: auto !important;

    display: block !important;

    margin: 0 auto !important;

    background: #d8cfb8 !important;

    border-radius: 14px !important;
}


/* =====================================================
   УПРАВЛЕНИЕ
===================================================== */

.frame-size-controls {
    display: flex !important;
    flex-direction: column !important;

    gap: 16px !important;

    margin: 0 0 18px 0 !important;
}

.frame-mode-row {
    display: flex !important;

    gap: 10px !important;

    flex-wrap: wrap !important;
}

.frame-mode-row label,
.frame-pack-label {
    font-size: 17px !important;
    font-weight: 600 !important;
}

.frame-width-label {
    font-size: 20px !important;
    font-weight: 700 !important;
}

.frame-width-label input {
    width: 105px !important;

    margin-left: 10px !important;

    padding: 10px !important;

    font-size: 24px !important;
    font-weight: 700 !important;

    border-radius: 10px !important;

    border: 2px solid #333 !important;
}


/* =====================================================
   SELECTED INFO
===================================================== */

.selected-frame-info {
    font-size: 17px !important;
    line-height: 1.35 !important;

    padding: 12px !important;

    background: rgba(255,255,255,0.55) !important;

    border-radius: 12px !important;

    margin-bottom: 18px !important;
}


/* =====================================================
   БАГЕТЫ
===================================================== */

.frame-grid {
    display: flex !important;

    flex-wrap: nowrap !important;

    gap: 12px !important;

    overflow-x: auto !important;

    padding-bottom: 18px !important;
}

.frame-item {
    flex: 0 0 135px !important;

    width: 135px !important;

    background: #fff !important;

    border-radius: 16px !important;

    overflow: hidden !important;

    cursor: pointer !important;

    border: 3px solid transparent !important;

    transition: .2s !important;
}

.frame-item:hover {
    transform: translateY(-4px);
}

.frame-item.active-frame {
    border-color: #1b2738 !important;
}

.frame-item img,
.no-frame-preview {
    width: 135px !important;
    height: 88px !important;

    object-fit: cover !important;
}

.frame-title {
    font-size: 16px !important;
    font-weight: 700 !important;

    padding: 8px 8px 0 !important;
}

.frame-meta {
    font-size: 14px !important;

    padding: 6px 8px 10px !important;

    color: #555 !important;
}


/* =====================================================
   ЦЕНА / РАСЧЕТ
===================================================== */

body.single-product:has(.frame-constructor-wrap) .constructor-bottom {
    width: calc(66% - 24px) !important;

    position: relative !important;

    top: -220px !important;

    display: grid !important;

    grid-template-columns:
        minmax(0, 1fr)
        285px !important;

    gap: 20px !important;
}

body.single-product:has(#customerImageInput) .constructor-bottom {
    top: -340px !important;
}

.frame-calc-info {
    font-size: 18px !important;
    line-height: 1.45 !important;

    background: rgba(255,255,255,0.65) !important;

    padding: 18px !important;

    border-radius: 16px !important;
}

.constructor-total-box {
    background: #1b2738 !important;
    color: #fff !important;

    border-radius: 16px !important;

    padding: 22px !important;

    font-size: 26px !important;
    font-weight: 900 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    text-align: center !important;
}


/* =====================================================
   КОРЗИНА
===================================================== */

.constructor-cart-form {
    width: calc(66% - 24px) !important;
}

body.single-product:has(.frame-constructor-wrap)
form.constructor-cart-form {
    position: relative !important;

    top: -200px !important;
}

body.single-product:has(#customerImageInput)
form.constructor-cart-form {
    top: -325px !important;
}

.constructor-add-cart-button {
    width: 100% !important;
    max-width: 420px !important;

    padding: 18px 28px !important;

    font-size: 24px !important;
    font-weight: 800 !important;

    border-radius: 16px !important;

    background: #1b2738 !important;
    color: #fff !important;

    border: 0 !important;

    cursor: pointer !important;
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 900px) {

    body.single-product:has(.frame-constructor-wrap)
    .constructor-layout,

    body.single-product:has(.frame-constructor-wrap)
    .constructor-bottom {

        width: 100% !important;

        grid-template-columns: 1fr !important;

        top: 0 !important;
    }

    body.single-product:has(.frame-constructor-wrap)
    .constructor-cart-form {

        width: 100% !important;

        top: 0 !important;

        transform: none !important;
    }

    .constructor-add-cart-button {
        width: 100% !important;
        max-width: none !important;
    }
}

/* ===== MOVED FROM ADDITIONAL CSS ===== */
/*
=====================================================
ARTSSHOP — ОСНОВНОЙ CSS

ГДЕ ДВИГАТЬ В КОНСТРУКТОРЕ:
1. Ширина конструктора:
   max-width: 1300px

2. Левая/правая часть:
   grid-template-columns: 66% / 34%

3. Блок расчет + цена:
   .constructor-bottom
   Репродукции: top: -220px
   Фото на холсте: top: -340px

4. Кнопка "Добавить в корзину":
   .constructor-cart-form
   Репродукции: top: -200px
   Фото на холсте: top: -325px

5. Если надо выше — делай число более отрицательным.
   Например -220px заменить на -250px.
=====================================================
*/

/* =====================================================
   КОНСТРУКТОР — ОСНОВНАЯ ГЕОМЕТРИЯ
===================================================== */

body.single-product:has(.frame-constructor-wrap) div.product {
    display: block !important;
}

body.single-product:has(.frame-constructor-wrap) div.product > .woocommerce-product-gallery,
body.single-product:has(.frame-constructor-wrap) div.product > .summary,
body.single-product:has(.frame-constructor-wrap) .woocommerce-tabs,
body.single-product:has(.frame-constructor-wrap) .related,
body.single-product:has(.frame-constructor-wrap) .upsells {
    display: none !important;
}

body.single-product:has(.frame-constructor-wrap) .col-full,
body.single-product:has(.frame-constructor-wrap) .site-main {
    max-width: 1300px !important;
    width: 94vw !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body.single-product:has(.frame-constructor-wrap) {
    font-family: Arial, Helvetica, sans-serif !important;
}

body.single-product:has(.frame-constructor-wrap) .frame-constructor-wrap {
    width: 100% !important;
    max-width: 1300px !important;
    margin: 0 auto 40px auto !important;
    padding-top: 18px !important;
    border-top: 1px solid rgba(0,0,0,0.15);
}

.constructor-main-title {
    font-size: 32px !important;
    font-weight: 600 !important;
    margin: 0 0 22px 0 !important;
}

body.single-product:has(.frame-constructor-wrap) .constructor-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 66%) minmax(360px, 34%) !important;
    gap: 22px !important;
    align-items: start !important;
}

body.single-product:has(.frame-constructor-wrap) .constructor-left,
body.single-product:has(.frame-constructor-wrap) .constructor-right {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

.constructor-product-title {
    font-size: 22px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    margin: 0 0 18px 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
}

/* =====================================================
   КОНСТРУКТОР — ФРЕЙМ / CANVAS
===================================================== */

.frame-canvas-wrap {
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px !important;
    margin: 0 auto 14px auto !important;
    background: rgba(255,255,255,0.3) !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

#frameCanvas {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    background: #d8cfb8 !important;
    border-radius: 14px !important;
}

/* =====================================================
   КОНСТРУКТОР — ПРАВЫЙ БЛОК
===================================================== */

.frame-size-controls {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    margin: 0 0 18px 0 !important;
    overflow: visible !important;
}

.frame-mode-row {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    font-size: 17px !important;
}

.frame-mode-row label,
.frame-pack-label {
    font-size: 17px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

.frame-mode-row input,
.frame-pack-label input {
    transform: scale(1.2) !important;
    margin-right: 8px !important;
}

.frame-width-label {
    font-size: 20px !important;
    font-weight: 700 !important;
}

.frame-width-label input {
    width: 105px !important;
    margin-left: 10px !important;
    padding: 10px !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    border: 2px solid #333 !important;
    background: #fff !important;
}

.frame-pack-label {
    font-size: 22px !important;
    font-weight: 700 !important;
}

.frame-pack-label input {
    transform: scale(1.4) !important;
    margin-right: 12px !important;
}

.selected-frame-info {
    font-size: 17px !important;
    line-height: 1.35 !important;
    padding: 12px !important;
    background: rgba(255,255,255,0.55) !important;
    border-radius: 12px !important;
    margin-bottom: 18px !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

.frame-section-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    margin: 18px 0 10px 0 !important;
}

/* =====================================================
   КОНСТРУКТОР — БАГЕТЫ
===================================================== */

.frame-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding-bottom: 18px !important;
    scrollbar-width: auto !important;
    scrollbar-color: #1b2738 #ddd !important;
}

.frame-grid::-webkit-scrollbar {
    height: 18px !important;
}

.frame-grid::-webkit-scrollbar-track {
    background: #ddd !important;
    border-radius: 20px !important;
}

.frame-grid::-webkit-scrollbar-thumb {
    background: #1b2738 !important;
    border-radius: 20px !important;
    border: 3px solid #ddd !important;
}

.frame-item {
    flex: 0 0 135px !important;
    width: 135px !important;
    background: #fff !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    border: 3px solid transparent !important;
    transition: 0.2s !important;
}

.frame-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.frame-item.active-frame {
    border-color: #1b2738 !important;
    box-shadow: 0 0 0 2px rgba(27,39,56,0.18) !important;
}

.frame-item img,
.no-frame-preview {
    width: 135px !important;
    height: 88px !important;
    object-fit: cover !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #eee !important;
    color: #333 !important;
    font-size: 15px !important;
}

.frame-title {
    font-size: 16px !important;
    line-height: 1.2 !important;
    padding: 8px 8px 0 !important;
    font-weight: 700 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

.frame-meta {
    font-size: 14px !important;
    line-height: 1.25 !important;
    padding: 6px 8px 10px !important;
    color: #555 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

/* =====================================================
   РАСЧЕТ + ЦЕНА
   Репродукции: top -220px
   Фото на холсте: top -340px
===================================================== */

body.single-product:has(.frame-constructor-wrap) .constructor-bottom {
    width: calc(66% - 24px) !important;
    position: relative !important;
    top: -220px !important;
    margin-top: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 285px !important;
    gap: 20px !important;
    align-items: stretch !important;
    z-index: 5 !important;
}

body.single-product:has(#customerImageInput) .constructor-bottom {
    top: -340px !important;
}

.frame-calc-info {
    font-size: 18px !important;
    line-height: 1.45 !important;
    font-weight: 500 !important;
    background: rgba(255,255,255,0.65) !important;
    padding: 18px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
}

.constructor-total-box {
    background: #1b2738 !important;
    color: #fff !important;
    border-radius: 16px !important;
    padding: 22px !important;
    font-size: 26px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* =====================================================
   КНОПКА ДОБАВИТЬ В КОРЗИНУ
   Репродукции: top -200px
   Фото на холсте: top -325px
===================================================== */

.constructor-cart-form {
    width: calc(66% - 24px) !important;
    margin-top: 0 !important;
}

body.single-product:has(.frame-constructor-wrap) form.constructor-cart-form {
    position: relative !important;
    top: -200px !important;
    transform: none !important;
    margin-top: 0 !important;
}

body.single-product:has(#customerImageInput) form.constructor-cart-form {
    top: -325px !important;
}

.constructor-add-cart-button {
    width: 100% !important;
    max-width: 420px !important;
    padding: 18px 28px !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    border-radius: 16px !important;
    background: #1b2738 !important;
    color: #fff !important;
    border: 0 !important;
    cursor: pointer !important;
}

/* =====================================================
   PREVIEW
===================================================== */

.frame-preview-close {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 999999;
    background: rgba(0,0,0,0.75);
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

/* =====================================================
   МОБИЛКА
===================================================== */

@media (max-width: 900px) {
    body.home ul.products {
        flex-wrap: wrap !important;
    }

    body.home ul.products li.product-category {
        flex: 0 0 calc(50% - 6px) !important;
    }

    body.tax-product_cat ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.single-product div.product {
        display: block !important;
    }

    body.single-product:has(.frame-constructor-wrap) .constructor-layout,
    body.single-product:has(.frame-constructor-wrap) .constructor-bottom {
        width: 100% !important;
        grid-template-columns: 1fr !important;
        top: 0 !important;
    }

    body.single-product:has(.frame-constructor-wrap) .constructor-cart-form {
        width: 100% !important;
        top: 0 !important;
        transform: none !important;
    }
}

@media (max-width: 600px) {
    body.home ul.products li.product-category {
        flex: 0 0 100% !important;
    }

    body.home ul.products li.product-category img {
        height: 220px !important;
    }

    body.tax-product_cat ul.products {
        grid-template-columns: 1fr !important;
    }
}
/* обычный товар — не резать правую колонку */
body.single-product:not(:has(.frame-constructor-wrap)) div.product .summary {
    overflow: visible !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
}

/* название товара — переносить нормально */
body.single-product:not(:has(.frame-constructor-wrap)) .product_title,
body.single-product:not(:has(.frame-constructor-wrap)) .summary h1,
body.single-product:not(:has(.frame-constructor-wrap)) .summary h2,
body.single-product:not(:has(.frame-constructor-wrap)) .summary p,
body.single-product:not(:has(.frame-constructor-wrap)) .summary .price {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
}

/* чуть больше места правой колонке обычного товара */
@media (min-width: 768px) {
    body.single-product:not(:has(.frame-constructor-wrap)) div.product {
        grid-template-columns: 58% 42% !important;
        gap: 28px !important;
    }
}

/* значок распродажи не обрезать */
body.single-product .onsale {
    position: relative !important;
    z-index: 20 !important;
    overflow: visible !important;
    white-space: nowrap !important;
    min-width: max-content !important;
    padding: 8px 14px !important;
}
/* FIX распродажа — не вылезать за экран */
body.single-product .onsale {
    left: 12px !important;
    right: auto !important;

    max-width: calc(100% - 24px) !important;

    box-sizing: border-box !important;

    white-space: nowrap !important;

    overflow: hidden !important;
    text-overflow: ellipsis !important;

    border-radius: 10px !important;

    font-size: 15px !important;
    padding: 8px 14px !important;
}

/* контейнер картинки */
body.single-product .woocommerce-product-gallery {
    overflow: visible !important;
    position: relative !important;
}
/* убрать кривую стандартную распродажу */
body.single-product .onsale {
    display: none !important;
}


/* SKU / barcode / QR на странице товара */
.product-extra-codes {
    margin-top: 24px !important;
    padding: 18px !important;
    background: rgba(255,255,255,0.55) !important;
    border-radius: 16px !important;
    font-size: 18px !important;
    line-height: 1.6 !important;
}

.product-qr-box {
    margin-top: 14px !important;
}

.product-qr-box img {
    width: 140px !important;
    height: 140px !important;
    display: block !important;
    margin-top: 8px !important;
    border-radius: 10px !important;
}
/* обычный товар — не резать левую галерею/детали */
body.single-product:not(:has(.frame-constructor-wrap)) .woocommerce-product-gallery,
body.single-product:not(:has(.frame-constructor-wrap)) div.images {
    overflow: visible !important;
    padding-left: 20px !important;
    box-sizing: border-box !important;
}

/* обычный товар — больше воздуха слева и справа */
body.single-product:not(:has(.frame-constructor-wrap)) div.product {
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
}
/* QR — читаемый, но компактный */
.product-extra-codes {
    width: 150px !important;
    max-width: 150px !important;
    padding: 10px !important;
    margin-top: 10px !important;
    display: inline-block !important;
}

.product-qr-box {
    display: block !important;
    text-align: center !important;
}

.product-qr-box img {
    width: 110px !important;
    height: 110px !important;
    display: block !important;
    margin: 6px auto 0 auto !important;
    image-rendering: pixelated !important;
}

.product-qr-title,
.product-barcode-line {
    font-size: 11px !important;
    line-height: 1.25 !important;
}
/* мобильный фикс конструктора — убрать наслоение кнопки */
@media (max-width: 900px) {
    body.single-product:has(.frame-constructor-wrap) .constructor-bottom {
        position: static !important;
        top: auto !important;
        width: 100% !important;
        margin-top: 18px !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    body.single-product:has(.frame-constructor-wrap) form.constructor-cart-form {
        position: static !important;
        top: auto !important;
        width: 100% !important;
        margin-top: 16px !important;
        transform: none !important;
    }

    body.single-product:has(.frame-constructor-wrap) .constructor-add-cart-button {
        width: 100% !important;
        max-width: none !important;
    }
}
/* МОБИЛЬНАЯ КОРЗИНА — нормальная карточка товара */
@media (max-width: 700px) {

    body.woocommerce-cart .wc-block-cart-items__row {
        display: block !important;
        width: 100% !important;
        padding: 18px 8px 24px 8px !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    body.woocommerce-cart .wc-block-cart-item__image,
    body.woocommerce-cart .wc-block-components-product-image {
        width: 120px !important;
        max-width: 120px !important;
        margin: 0 auto 12px auto !important;
        display: block !important;
    }

    body.woocommerce-cart .wc-block-cart-item__image img,
    body.woocommerce-cart .wc-block-components-product-image img {
        width: 120px !important;
        max-width: 120px !important;
        height: auto !important;
        display: block !important;
        border-radius: 10px !important;
    }

    body.woocommerce-cart .wc-block-cart-item__wrap {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: center !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-cart .wc-block-components-product-name {
        font-size: 17px !important;
        line-height: 1.3 !important;
        font-weight: 800 !important;
        white-space: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        text-align: center !important;
        margin: 0 auto 8px auto !important;
        max-width: 92% !important;
    }

    body.woocommerce-cart .wc-block-components-product-metadata,
    body.woocommerce-cart .wc-block-components-product-details {
        display: none !important;
    }

    body.woocommerce-cart .wc-block-cart-item__prices,
    body.woocommerce-cart .wc-block-components-product-price {
        text-align: center !important;
        margin: 8px 0 !important;
    }

    body.woocommerce-cart .wc-block-components-formatted-money-amount {
        font-size: 18px !important;
        font-weight: 900 !important;
        white-space: nowrap !important;
    }

    body.woocommerce-cart .wc-block-cart-item__quantity,
    body.woocommerce-cart .wc-block-components-quantity-selector {
        justify-content: center !important;
        margin: 12px auto 0 auto !important;
    }

    body.woocommerce-cart .wc-block-cart-item__remove-link {
        display: block !important;
        margin: 10px auto 0 auto !important;
        text-align: center !important;
        color: #333 !important;
        text-decoration: underline !important;
    }

    body.woocommerce-cart .wc-block-cart__sidebar,
    body.woocommerce-cart .wc-block-components-sidebar,
    body.woocommerce-cart .wc-block-cart__submit-container,
    body.woocommerce-cart .wc-block-cart__submit,
    body.woocommerce-cart .wc-block-cart__submit-button {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    body.woocommerce-cart .wc-block-cart__submit-button {
        font-size: 15px !important;
        line-height: 1.25 !important;
        padding: 14px 8px !important;
        white-space: normal !important;
    }
}
/* мобильная корзина — заменить "Предполагаемый итог" */
@media (max-width: 700px) {

    body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
        font-size: 0 !important;
    }

    body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label::before {
        content: "Сумма корзины" !important;
        font-size: 15px !important;
        font-weight: 700 !important;
    }

    body.woocommerce-cart .wc-block-components-totals-item__value {
        padding-right: 8px !important;
        box-sizing: border-box !important;
    }
}
/* мобильная корзина — общий запас справа, чтобы ₽ не резался */
@media (max-width: 700px) {

    body.woocommerce-cart .wc-block-cart,
    body.woocommerce-cart .wc-block-cart__main,
    body.woocommerce-cart .wc-block-cart__sidebar,
    body.woocommerce-cart .wc-block-components-sidebar {
        width: calc(100% - 18px) !important;
        max-width: calc(100% - 18px) !important;
        margin-left: 0 !important;
        margin-right: 18px !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-cart .wc-block-components-formatted-money-amount,
    body.woocommerce-cart .wc-block-components-totals-item__value,
    body.woocommerce-cart .wc-block-components-product-price {
        padding-right: 8px !important;
        box-sizing: border-box !important;
        white-space: nowrap !important;
    }

    body.woocommerce-cart .wc-block-cart__submit-container,
    body.woocommerce-cart .wc-block-cart__submit-button {
        left: 0 !important;
        right: 18px !important;
        width: calc(100% - 18px) !important;
        max-width: calc(100% - 18px) !important;
        margin-left: 0 !important;
        margin-right: 18px !important;
        box-sizing: border-box !important;
    }
}
/* мобильная версия товара — убрать миниатюры галереи */
@media (max-width: 700px) {

    body.single-product .flex-control-thumbs,
    body.single-product ol.flex-control-thumbs,
    body.single-product .woocommerce-product-gallery .flex-control-nav {
        display: none !important;
    }

    body.single-product .woocommerce-product-gallery {
        margin-bottom: 16px !important;
    }
}
/* мобильная версия товара — убрать пустое место после скрытия миниатюр */
@media (max-width: 700px) {

    body.single-product .woocommerce-product-gallery,
    body.single-product div.images {
        margin-bottom: 10px !important;
        padding-bottom: 0 !important;
    }

    body.single-product .woocommerce-product-gallery__wrapper,
    body.single-product .woocommerce-product-gallery__image {
        min-height: 0 !important;
        height: auto !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    body.single-product .summary,
    body.single-product div.summary {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* =====================================================
   DESKTOP — шире конструктор фото на холсте
===================================================== */

@media (min-width: 1024px) {

    body.single-product .frame-constructor-wrap,
    body.single-product .frame-constructor-layout,
    body.single-product .frame-constructor,
    body.single-product .photo-canvas-constructor,
    body.single-product .product-photo-canvas,
    body.single-product .product .summary,
    body.single-product .product .images {
        max-width: none !important;
    }

    body.single-product:has(.frame-constructor-wrap) .col-full,
    body.single-product:has(.frame-constructor-wrap) .content-area,
    body.single-product:has(.frame-constructor-wrap) .site-main,
    body.single-product:has(.photo-canvas-constructor) .col-full,
    body.single-product:has(.photo-canvas-constructor) .content-area,
    body.single-product:has(.photo-canvas-constructor) .site-main {
        width: 96vw !important;
        max-width: 1600px !important;
    }

    body.single-product .frame-constructor-wrap {
        width: 100% !important;
    }
}

/* =====================================================
   ФИНАЛЬНЫЙ МОБИЛЬНЫЙ ФИКС КОНСТРУКТОРА
===================================================== */

@media (max-width: 900px) {

body.single-product:has(.frame-constructor-wrap) .frame-constructor-wrap {
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 0 120px !important;
    margin: 0 auto !important;
}

body.single-product:has(.frame-constructor-wrap) .constructor-layout {
    display: block !important;
    width: 100% !important;
}

body.single-product:has(.frame-constructor-wrap) .constructor-left,
body.single-product:has(.frame-constructor-wrap) .constructor-right {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto 14px !important;
}

body.single-product:has(.frame-constructor-wrap) .frame-canvas-wrap {
    width: 100% !important;
    max-width: 100% !important;
    padding: 4px !important;
    margin: 0 auto !important;
    border-radius: 16px !important;
}

body.single-product:has(.frame-constructor-wrap) #frameCanvas {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

body.single-product:has(.frame-constructor-wrap) .constructor-main-title {
    font-size: 32px !important;
    line-height: 1.1 !important;
    margin: 10px 0 14px !important;
    text-align: center !important;
}

body.single-product:has(.frame-constructor-wrap) .constructor-product-title,
body.single-product:has(.frame-constructor-wrap) .frame-section-title {
    font-size: 26px !important;
    line-height: 1.15 !important;
    margin: 16px 0 10px !important;
}

body.single-product:has(.frame-constructor-wrap) .frame-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    width: 100% !important;
    overflow: visible !important;
    padding: 0 !important;
}

body.single-product:has(.frame-constructor-wrap) .frame-item {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 8px !important;
    border-radius: 14px !important;
}

body.single-product:has(.frame-constructor-wrap) .frame-item img,
body.single-product:has(.frame-constructor-wrap) .no-frame-preview {
    width: 100% !important;
    height: 105px !important;
    object-fit: cover !important;
    border-radius: 10px !important;
}

body.single-product:has(.frame-constructor-wrap) .frame-title {
    font-size: 15px !important;
    line-height: 1.15 !important;
    margin: 7px 0 4px !important;
}

body.single-product:has(.frame-constructor-wrap) .frame-meta {
    font-size: 13px !important;
    line-height: 1.2 !important;
}

body.single-product:has(.frame-constructor-wrap) .constructor-bottom {
    width: 100% !important;
    margin: 14px 0 !important;
    padding: 0 !important;
}

body.single-product:has(.frame-constructor-wrap) .constructor-total-box {
    width: 100% !important;
    font-size: 24px !important;
    padding: 14px !important;
    border-radius: 16px !important;
}

body.single-product:has(.frame-constructor-wrap) form.constructor-cart-form {
    width: 100% !important;
    margin: 0 0 20px !important;
}

body.single-product:has(.frame-constructor-wrap) .constructor-add-cart-button {
    width: 100% !important;
    height: 62px !important;
    border-radius: 16px !important;
    font-size: 22px !important;
}

}

/* === FIX MOBILE CONSTRUCTOR CENTER + HORIZONTAL FRAMES === */
@media (max-width:900px){

body.single-product:has(.frame-constructor-wrap) .col-full,
body.single-product:has(.frame-constructor-wrap) #content .col-full,
body.single-product:has(.frame-constructor-wrap) .content-area,
body.single-product:has(.frame-constructor-wrap) .site-main {
    width:calc(100% - 18px)!important;
    max-width:100%!important;
    margin:0 auto!important;
    padding:0!important;
    overflow-x:hidden!important;
}

body.single-product:has(.frame-constructor-wrap) .frame-constructor-wrap {
    width:100%!important;
    max-width:100%!important;
    margin:0 auto!important;
    padding:8px 0 110px!important;
    overflow:hidden!important;
}

body.single-product:has(.frame-constructor-wrap) .constructor-layout {
    display:block!important;
    width:100%!important;
    margin:0 auto!important;
}

body.single-product:has(.frame-constructor-wrap) .constructor-left,
body.single-product:has(.frame-constructor-wrap) .constructor-right {
    width:100%!important;
    max-width:100%!important;
    margin:0 auto!important;
    padding:0!important;
}

body.single-product:has(.frame-constructor-wrap) .frame-canvas-wrap {
    width:100%!important;
    max-width:100%!important;
    margin:0 auto 18px!important;
    padding:6px!important;
    border-radius:18px!important;
}

body.single-product:has(.frame-constructor-wrap) #frameCanvas {
    width:100%!important;
    height:auto!important;
    display:block!important;
    margin:0 auto!important;
}

/* БАГЕТЫ СНОВА ВЛЕВО-ВПРАВО */
body.single-product:has(.frame-constructor-wrap) .frame-grid {
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    padding:4px 0 14px!important;
    scroll-snap-type:x mandatory!important;
    -webkit-overflow-scrolling:touch!important;
}

body.single-product:has(.frame-constructor-wrap) .frame-item {
    flex:0 0 175px!important;
    width:175px!important;
    min-width:175px!important;
    max-width:175px!important;
    padding:8px!important;
    border-radius:16px!important;
    scroll-snap-align:start!important;
}

body.single-product:has(.frame-constructor-wrap) .frame-item img,
body.single-product:has(.frame-constructor-wrap) .no-frame-preview {
    width:100%!important;
    height:110px!important;
    object-fit:cover!important;
}

body.single-product:has(.frame-constructor-wrap) .constructor-main-title {
    font-size:32px!important;
    text-align:center!important;
    margin:10px 0 14px!important;
}

}

/* =====================================================
   FULL WIDTH CONSTRUCTOR FIX
===================================================== */

@media (max-width:900px){

/* главный контейнер товара */
.single-product div.product{
    width:calc(100vw - 10px)!important;
    max-width:calc(100vw - 10px)!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding:8px!important;
    box-sizing:border-box!important;
}

/* весь конструктор */
.frame-constructor-wrap{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;

    margin:0!important;
    padding:6px!important;

    box-sizing:border-box!important;
}

/* layout */
.constructor-layout{
    display:flex!important;
    flex-direction:column!important;

    width:100%!important;
    max-width:100%!important;
    min-width:0!important;

    gap:10px!important;
}

/* левая/правая часть */
.constructor-left,
.constructor-right{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;

    margin:0!important;
    padding:0!important;

    box-sizing:border-box!important;
}

/* область холста */
.frame-canvas-wrap{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;

    padding:4px!important;
    margin:0!important;

    overflow:hidden!important;
    box-sizing:border-box!important;
}

/* сам canvas */
#frameCanvas{
    display:block!important;

    width:100%!important;
    max-width:100%!important;
    min-width:0!important;

    height:auto!important;
    max-height:none!important;

    margin:0 auto!important;
}

/* upload */
.customer-upload-block,
#customerImageInput{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;

    box-sizing:border-box!important;
}

/* рамки */
.frame-grid{
    width:100%!important;
    overflow-x:auto!important;

    display:flex!important;
    flex-wrap:nowrap!important;

    gap:10px!important;
}

.frame-item{
    flex:0 0 132px!important;
}

/* запрет расширения страницы */
html,
body,
.site,
.site-content,
#content,
.col-full{
    overflow-x:hidden!important;
}

}


/* =====================================================
   CONSTRUCTOR OUTSIDE PRODUCT GRID FIX
===================================================== */

.frame-constructor-wrap{
    width:100%!important;
    max-width:1560px!important;
    margin:24px auto!important;
    box-sizing:border-box!important;
}

@media (max-width:900px){

.frame-constructor-wrap{
    width:calc(100vw - 10px)!important;
    max-width:calc(100vw - 10px)!important;
    margin:10px auto 18px!important;
    padding:8px!important;
}

.constructor-layout,
.constructor-left,
.constructor-right,
.frame-canvas-wrap{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
}

#frameCanvas{
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    display:block!important;
}

}


/* =====================================================
   REAL FULL WIDTH FIX
===================================================== */

/* выводим конструктор вне product-grid */

.frame-constructor-wrap{
    position:relative!important;

    width:min(96vw,1700px)!important;
    max-width:min(96vw,1700px)!important;

    margin:24px auto!important;
    padding:18px!important;

    box-sizing:border-box!important;
}

/* собственный layout */
.constructor-layout{
    display:grid!important;

    grid-template-columns:
        minmax(700px,1fr)
        minmax(420px,520px)!important;

    gap:28px!important;

    width:100%!important;
    max-width:100%!important;

    align-items:start!important;
}

/* стороны */
.constructor-left,
.constructor-right{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
}

/* canvas area */
.frame-canvas-wrap{
    width:100%!important;
    max-width:100%!important;

    padding:18px!important;

    border-radius:24px!important;

    overflow:hidden!important;
    box-sizing:border-box!important;
}

#frameCanvas{
    display:block!important;

    width:100%!important;
    max-width:100%!important;

    height:auto!important;

    margin:0 auto!important;
}

/* mobile */
@media (max-width:900px){

.frame-constructor-wrap{
    width:calc(100vw - 10px)!important;
    max-width:calc(100vw - 10px)!important;

    margin:10px auto 18px!important;
    padding:8px!important;
}

.constructor-layout{
    display:flex!important;
    flex-direction:column!important;
    gap:12px!important;
}

.frame-canvas-wrap{
    padding:6px!important;
}

}


/* =====================================================
   TRUE FULL VIEWPORT CONSTRUCTOR
===================================================== */

/* DESKTOP */

.frame-constructor-wrap{

    position:relative!important;

    left:50%!important;
    transform:translateX(-50%)!important;

    width:calc(100vw - 60px)!important;
    max-width:1720px!important;

    margin:28px 0!important;
    padding:0!important;

    box-sizing:border-box!important;
}

/* собственный layout */
.constructor-layout{

    display:grid!important;

    grid-template-columns:
        minmax(860px,1fr)
        minmax(420px,520px)!important;

    gap:32px!important;

    width:100%!important;
    max-width:100%!important;

    align-items:start!important;
}

/* canvas side */
.constructor-left,
.frame-canvas-wrap{

    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
}

.frame-canvas-wrap{

    padding:18px!important;

    border-radius:26px!important;

    overflow:hidden!important;
    box-sizing:border-box!important;
}

/* сам canvas */
#frameCanvas{

    display:block!important;

    width:100%!important;
    max-width:100%!important;

    height:auto!important;

    margin:0 auto!important;
}

/* mobile */

@media (max-width:900px){

.frame-constructor-wrap{

    left:auto!important;
    transform:none!important;

    width:calc(100vw - 10px)!important;
    max-width:calc(100vw - 10px)!important;

    margin:10px auto 18px!important;
    padding:8px!important;
}

.constructor-layout{

    display:flex!important;
    flex-direction:column!important;

    gap:12px!important;
}

.frame-canvas-wrap{
    padding:6px!important;
}

}

