/* ============================================
   КОНСТРУКТОР ПИЦЦЫ - СОХРАНЯЕМ СТАРУЮ ВЕРСТКУ
   ============================================ */

/* Основной контейнер */
.pizza-constructor {
    max-width: 1200px;
    margin: 30px auto;
    background: #fff;
}

.pizza-block {
    padding: 20px;
    background: #EBEDEC;
    border-radius: 20px;
    margin-bottom: 20px;
}

.pizza-block:last-child {
    border-bottom: none;
}

.pizza-block-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    margin-top: 0px;
    color: #898989 !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pizza-block-title span {
    background: #B2B4B3;
    border-radius: 50%;
    color: #E9EBEA;
    width: 28px;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
}

/* ============================================
   БЛОК РАЗМЕРА - 3 ВАРИАНТА
   ============================================ */

.pizza-size-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.size-btn {
    flex: 1;
    min-width: 150px;
    padding: 5px 20px !important;
    border-radius: 15px;
    background: #D9DBDA !important;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    border: none;
}

.size-btn:hover {
    transform: translateY(-2px);
    color: #FDD2A7 !important;
    background: #E6050D !important;
}

.size-btn.active {
    color: #FDD2A7 !important;
    background: #E6050D !important;
}

.size-btn.active .size-name,
.size-btn.active .size-diam,
.size-btn.active .size-price {
    color: #FDD2A7 !important;
}

.size-btn:hover .size-name,
.size-btn:hover .size-diam,
.size-btn:hover .size-price {
    color: #FDD2A7 !important;
}

.size-name {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #898989;
}

.size-diam {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #898989;
}

.size-price {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #898989;
}

.size-btn-name {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

/* ============================================
   БЛОК ТЕСТА
   ============================================ */

.pizza-dough-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.dough-btn {
    flex: 1;
    align-items: center;
    min-width: 120px;
    padding: 9px 15px !important;
    border-radius: 15px;
    background: #D9DBDA !important;
    color: #898989 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    justify-content: center;
    border: none;
}

.dough-btn img {
    width: 60px;
    height: 30px;
    display: block;
    margin: 0 10px 0px;
}

.dough-btn:hover {
    color: #FDD2A7 !important;
    background: #E6050D !important;
    transform: translateY(-2px);
}

.dough-btn.active {
    color: #FDD2A7 !important;
    background: #E6050D !important;
}

/* ============================================
   БЛОК СОУСА
   ============================================ */

.pizza-sauce-toggle,
.pizza-toppings-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.sauce-toggle-btn,
.toppings-toggle-btn {
    padding: 8px 25px;
    border-radius: 30px;
    background: #fff !important;
    color: #898989 !important;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
}

.sauce-toggle-btn:hover,
.toppings-toggle-btn:hover {
    background: #E6050D !important;
    color: #F8D6A8 !important;
}

.sauce-toggle-btn.active,
.toppings-toggle-btn.active {
    background: #E6050D !important;
    color: #F8D6A8 !important;
}

.sauce-item-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.sauce-name {
    min-height: 3em;
}

.sauce-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
}

.sauce-item {
    min-width: 120px;
    padding: 10px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.sauce-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 10px;
}

.sauce-item.selected {
    border: 1px solid #73B285;
}

.sauce-select-btn {
    padding: 5px 15px;
    background: #E6050D;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
}

/* ============================================
   БЛОК ТОПИНГОВ
   ============================================ */

.toppings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.topping-item {
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 10px;
    background: #fff;
}

.topping-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 10px;
}

.topping-name {
    min-height: 3em;
}

.topping-item.selected {
    border: 1px solid #73B285;
}

/* ============================================
   ВЫБРАННЫЕ ТОПИНГИ
   ============================================ */

.selected-toppings-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.selected-topping-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #F5F5F5;
    border-radius: 10px;
    border: 1px solid #E8E8E8;
}

.selected-topping-item .remove-topping {
    width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    border-radius: 50%;
    padding: 10px 15px !important;
    background: #E6050D;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.selected-topping-item .remove-topping:hover {
    transform: scale(1.1);
    background: #CC0000;
}

.selected-topping-item .topping-cart-btn {
    background: #2BB75E;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 5px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    margin-left: auto;
}

.selected-topping-item .topping-cart-btn img {
    width: 16px;
    height: 16px;
}

/* ============================================
   ИТОГО
   ============================================ */

.pizza-total {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.pizza-total-price {
    font-size: 24px;
    font-weight: 700;
    color: #4F1D05;
}

.pizza-total-price .total-price {
    color: #E6050D;
    font-size: 28px;
}

.pizza-add-to-cart {
    padding: 15px 40px;
    background: #29B85C !important;
    color: #fff !important;
    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;
    justify-content: center;
    align-items: center;
}

.pizza-add-to-cart img {
    width: 25px;
    height: 25px;
}

.pizza-add-to-cart:hover {
    background: #CC0000;
    transform: scale(1.02);
}

.pizza-add-to-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.pizza-add-to-cart.added-to-cart {
    background: transparent !important;
    padding: 5px !important;
    min-width: auto !important;
    cursor: default !important;
}


.dough-btn img {
    width: 60px;
    height: 30px;
    display: block;
    margin: 0 10px 0px;
}

/* ============================================
   КНОПКИ ПОСЛЕ ДОБАВЛЕНИЯ
   ============================================ */

.pizza-after-add {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.pizza-go-menu,
.pizza-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;
}

.pizza-go-menu {
    background: #ffffff !important;
    color: #E6050D !important;
    border: 2px solid #E6050D !important;
}

.pizza-go-menu:hover {
    background: #E6050D !important;
    color: #ffffff !important;
}

.pizza-go-checkout {
    background: #E6050D !important;
    color: #ffffff !important;
    border: 2px solid #E6050D !important;
}

.pizza-go-checkout:hover {
    background: #CC0000 !important;
}

/* ============================================
   АНИМАЦИИ
   ============================================ */

.pizza-toppings-list,
.pizza-sauce-list {
    transition: all 0.3s ease;
}

/* ============================================
   УВЕДОМЛЕНИЯ
   ============================================ */

.pizza-notification {
    font-family: inherit;
    font-weight: 500;
}

.pizza-notification.success {
    background: #2BB75E !important;
}

.pizza-notification.error {
    background: #E6050D !important;
}

/* ============================================
   АДАПТИВ
   ============================================ */

@media (max-width: 768px) {
    .pizza-size-options {
        flex-direction: column;
    }
    .selected-toppings-list {
        grid-template-columns: 1fr;
    }
    .pizza-total {
        flex-direction: column;
        gap: 15px;
    }
    .pizza-after-add {
        flex-direction: column;
    }
}