/* PPF Groups CSS - v5 */

/* ===== ШАПКА ГРУППЫ ===== */
.ppf-group {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #fff;
}

.ppf-group-head {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fafafa;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
    gap: 16px;
}

/* Картинка - 60px */
.ppf-group-head-left {
    width: 60px !important;
    min-width: 60px !important;
    flex-shrink: 0;
}
.ppf-group-head-left img {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
    border-radius: 4px;
    background: #f5f5f5;
}

/* Название */
.ppf-group-title {
    flex: 1;
    min-width: 0;
}
.ppf-group-title a {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    text-decoration: none;
}
.ppf-group-title a:hover {
    color: #1565c0;
}

/* Артикул справа */
.ppf-group-head-right {
    flex-shrink: 0;
}
.ppf-group-sku {
    font-family: monospace;
    font-size: 13px;
    color: #666;
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 4px;
}

/* Скрываем итого группы */
.ppf-group-total {
    display: none !important;
}

/* ===== ЗАГОЛОВОК ТАБЛИЦЫ ===== */
.ppf-group-table-head {
    display: grid !important;
    grid-template-columns: 85px 95px 175px 65px 110px 40px !important;
    gap: 8px !important;
    padding: 10px 16px !important;
    background: #f5f5f5 !important;
    border-bottom: 1px solid #e0e0e0 !important;
    font-size: 11px !important;
    color: #666 !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
}
.ppf-group-table-head > div:nth-child(1) { text-align: left; padding-left: 5px; }
.ppf-group-table-head > div:nth-child(2) { text-align: left; }
.ppf-group-table-head > div:nth-child(3) { text-align: center; }
.ppf-group-table-head > div:nth-child(4) { text-align: center; }
.ppf-group-table-head > div:nth-child(5) { text-align: center; }
.ppf-group-table-head > div:nth-child(6) { text-align: center; }

/* ===== СТРОКА ТОВАРА ===== */
.ppf-group-body {
    padding: 0;
}

.wa-product {
    border-bottom: 1px solid #f0f0f0;
}
.wa-product:last-child {
    border-bottom: none;
}

.wa-product-body {
    display: grid !important;
    grid-template-columns: 85px 95px 175px 65px 110px 40px !important;
    gap: 8px !important;
    padding: 12px 16px !important;
    align-items: center !important;
}

/* Состояние */
.wa-column-details {
    padding-left: 5px !important;
}
.ppf-cond {
    font-size: 12px !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    display: inline-block !important;
}
.ppf-cond-new {
    background: #e3f2fd !important;
    color: #1565c0 !important;
}
.ppf-cond-used {
    background: #fff3e0 !important;
    color: #e65100 !important;
}

/* Цена за штуку */
.wa-column-unit-price {
    font-weight: 600 !important;
    color: #333 !important;
    font-size: 14px !important;
}

/* Количество */
.wa-column-quantity {
    text-align: center !important;
}
.wa-quantity-section {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
}
.wa-qty-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 18px !important;
    font-weight: normal !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #666 !important;
    border-radius: 4px !important;
}
.wa-qty-btn:hover {
    background: #f0f0f0 !important;
    color: #333 !important;
}
.wa-qty-input {
    width: 45px !important;
    height: 28px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    outline: none !important;
}
.wa-qty-input:focus {
    border-color: #999 !important;
}

/* Наличие */
.wa-column-stock {
}
.ppf-stock {
    font-weight: 600 !important;
    font-size: 13px !important;
    white-space: nowrap !important;
}
.ppf-stock.in-stock { color: #2e7d32 !important; }
.ppf-stock.low-stock { color: #f57c00 !important; }
.ppf-stock.out-of-stock, .ppf-stock.preorder { color: #1565c0 !important; }

/* Сумма */
.wa-column-price {
    text-align: right !important;
}
.wa-price-total {
    font-weight: 700 !important;
    font-size: 15px !important;
    color: #333 !important;
}

/* Удаление */
.wa-column-delete {
}
.ppf-remove-btn {
    width: 28px !important;
    height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    color: #bbb !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    transition: all 0.15s !important;
    text-decoration: none !important;
    background: transparent !important;
}
.ppf-remove-btn:hover {
    background: #ffebee !important;
    color: #c62828 !important;
}

/* ===== КНОПКИ ГРУППЫ ===== */
.ppf-group-actions {
    display: flex !important;
    gap: 10px !important;
    padding: 10px 16px !important;
    border-top: 1px dashed #e0e0e0 !important;
    background: #fafafa !important;
    border-radius: 0 0 8px 8px !important;
}
.ppf-add-btn {
    font-size: 13px !important;
    color: #fff !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    transition: opacity 0.15s !important;
}
.ppf-add-new { background: #2563eb !important; }
.ppf-add-used { background: #d97706 !important; }
.ppf-add-btn:hover { opacity: 0.85 !important; }

/* Кнопки экспорта */
