/* Container bao phủ chính */
.flag-products-container {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    max-width: 1400px;
    margin: 0 auto;
}

/* Header tiêu đề danh mục */
.flag-products-header {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 16px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.flag-main-title {
    margin: 0;
    font-size: 22px;
    color: #0f172a;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.flag-total-badge {
    font-size: 13px;
    color: #475569;
    background: #f1f5f9;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
}

/* Lưới hiển thị danh sách sản phẩm */
.products-flex-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

/* Thẻ sản phẩm con */
.product-item-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

.card-platform-banner {
    background: #f8fafc;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f1f5f9;
}

.platform-badge-name {
    font-weight: 700;
    background: #1552a3;
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
}

.card-content-body {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-inner-title {
    font-size: 14.5px;
    margin: 0 0 10px 0;
    line-height: 1.5;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-inner-title a {
    color: #334155;
    text-decoration: none;
    font-weight: 700;
}

.product-inner-title a:hover {
    color: #1552a3;
}

.product-info-subrow {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
}

.product-inner-price {
    color: #dc2626;
    font-weight: 700;
    font-size: 16px;
    margin: 4px 0 12px 0;
}

.delivery-status-box {
    margin-top: auto;
}

.status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}

.badge-automatic {
    background: #ecfdf5;
    color: #065f46;
}

.badge-manual {
    background: #fffbec;
    color: #92400e;
}

.card-action-footer {
    padding: 0 16px 16px 16px;
}

.btn-action-view {
    width: 100%;
    background: #1552a3;
    color: #ffffff;
    border: none;
    padding: 9px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.btn-action-view:hover {
    background: #0f3d7a;
}

.empty-results-text {
    grid-column: 1 / -1;
    text-align: center;
    color: #94a3b8;
    padding: 40px 0;
    font-style: italic;
    font-size: 15px;
}

/* ================= PHÂN TRANG ================= */
.flag-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.pag-btn, .pag-num {
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #1552a3;
    text-decoration: none;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.15s ease;
}

.pag-btn:hover, .pag-num:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.pag-num.is-active {
    border-color: #1552a3;
    background: #1552a3;
    color: #ffffff;
    font-weight: 700;
}

@media (max-width: 576px) {
    .products-flex-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
}