/*
 * Конструктор изделия /konstruktor/
 * Наследует сетку mw-contract, свои блоки mw-product__*
 */

html.mw-product .mw-section-head {
    margin-bottom: 28px;
    max-width: 52rem;
}

html.mw-product .mw-section-head__title.page-title {
    margin-bottom: 0;
}

html.mw-product .mw-product__layout {
    margin-top: 8px;
}

html.mw-product .mw-product__section-desc,
html.mw-product .mw-product__section-params {
    border-bottom: 1px dashed var(--mw-contract-line);
    padding-bottom: 4px;
    margin-bottom: 4px;
}

html.mw-product .mw-product__features {
    margin: 12px 0 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

html.mw-product .mw-product__categories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

html.mw-product .mw-product__category {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 72px;
    padding: 10px 8px;
    border: 1px solid var(--mw-contract-line);
    border-radius: 12px;
    background: #fff;
    color: var(--mw-contract-ink);
    font-family: Rubik, sans-serif;
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

html.mw-product .mw-product__category i {
    font-size: 22px;
    color: #EB4036;
}

html.mw-product .mw-product__category.is-active {
    border-color: #EB4036;
    background: rgba(235, 64, 54, 0.06);
    box-shadow: 0 0 0 1px rgba(235, 64, 54, 0.15);
}

html.mw-product .mw-product__delivery-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

html.mw-product button.mw-product__delivery {
    border: none;
    background: #fff;
    padding: 8px 12px;
    border-radius: 999px;
    font-family: Rubik, sans-serif;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid var(--mw-contract-line);
    color: var(--mw-contract-ink);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

html.mw-product button.mw-product__delivery.is-active {
    border-color: #EB4036;
    background: rgba(235, 64, 54, 0.08);
    color: #EB4036;
}

html.mw-product .mw-product__estimate {
    margin: 16px 0;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(235, 64, 54, 0.22);
    background: rgba(235, 64, 54, 0.05);
}

html.mw-product .mw-product__estimate-kicker {
    margin: 0 0 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #EB4036;
    font-weight: 600;
}

html.mw-product .mw-product__estimate-total {
    margin: 0 0 12px;
    font-family: Unbounded, Rubik, sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--mw-contract-ink);
}

html.mw-product .mw-product__estimate-list {
    margin: 0 0 10px;
    padding: 0 0 0 18px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--mw-contract-muted);
}

html.mw-product .mw-product__estimate-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--mw-contract-muted);
}

html.mw-product .mw-product__textarea {
    min-height: 108px;
    resize: vertical;
    line-height: 1.5;
    font-family: Rubik, sans-serif;
}

html.mw-product .mw-product__btn--full {
    width: 100%;
    margin-top: 4px;
}

html.mw-product .mw-product__parse-msg {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
}

html.mw-product .mw-product__parse-msg.is-ok {
    background: rgba(235, 64, 54, 0.08);
    color: var(--mw-contract-ink);
    border: 1px solid rgba(235, 64, 54, 0.2);
}

html.mw-product .mw-product__parse-msg.is-error {
    background: rgba(235, 64, 54, 0.12);
    color: #c42e25;
    border: 1px solid rgba(235, 64, 54, 0.35);
}

html.mw-product .mw-product__parse-msg.is-warn {
    background: rgba(80, 70, 60, 0.06);
    color: #5c4a3a;
    border: 1px solid rgba(235, 64, 54, 0.28);
}

html.mw-product .mw-product__desc-note {
    margin: 0 0 8px;
    padding: 8px 12px;
    background: rgba(19, 26, 30, 0.04);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--mw-contract-muted);
}

html.mw-product .mw-product__3d-msg {
    margin: 0;
    padding: 48px 16px;
    text-align: center;
    color: var(--mw-contract-muted);
    font-family: Rubik, sans-serif;
    font-size: 14px;
}

