/* 1. ГЛОБАЛЬНЫЕ НАСТРОЙКИ И СЕТКА */
.b2b-grid {
    background: #ffffff;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.container.py-5 {
    padding-bottom: 140px !important; /* Отступ под Sticky Bar */
}

/* 2. КАРТОЧКА ТОВАРА */
.item-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.item-card:hover {
    border-color: #00b894;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

.image-hover-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
    border-radius: 18px;
    overflow: hidden;
}

.image-hover-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
}

.image-hover-wrapper:hover img {
    transform: scale(1.05);
}

/* 3. СОСТАВ (СЕТКА 120px) */
.composition-showcase {
    background: #f8fafd;
    border-radius: 18px;
    padding: 15px;
}

.ingredients-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.ing-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    border: 1px solid #f0f3f7;
}

.ing-icon-mini {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 5px;
}

.ing-name {
    font-size: 10px;
    font-weight: 600;
    color: #636e72;
}

/* 4. УПРАВЛЕНИЕ ЗАКАЗОМ */
.price-tag {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2d3436;
    margin: 15px 0;
}

.qty-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f3f8;
    border-radius: 14px;
    padding: 5px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: #fff;
    font-weight: bold;
    transition: 0.2s;
}

.qty-btn:hover { background: #00b894; color: #fff; }

.qty-input-field {
    border: none;
    background: transparent;
    text-align: center;
    width: 60px;
    font-weight: 800;
    font-size: 1.1rem;
}

/* 5. ФОРМА РЕКВИЗИТОВ */
.b2b-checkout-card {
    border: 1px solid #eef2f7;
    border-radius: 24px;
    background: #fff;
}

.form-control-custom {
    width: 100%;
    border: 2px solid #f1f3f8;
    padding: 14px 20px;
    border-radius: 14px;
    background: #f8fafd;
    transition: 0.3s;
}

.form-control-custom:focus {
    border-color: #00b894;
    background: #fff;
    outline: none;
}

/* 6. STICKY BOTTOM BAR */
.sticky-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 1px solid #eef2f7;
    z-index: 1000;
}

.summary-icon-box {
    width: 44px;
    height: 44px;
    background: #f1f3f8;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-label { font-size: 10px; font-weight: 800; color: #b2bec3; letter-spacing: 0.5px; }
.summary-value { font-size: 1.4rem; font-weight: 900; color: #2d3436; }
.text-success { color: #00b894 !important; }
.summary-divider { width: 1px; height: 40px; background: #eef2f7; }

.btn-order-submit-final {
    background: #00b894;
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 16px;
    font-weight: 800;
    transition: 0.3s;
}

.btn-order-submit-final:disabled { background: #b2bec3; opacity: 0.6; }


.btn-order-submit-final:not(:disabled) {
    background: #00b894;
    box-shadow: 0 8px 20px rgba(0, 184, 148, 0.3);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.fixed-b2b-contact {
        position: fixed;
        bottom: 110px; /* Над нижним баром */
        right: 25px;
        z-index: 1001;
        display: flex;
        justify-content: flex-end;
        width: auto;
    }
    .b2b-whatsapp-button {
        display: flex;
        align-items: center;
        background: #25D366;
        color: white !important;
        text-decoration: none;
        padding: 6px 18px 6px 6px;
        border-radius: 50px;
        font-weight: 600;
        font-size: 14px;
        box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
        transition: all 0.3s ease;
        /* Ограничиваем ширину, чтобы не была слишком длинной */
        max-width: 280px; 
        white-space: nowrap;
    }
    .b2b-whatsapp-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 25px rgba(37, 211, 102, 0.4);
    }
    .wa-icon-box {
        background: rgba(255,255,255,0.2);
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 10px;
        flex-shrink: 0;
    }
    @media (max-width: 768px) {
        .fixed-b2b-contact {
            right: 15px;
            bottom: 100px;
        }
        .b2b-whatsapp-button {
            max-width: 220px; /* На мобилках еще аккуратнее */
            font-size: 13px;
            padding: 5px 15px 5px 5px;
        }
        /* Если хочешь совсем компактно на очень маленьких экранах, 
           раскомментируй код ниже, чтобы оставить только иконку */
        .b2b-btn-text { display: none; }
        .b2b-whatsapp-button { padding: 5px; max-width: 42px; }
        .wa-icon-box { margin-right: 0; }
    }

.sticky-bottom-bar {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-top: 1px solid #e2e8f0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }