/* ==========================================================================
   UPP Pumps - Marketplace & Trade Portal Stylesheet
   Matches existing UPP design system (Bootstrap, Roboto/Open Sans, Blue Palette)
   ========================================================================== */

:root {
    --upp-primary: #022187;
    --upp-primary-dark: #011a6f;
    --upp-primary-light: #022187;
    --upp-accent: #022187;
    --upp-bg-light: #f8fafc;
    --upp-card-border: #e2e8f0;
    --upp-text-dark: #1A2A36;
    --upp-text-muted: #64748b;
}

/* --- Marketplace General Utilities --- */
.marketplace-container {
    padding-top: 40px;
    padding-bottom: 60px;
}

.shop-header-banner {
    background-color: #022187 !important;
    background: #022187 !important;
}

.btn-cart-header {
    background-color: rgba(0, 0, 0, 0.5) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-cart-header:hover {
    background-color: rgba(0, 0, 0, 0.75) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
    transform: translateY(-1px);
}

.card-upp {
    background: #ffffff;
    border: 1px solid var(--upp-card-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(2, 33, 135, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-upp:hover {
    box-shadow: 0 8px 24px rgba(2, 33, 135, 0.12);
}

.card-header-upp {
    background: #022187;
    color: #ffffff;
    padding: 1.25rem 1.5rem;
    border-top-left-radius: 7px;
    border-top-right-radius: 7px;
    font-weight: 600;
}

/* --- Badges --- */
.badge-status {
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.badge-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.badge-approved, .badge-active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge-rejected, .badge-suspended, .badge-cancelled {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.badge-submitted, .badge-reviewing {
    background-color: #e0f2fe;
    color: #022187;
    border: 1px solid #b8daff;
}

.badge-invoiced {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.badge-paid, .badge-dispatched {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.badge-sku {
    background: #f1f5f9;
    color: #334155;
    font-family: monospace;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
}

.badge-gtin {
    background: #eff6ff;
    color: var(--upp-primary);
    font-family: monospace;
    font-size: 0.8rem;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid #dbeafe;
}

/* --- Product Cards in Shop --- */
.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.25s ease;
}

.product-card:hover {
    border-color: var(--upp-primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(2, 33, 135, 0.12);
}

.product-card-img-wrap {
    height: 200px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.product-card-img-wrap img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-card-body {
    padding: 1.25rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.product-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--upp-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-card-desc {
    font-size: 0.875rem;
    color: var(--upp-text-muted);
    margin-bottom: 1rem;
    flex: 1 1 auto;
}

.product-card-footer {
    padding: 1rem 1.25rem;
    background: #fafafa;
    border-top: 1px solid #f1f5f9;
}

.price-tag {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--upp-primary);
}

/* --- Filter & Category Pills --- */
.category-filter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.category-filter-nav .btn {
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    border-color: var(--upp-primary);
    color: var(--upp-primary);
    background-color: transparent;
}

.category-filter-nav .btn:hover {
    background-color: var(--upp-primary) !important;
    color: #ffffff !important;
}

.category-filter-nav .btn.active {
    background-color: var(--upp-primary) !important;
    color: #ffffff !important;
    border-color: var(--upp-primary) !important;
}

/* --- Cart & Tables --- */
.table-upp {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-upp th {
    background-color: #f1f5f9;
    color: #334155;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 2px solid #e2e8f0;
}

.table-upp td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
}

.table-upp tbody tr:hover {
    background-color: #f8fafc;
}

.qty-input-group {
    max-width: 130px;
}

/* --- Account Gateway Tabs --- */
.nav-tabs-upp {
    border-bottom: 2px solid var(--upp-primary);
}

.nav-tabs-upp .nav-link {
    color: var(--upp-text-muted);
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 24px;
    margin-bottom: -2px;
}

.nav-tabs-upp .nav-link.active {
    color: var(--upp-primary);
    border-bottom-color: var(--upp-primary);
    background: transparent;
}

/* --- Notice Banners --- */
.trade-notice-banner {
    background: #e0f2fe;
    border-left: 4px solid var(--upp-primary);
    padding: 16px 20px;
    border-radius: 4px;
    margin-bottom: 24px;
    color: #022187;
}

.trade-notice-banner p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* --- Admin Stats Box --- */
.stat-card {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.stat-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 16px;
}

.stat-card-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--upp-primary);
    line-height: 1;
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--upp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}
