/* ============================================
   УНИВЕРСАЛЬНЫЙ КОНСТРУКТОР - БАЗОВЫЕ СТИЛИ
   ============================================ */

.universal-constructor {
    max-width: 1200px;
    margin: 30px auto;
    background: #fff;
}

.constructor-block {
    padding: 20px;
    background: #EBEDEC;
    border-radius: 20px;
    margin-bottom: 20px;
}

.constructor-block:last-child {
    margin-bottom: 0;
}
.sauce-name,.topping-name {display: block;}

.constructor-block.sushi-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.constructor-block.sushi-block .sushi-addon {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.constructor-block.sushi-block .addon-price {
    font-size: 16px;
    font-weight: 600;
    color: #4F1D05;
    min-width: 70px;
    text-align: center;
    flex-shrink: 0;
}

.constructor-block.sushi-block .addon-price span {
    color: #E6050D;
}

.constructor-block-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #898989;
	display: flex;
    align-items: center;
    gap: 5px;
}

.constructor-block-title span {
    background: #B2B4B3;
    border-radius: 50%;
    color: #E9EBEA;
    width: 28px;
    min-height: 28px;
	display: flex;
    align-items: center;
    align-content: center;
	justify-content: center;
}
.size-options, .dough-options {
	display: flex;
    gap: 20px;
    flex-wrap: wrap;
}


/* Тогглы (вкл/выкл) */
.constructor-toggle,
.sauce-toggle,
.toppings-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.constructor-toggle .toggle-btn,
.sauce-toggle .toggle-btn,
.toppings-toggle .toggle-btn {
    padding: 8px 25px;
    border-radius: 30px;
    background: #fff !important;
    color: #898989 !important;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    transition: all 0.3s ease;
    border: none;
}

.constructor-toggle .toggle-btn:hover,
.sauce-toggle .toggle-btn:hover,
.toppings-toggle .toggle-btn:hover {
    background: #E6050D !important;
    color: #F8D6A8 !important;
}

.constructor-toggle .toggle-btn.active,
.sauce-toggle .toggle-btn.active,
.toppings-toggle .toggle-btn.active {
    background: #E6050D !important;
    color: #F8D6A8 !important;
}

.toppings-toggle {
    margin-bottom: 20px;
}

.toppings-list {
    margin-bottom: 20px;
}

.topping-item {
    position: relative;
}

.topping-item.selected::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #E6050D;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(79, 29, 5, 0.25);
    background-image:
        linear-gradient(#fff, #fff),
        linear-gradient(#fff, #fff);
    background-size: 12px 2px, 2px 12px;
    background-position: center;
    background-repeat: no-repeat;
    transform: rotate(45deg);
}

/* КНОПКИ КОЛИЧЕСТВА */
.custom-quantity {
    display: flex;
    align-items: center;
    background: #C5C7C6;
    padding: 6px 8px;
    border-radius: 30px;
    gap: 5px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    background: #E6050D;
    color: white;
    padding: 0;
    font-size: 18px;
    font-weight: 700;
}

.qty-btn:hover {
    transform: scale(1.05);
}

.qty-btn.qty-plus {
    background: #2BB75E;
}

.qty-btn.qty-plus:hover {
    background: #219a4e;
}

.qty-btn.qty-minus {
    background: #E6050D;
}

.qty-btn.qty-minus:hover {
    background: #cc0000;
}

.qty-input {
    width: 36px !important;
    height: 32px !important;
    border: none !important;
    background: transparent !important;
    text-align: center !important;
    text-align-last: center;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #FFFFFF !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    line-height: 32px !important;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ИТОГО */
.constructor-total {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.constructor-add-to-cart {
    padding: 15px 40px;
    background: #29B85C;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 20px;
    min-width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.constructor-add-to-cart:hover {
    background: #CC0000;
    transform: scale(1.02);
}

.constructor-add-to-cart img {
    width: 25px;
    height: 25px;
}

.constructor-add-to-cart.added-to-cart {
    background: transparent !important;
    padding: 5px !important;
    min-width: auto !important;
    cursor: default !important;
}

.constructor-add-to-cart .constructor-after-add {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.constructor-add-to-cart .constructor-go-menu,
.constructor-add-to-cart .constructor-go-checkout {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 25px !important;
    border-radius: 30px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    min-width: 130px !important;
    cursor: pointer !important;
}

.constructor-add-to-cart .constructor-go-menu {
    background: #ffffff !important;
    color: #E6050D !important;
    border: 2px solid #E6050D !important;
}

.constructor-add-to-cart .constructor-go-menu:hover {
    background: #E6050D !important;
    color: #ffffff !important;
}

.constructor-add-to-cart .constructor-go-checkout {
    background: #E6050D !important;
    color: #ffffff !important;
    border: 2px solid #E6050D !important;
}

.constructor-add-to-cart .constructor-go-checkout:hover {
    background: #CC0000 !important;
}

/* Уведомления */
.constructor-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.constructor-modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 35px 35px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.constructor-modal-content .constructor-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
}

.constructor-modal-content .constructor-modal-menu,
.constructor-modal-content .constructor-modal-checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    min-width: 150px;
    cursor: pointer;
}

.constructor-modal-content .constructor-modal-menu {
    background: #ffffff;
    color: #E6050D;
    border: 2px solid #E6050D;
}

.constructor-modal-content .constructor-modal-menu:hover {
    background: #E6050D;
    color: #ffffff;
}

.constructor-modal-content .constructor-modal-checkout {
    background: #E6050D;
    color: #ffffff;
    border: 2px solid #E6050D;
}

.constructor-modal-content .constructor-modal-checkout:hover {
    background: #CC0000;
}

.constructor-modal-content .constructor-modal-continue {
    margin-top: 20px;
    background: none;
    border: none;
    color: #898989;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

/* Адаптив */
@media (max-width: 768px) {
    .universal-constructor {
        margin: 12px auto;
    }
    .constructor-block {
        padding: 12px;
        border-radius: 14px;
        margin-bottom: 12px;
    }
    .constructor-block-title {
        font-size: 15px;
        margin-bottom: 10px;
    }
    .size-options, .dough-options {
        gap: 8px;
    }
    .size-btn, .dough-btn {
        padding: 10px 8px;
        font-size: 13px;
    }
    .constructor-total {
        flex-direction: column;
        gap: 12px;
        padding: 12px 0;
    }
    .constructor-add-to-cart {
        width: 100%;
        justify-content: center;
    }
    
    .constructor-modal-content {
        padding: 30px 16px 25px;
    }
    
    .constructor-modal-content .constructor-modal-menu,
    .constructor-modal-content .constructor-modal-checkout {
        width: 100%;
        min-width: auto;
    }
    
    .constructor-add-to-cart .constructor-after-add {
        flex-direction: column;
    }

    .constructor-block.sushi-block {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .constructor-block.sushi-block .sushi-addon {
        justify-content: space-between;
        width: 100%;
    }
}

.topping-item img[data-src],
.sauce-item img[data-src] {
    width: 80px;
    height: 80px;
    object-fit: cover;
    background: #fff;
}