.dm-kit-constructor {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 15px 120px;
}

.dm-kit-constructor__header {
    margin-bottom: 30px;
}

.dm-kit-constructor__header h1 {
    margin: 0 0 10px;
    font-size: 32px;
    line-height: 1.2;
}

.dm-kit-constructor__header p {
    max-width: 760px;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.constructor-section {
    margin-bottom: 42px;
}

.constructor-section h2 {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.25;
}

.constructor-section > p {
    margin: 0 0 18px;
    color: #666;
}

.constructor-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.constructor-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 16px;
    border: 1px solid #e3e3e3;
    border-radius: 16px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.constructor-card.is-selected {
    border-color: #d90000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.constructor-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 170px;
    margin-bottom: 14px;
}

.constructor-card__image img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
}

.constructor-card__content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.constructor-card__title {
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 600;
}

.constructor-card__article {
    margin-bottom: 8px;
    font-size: 13px;
    color: #777;
}

.constructor-card__price {
    margin-top: auto;
    margin-bottom: 8px;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
}

.constructor-card__stock {
    margin-bottom: 12px;
    font-size: 13px;
    color: #008000;
}

.constructor-card__qty {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.constructor-card__qty button {
    width: 34px;
    height: 34px;
    border: 1px solid #ddd;
    background: #f7f7f7;
    cursor: pointer;
}

.constructor-card__qty input {
    width: 58px;
    height: 34px;
    border: 1px solid #ddd;
    border-left: 0;
    border-right: 0;
    text-align: center;
}

.constructor-select,
.constructor-submit {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: #d90000;
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
}

.constructor-select {
    height: 40px;
}

.constructor-card.is-selected .constructor-select {
    background: #222;
}

.constructor-submit {
    height: 48px;
    margin-top: 16px;
    font-size: 17px;
}

.constructor-submit:disabled {
    opacity: .7;
    cursor: default;
}

.constructor-add-form {
    display: none;
}

.constructor-summary {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 50;
    width: 360px;
    max-width: calc(100% - 48px);
    padding: 18px;
    border: 1px solid #e3e3e3;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .16);
}

.constructor-summary__title {
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 700;
}

.constructor-summary__items {
    max-height: 260px;
    overflow: auto;
    margin-bottom: 14px;
}

.constructor-summary__row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 10px;
    padding: 9px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.constructor-summary__name {
    grid-column: 1 / 3;
    font-weight: 600;
}

.constructor-summary__count {
    color: #666;
}

.constructor-summary__price {
    text-align: right;
    font-weight: 600;
}

.constructor-summary__empty {
    color: #777;
}

.constructor-summary__total-wrap {
    font-size: 17px;
    font-weight: 700;
}

.constructor-summary__note {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.35;
    color: #777;
}

@media (max-width: 1100px) {
    .constructor-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .constructor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .constructor-summary {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        max-width: none;
    }

    .dm-kit-constructor {
        padding-bottom: 220px;
    }
}

@media (max-width: 520px) {
    .constructor-grid {
        grid-template-columns: 1fr;
    }

    .dm-kit-constructor__header h1 {
        font-size: 26px;
    }
}