html.mw-product .mw-product__3d {
    width: 100%;
    min-height: 280px;
    height: min(42vw, 360px);
    border: 1px solid var(--mw-contract-line);
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
}

html.mw-product .mw-product__3d canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

html.mw-product .mw-product__3d-thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 20px;
}

html.mw-product .mw-product__3d-thumb {
    position: relative;
    border: 1px solid var(--mw-contract-line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

html.mw-product .mw-product__3d-thumb canvas {
    display: block;
    width: 100%;
    height: auto;
}

html.mw-product .mw-product__3d-thumb-label {
    position: absolute;
    left: 6px;
    top: 4px;
    z-index: 1;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--mw-contract-ink);
    font-size: 10px;
    font-family: Rubik, sans-serif;
}

html.mw-product .mw-product__subhead {
    margin: 0 0 10px;
    font-family: Unbounded, Rubik, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--mw-contract-ink);
}

html.mw-product .mw-product__submit-block {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--mw-contract-line);
}

html.mw-product .mw-product__consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--mw-contract-muted);
}

html.mw-product .mw-product__consent input {
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: #EB4036;
}

html.mw-product .mw-product__consent a {
    color: #EB4036;
}

html.mw-product .mw-product__submit-msg {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
}

html.mw-product .mw-product__submit-msg.is-ok {
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(46, 125, 50, 0.25);
}

html.mw-product .mw-product__submit-msg.is-error {
    background: rgba(235, 64, 54, 0.1);
    color: #c42e25;
    border: 1px solid rgba(235, 64, 54, 0.25);
}

html.mw-product .mw-product__profiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

html.mw-product .mw-product__profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--mw-contract-line);
    border-radius: 12px;
    background: #fff;
    color: var(--mw-contract-ink);
    font-family: Rubik, sans-serif;
    font-size: 14px;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

html.mw-product .mw-product__profile i {
    flex-shrink: 0;
    font-size: 20px;
    color: #EB4036;
}

html.mw-product .mw-product__profile:hover {
    border-color: rgba(235, 64, 54, 0.45);
}

html.mw-product .mw-product__profile.is-active {
    border-color: #EB4036;
    box-shadow: 0 0 0 1px rgba(235, 64, 54, 0.25);
    background: rgba(235, 64, 54, 0.04);
}

html.mw-product .mw-product__dims {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

html.mw-product .mw-product__field {
    margin: 0;
}

html.mw-product .mw-product__hint {
    margin: 14px 0 0;
    color: var(--mw-contract-muted);
    font-size: 14px;
    line-height: 1.5;
}

html.mw-product .mw-product__preview-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

html.mw-product .mw-product__preview-title {
    margin: 0;
    font-family: Unbounded, Rubik, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--mw-contract-ink);
}

html.mw-product .mw-product__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

html.mw-product .mw-product__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 16px;
    border: none;
    border-radius: 999px;
    background: #EB4036;
    color: #fff;
    font-family: Rubik, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

html.mw-product .mw-product__btn:hover:not(:disabled) {
    background: #d6362c;
}

html.mw-product .mw-product__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

html.mw-product .mw-product__btn--ghost {
    background: transparent;
    border: 1px solid var(--mw-contract-line);
    color: var(--mw-contract-ink);
}

html.mw-product .mw-product__btn--ghost:hover:not(:disabled) {
    border-color: #EB4036;
    color: #EB4036;
    background: rgba(235, 64, 54, 0.04);
}

html.mw-product .mw-product__btn.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

html.mw-product .mw-product__preview {
    min-height: 280px;
    padding: 12px;
    border: 1px dashed var(--mw-contract-line);
    border-radius: 12px;
    background: #fafafa;
    overflow: auto;
}

html.mw-product .mw-product__preview svg {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

html.mw-product .mw-product__empty,
html.mw-product .mw-product__error {
    margin: 0;
    padding: 48px 16px;
    text-align: center;
    color: var(--mw-contract-muted);
    font-family: Rubik, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

html.mw-product .mw-product__error {
    color: #EB4036;
}

html.mw-product .mw-product__credit {
    margin: 12px 0 0;
    color: var(--mw-contract-muted);
    font-size: 12px;
    line-height: 1.45;
}

html.mw-product .mw-product__credit a {
    color: #EB4036;
    text-decoration: none;
}

html.mw-product .mw-product__credit a:hover {
    text-decoration: underline;
}

html.mw-product .mw-product__price {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(235, 64, 54, 0.06);
    border: 1px solid rgba(235, 64, 54, 0.18);
}

html.mw-product .mw-product__price-kicker {
    margin: 0 0 4px;
    font-family: Rubik, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #EB4036;
}

html.mw-product .mw-product__price-value {
    margin: 0;
    font-family: Unbounded, Rubik, sans-serif;
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--mw-contract-text, #131a1e);
}

html.mw-product .mw-product__price-note {
    margin: 8px 0 0;
    font-family: Rubik, sans-serif;
    font-size: 12px;
    line-height: 1.45;
    color: var(--mw-contract-muted);
}

html.mw-product .mw-product__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

html.mw-product .mw-product__tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 8px 14px;
    border: 1.5px solid rgba(19, 26, 30, 0.14);
    border-radius: 999px;
    background: #fff;
    color: var(--mw-contract-text, #131a1e);
    font-family: Rubik, sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

html.mw-product .mw-product__tag i {
    font-size: 16px;
    color: #EB4036;
}

html.mw-product .mw-product__tag.is-active {
    border-color: #EB4036;
    background: rgba(235, 64, 54, 0.08);
    color: #131a1e;
}

html.mw-product .mw-product__tag-pickers {
    display: grid;
    gap: 10px;
    margin-bottom: 4px;
}

html.mw-product .mw-product__advanced {
    margin-bottom: 8px;
    border: 1px solid rgba(19, 26, 30, 0.08);
    border-radius: 12px;
    padding: 0 12px 8px;
    background: #fafafa;
}

html.mw-product .mw-product__advanced-title {
    cursor: pointer;
    padding: 14px 4px;
    font-family: Rubik, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--mw-contract-text, #131a1e);
    list-style: none;
}

html.mw-product .mw-product__advanced-title i {
    color: #EB4036;
    margin-right: 6px;
}

html.mw-product .mw-product__ai-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(235, 64, 54, 0.1);
    color: #EB4036;
    font-family: Rubik, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    vertical-align: middle;
}

html.mw-product .mw-product__ai-badge--off {
    background: rgba(19, 26, 30, 0.06);
    color: var(--mw-contract-muted);
    text-transform: none;
    font-weight: 500;
}

html.mw-product .mw-product__3d {
    background: linear-gradient(180deg, #e8ecf1 0%, #f5f7fa 100%);
}

@media (max-width: 991px) {
    html.mw-product .mw-contract__preview-wrap {
        position: static;
    }

    html.mw-product .mw-product__categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    html.mw-product .mw-product__categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html.mw-product .mw-product__estimate-total {
        font-size: 24px;
    }

    html.mw-product .mw-product__tags {
        gap: 6px;
    }

    html.mw-product .mw-product__tag {
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
        font-size: 12px;
        padding: 8px 10px;
    }

    html.mw-product .mw-product__3d-thumbs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html.mw-product .mw-product__profiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html.mw-product .mw-product__dims {
        grid-template-columns: minmax(0, 1fr);
    }

    html.mw-product .mw-product__preview-head {
        flex-direction: column;
        align-items: stretch;
    }

    html.mw-product .mw-product__actions {
        width: 100%;
    }

    html.mw-product .mw-product__btn {
        flex: 1 1 auto;
    }
}

@media (max-width: 479px) {
    html.mw-product .mw-product__categories {
        grid-template-columns: minmax(0, 1fr);
    }
}
