/**
 * Toptanburda Professional B2B Marketplace Theme & Design System
 * Inspired by Trendyol navigation/discovery & Alibaba/Faire B2B commerce
 * Standards: PHP 8.3, Bootstrap 5.3, WCAG 2.2 AA Contrast, 0 Horizontal Overflow
 */

/* ==========================================================================
   1. DESIGN TOKENS & CSS CUSTOM PROPERTIES
   ========================================================================== */
:root {
    /* Brand & Primary Corporate Palette */
    --tb-navy-950: #020617;
    --tb-navy-900: #0f172a;
    --tb-navy-800: #1e293b;
    --tb-navy-700: #334155;
    --tb-navy-600: #475569;
    
    --tb-primary-900: #1e3a8a;
    --tb-primary-800: #1e40af;
    --tb-primary-700: #1d4ed8;
    --tb-primary-600: #2563eb;
    --tb-primary-500: #3b82f6;
    --tb-primary-100: #dbeafe;
    --tb-primary-50:  #eff6ff;

    --tb-accent-700: #0369a1;
    --tb-accent-600: #0284c7;
    --tb-accent-500: #0ea5e9;
    --tb-accent-50:  #f0f9ff;

    /* Semantic / Trust Status */
    --tb-success-700: #047857;
    --tb-success-600: #059669;
    --tb-success-500: #10b981;
    --tb-success-50:  #ecfdf5;

    --tb-warning-700: #b45309;
    --tb-warning-600: #d97706;
    --tb-warning-500: #f59e0b;
    --tb-warning-50:  #fffbeb;

    --tb-danger-600: #dc2626;
    --tb-danger-500: #ef4444;
    --tb-danger-50:  #fef2f2;

    /* Neutral Surfaces & Borders */
    --tb-bg-canvas: #f8fafc;
    --tb-surface: #ffffff;
    --tb-surface-alt: #f1f5f9;
    --tb-border: #e2e8f0;
    --tb-border-subtle: #f1f5f9;
    --tb-border-focus: #3b82f6;

    /* Text Colors (High Contrast WCAG AA) */
    --tb-text-primary: #0f172a;
    --tb-text-secondary: #475569;
    --tb-text-muted: #64748b;
    --tb-text-inverted: #ffffff;

    /* Typography */
    --tb-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --tb-font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Elevation Shadows */
    --tb-shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --tb-shadow-sm: 0 2px 4px -1px rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
    --tb-shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
    --tb-shadow-lg: 0 10px 25px -4px rgba(15, 23, 42, 0.10), 0 4px 10px -4px rgba(15, 23, 42, 0.05);
    --tb-shadow-hover: 0 16px 32px -6px rgba(30, 64, 175, 0.12), 0 6px 12px -4px rgba(15, 23, 42, 0.06);

    /* Radii */
    --tb-radius-xs: 4px;
    --tb-radius-sm: 8px;
    --tb-radius-md: 12px;
    --tb-radius-lg: 16px;
    --tb-radius-pill: 9999px;

    /* Layout Offsets */
    --tb-bottom-nav-height: 60px;
}

/* ==========================================================================
   2. GLOBAL TYPOGRAPHY & RESET
   ========================================================================== */
html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
    min-width: 0;
}

body {
    font-family: var(--tb-font-sans);
    color: var(--tb-text-primary);
    background-color: var(--tb-bg-canvas);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100%;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--tb-font-heading);
    color: var(--tb-text-primary);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

a {
    color: var(--tb-primary-700);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--tb-primary-800);
}

/* ==========================================================================
   3. APP-LIKE MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */
.tb-mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--tb-bottom-nav-height);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--tb-border);
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
    z-index: 1045;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 0.25rem;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 992px) {
    .tb-mobile-bottom-nav {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    body {
        padding-bottom: calc(var(--tb-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 8px) !important;
    }
}

.tb-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--tb-text-secondary);
    text-decoration: none;
    padding: 4px 0;
    position: relative;
    font-size: 0.68rem;
    font-weight: 500;
    transition: color 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.tb-bottom-nav-item .tb-nav-icon {
    font-size: 1.25rem;
    line-height: 1;
    margin-bottom: 2px;
    position: relative;
}

.tb-bottom-nav-item.active,
.tb-bottom-nav-item:hover,
.tb-bottom-nav-item:focus {
    color: var(--tb-primary-600);
}

.tb-bottom-nav-item.active .tb-nav-icon {
    transform: scale(1.08);
}

/* Center Highlight Button for RFQ / Teklif İste */
.tb-bottom-nav-item.tb-nav-highlight {
    color: var(--tb-primary-700);
}

.tb-bottom-nav-item.tb-nav-highlight .tb-nav-icon-highlight {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tb-primary-600) 0%, var(--tb-primary-800) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    margin-top: -12px;
    margin-bottom: 2px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tb-bottom-nav-item.tb-nav-highlight:active .tb-nav-icon-highlight {
    transform: scale(0.92);
}

.tb-bottom-nav-badge {
    position: absolute;
    top: -2px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: var(--tb-danger-600);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ==========================================================================
   4. STANDARDIZED PRODUCT CARD (TRENDYOL / B2B HYBRID)
   ========================================================================== */
.market-product-card {
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    background: var(--tb-surface);
    box-shadow: var(--tb-shadow-xs);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.market-product-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--tb-shadow-hover);
    transform: translateY(-4px);
}

.market-product-media {
    position: relative;
    width: 100%;
    background: #f8fafc;
    overflow: hidden;
}

.market-product-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: #ffffff;
}

.market-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.market-product-card:hover .market-product-image {
    transform: scale(1.04);
}

/* Top Left Badge */
.market-product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 3px 8px;
    border-radius: var(--tb-radius-xs);
    z-index: 2;
    background: var(--tb-navy-900);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Favorite Heart Button */
.market-product-favorite {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--tb-border);
    color: var(--tb-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    z-index: 2;
    transition: all 0.15s ease;
    box-shadow: var(--tb-shadow-xs);
}

.market-product-favorite:hover,
.market-product-favorite.active {
    color: var(--tb-danger-600);
    background: #ffffff;
    transform: scale(1.1);
}

/* Card Body */
.market-product-body {
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.market-product-copy {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Title clamp */
.market-product-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.market-product-title-link {
    color: var(--tb-text-primary);
    text-decoration: none;
}

.market-product-title-link:hover {
    color: var(--tb-primary-700);
}

/* Supplier Store Row */
.market-product-seller-row {
    font-size: 0.78rem;
    color: var(--tb-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}

.market-product-seller-link {
    color: var(--tb-text-secondary) !important;
    font-weight: 500;
    text-decoration: none;
}

.market-product-seller-link:hover {
    color: var(--tb-primary-600) !important;
}

/* Price Row */
.market-product-price-row {
    margin-top: auto;
    padding-top: 0.4rem;
    margin-bottom: 0.45rem;
}

.market-product-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tb-navy-900);
    letter-spacing: -0.01em;
    line-height: 1.2;
    display: block;
}

/* B2B Specs Pill (MOQ & Stock) */
.market-product-meta-list {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--tb-text-muted);
    background: var(--tb-bg-canvas);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-xs);
    padding: 4px 8px;
    margin-bottom: 0.65rem;
}

.market-product-meta-list strong {
    color: var(--tb-text-primary);
    font-weight: 600;
}

/* Card Action Footer */
.market-product-footer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.market-card-cta.market-product-add {
    flex-grow: 1;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
    border-radius: var(--tb-radius-sm);
    background-color: var(--tb-primary-700);
    border-color: var(--tb-primary-700);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.market-card-cta.market-product-add:hover {
    background-color: var(--tb-primary-800);
    border-color: var(--tb-primary-800);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(30, 64, 175, 0.25);
}

.market-product-wish {
    width: 36px;
    height: 36px;
    border-radius: var(--tb-radius-sm);
    border: 1px solid var(--tb-border);
    background: #ffffff;
    color: var(--tb-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.15s ease;
}

.market-product-wish:hover {
    border-color: var(--tb-danger-500);
    color: var(--tb-danger-600);
    background: var(--tb-danger-50);
}

/* ==========================================================================
   5. CATALOG LISTING & FILTERS (TRENDYOL-STYLE POLISH)
   ========================================================================== */
.market-page {
    padding-bottom: 3rem;
}

.market-sidebar-col .card {
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    box-shadow: var(--tb-shadow-xs);
    background: var(--tb-surface);
}

.market-filter-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--tb-text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.market-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--tb-primary-50);
    border: 1px solid var(--tb-primary-100);
    color: var(--tb-primary-800);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--tb-radius-pill);
    margin: 2px;
}

.market-filter-chip a {
    color: var(--tb-primary-800);
    opacity: 0.7;
}

.market-filter-chip a:hover {
    opacity: 1;
}

/* Toolbar */
.market-toolbar-wrapper {
    background: var(--tb-surface);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--tb-shadow-xs);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.market-count-badge {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--tb-text-muted);
}

.market-count-badge span {
    color: var(--tb-text-primary);
    font-weight: 700;
}

/* 4-column responsive grid on large screens, 2-column on mobile */
@media (max-width: 575.98px) {
    .market-main-col .row > [class*="col-"] {
        padding-left: 5px;
        padding-right: 5px;
    }
    .market-product-body {
        padding: 0.65rem;
    }
    .market-product-title {
        font-size: 0.82rem;
        min-height: 2.5em;
    }
    .market-product-price {
        font-size: 1rem;
    }
    .market-card-cta.market-product-add {
        font-size: 0.72rem;
        padding: 0.38rem 0.5rem;
    }
}

/* ==========================================================================
   6. PRODUCT DETAIL PAGE (B2B 3-COLUMN & STICKY QUOTE BOX)
   ========================================================================== */
.tb-detail-gallery-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: var(--tb-shadow-xs);
}

.tb-detail-gallery-main img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.tb-detail-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.tb-detail-thumb-btn {
    width: 64px;
    height: 64px;
    border-radius: var(--tb-radius-sm);
    border: 2px solid var(--tb-border);
    background: #ffffff;
    padding: 3px;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s ease;
}

.tb-detail-thumb-btn.active,
.tb-detail-thumb-btn:hover {
    border-color: var(--tb-primary-600);
}

.tb-detail-thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Sticky B2B RFQ Quote Card */
.tb-detail-quote-card {
    position: sticky;
    top: calc(var(--tb-top-bar-height, 40px) + var(--tb-main-header-height, 84px) + 16px);
    background: var(--tb-surface);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-lg);
    box-shadow: var(--tb-shadow-md);
    padding: 1.5rem;
    z-index: 10;
}

.tb-detail-tier-table {
    width: 100%;
    margin-bottom: 1rem;
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-sm);
    overflow: hidden;
    font-size: 0.85rem;
}

.tb-detail-tier-table th {
    background: var(--tb-bg-canvas);
    color: var(--tb-text-secondary);
    font-weight: 600;
    padding: 6px 10px;
    border-bottom: 1px solid var(--tb-border);
}

.tb-detail-tier-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--tb-border-subtle);
    color: var(--tb-text-primary);
    font-weight: 600;
}

/* Mobile Sticky Bottom CTA Bar on Product Detail */
.tb-product-mobile-bar {
    position: fixed;
    bottom: var(--tb-bottom-nav-height);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--tb-border);
    box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.08);
    padding: 8px 16px;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

@media (min-width: 992px) {
    .tb-product-mobile-bar {
        display: none !important;
    }
}

/* ==========================================================================
   7. CORPORATE SUPPLIER & STORE CARDS
   ========================================================================== */
.tb-supplier-card {
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    background: var(--tb-surface);
    padding: 1.25rem;
    box-shadow: var(--tb-shadow-xs);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tb-supplier-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--tb-shadow-hover);
    transform: translateY(-3px);
}

.tb-supplier-avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--tb-radius-sm);
    object-fit: contain;
    background: #ffffff;
    border: 1px solid var(--tb-border);
    padding: 4px;
    flex-shrink: 0;
}

.tb-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--tb-success-700);
    background: var(--tb-success-50);
    border: 1px solid #a7f3d0;
    padding: 2px 7px;
    border-radius: var(--tb-radius-pill);
}

/* ==========================================================================
   8. CLEAN B2B AUTH & ONBOARDING FORMS
   ========================================================================== */
.tb-auth-card {
    background: var(--tb-surface);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-lg);
    box-shadow: var(--tb-shadow-lg);
    padding: 2.25rem;
}

.tb-auth-nav-pills {
    display: flex;
    background: var(--tb-bg-canvas);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-pill);
    padding: 4px;
    margin-bottom: 1.5rem;
}

.tb-auth-nav-pill {
    flex: 1;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--tb-radius-pill);
    color: var(--tb-text-secondary);
    transition: all 0.15s ease;
}

.tb-auth-nav-pill.active {
    background: var(--tb-surface);
    color: var(--tb-primary-700);
    box-shadow: var(--tb-shadow-sm);
}

/* ==========================================================================
   9. HOMEPAGE SHOWCASE & HERO POLISH
   ========================================================================== */
.tb-hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #ffffff;
    padding: 3.5rem 0 3rem;
    border-radius: 0 0 var(--tb-radius-lg) var(--tb-radius-lg);
    margin-bottom: 2rem;
}

.tb-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    border-left: 4px solid var(--tb-primary-600);
    padding-left: 0.75rem;
}

.tb-section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--tb-navy-900);
}

.tb-section-view-all {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tb-primary-600);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.15s ease;
}

.tb-section-view-all:hover {
    color: var(--tb-primary-800);
    transform: translateX(3px);
}

/* ==========================================================================
   10. MARKETPLACE POLISH: CATEGORY, SELLERS, CARDS & OVERFLOW GUARDS
   ========================================================================== */

/* Zero Horizontal Overflow Enforcer */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Category Hero & Subcategory Nav */
.tb-category-hero {
    background-color: var(--tb-surface);
    border-bottom: 1px solid var(--tb-border);
}

.tb-category-subnav a:hover {
    background-color: var(--tb-primary-50) !important;
    border-color: var(--tb-primary-500) !important;
    color: var(--tb-primary-700) !important;
}

/* Product Card Grid Alignment & Overlap Prevention */
.market-product-card {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--tb-surface) !important;
    border: 1px solid var(--tb-border) !important;
    border-radius: var(--tb-radius-md) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.market-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--tb-shadow-hover) !important;
    border-color: #cbd5e1 !important;
}

.market-product-card .market-product-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8fafc;
    border-top-left-radius: calc(var(--tb-radius-md) - 1px);
    border-top-right-radius: calc(var(--tb-radius-md) - 1px);
}

.market-product-card .market-product-image-wrap {
    width: 100%;
    height: 100%;
}

.market-product-card .market-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.market-product-card:hover .market-product-image {
    transform: scale(1.04);
}

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

.market-product-card .market-product-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.7em;
}

.market-product-card .market-product-title-link {
    color: var(--tb-text-primary);
    text-decoration: none;
}

.market-product-card .market-product-title-link:hover {
    color: var(--tb-primary-600);
}

.market-product-card .market-product-price-row {
    margin-top: auto;
    padding-top: 0.35rem;
}

.market-product-card .market-product-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--tb-primary-700);
}

.market-product-card .market-product-footer {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--tb-border-subtle);
}

.market-product-card .market-card-cta {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.5rem;
    border-radius: var(--tb-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Sellers Grid & Card Polish */
.b2b-sellers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.b2b-seller-card {
    background: var(--tb-surface);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-md);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--tb-shadow-xs);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.b2b-seller-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--tb-shadow-hover);
    border-color: #cbd5e1;
}

.b2b-seller-header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    margin-bottom: 1rem;
    background: #f8fafc;
    border-radius: var(--tb-radius-sm);
    padding: 0.5rem;
}

.b2b-seller-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.b2b-seller-logo-placeholder {
    font-size: 2rem;
    color: var(--tb-text-muted);
}

.b2b-seller-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--tb-text-primary);
    margin-bottom: 0.35rem;
}

.b2b-seller-location {
    font-size: 0.82rem;
    color: var(--tb-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0.5rem;
}

.b2b-seller-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--tb-text-muted);
    margin-bottom: 0.75rem;
}

.b2b-seller-btn {
    margin-top: auto;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tb-primary-600);
    background: var(--tb-primary-50);
    border: 1px solid var(--tb-primary-100);
    border-radius: var(--tb-radius-sm);
    text-decoration: none;
    transition: all 0.15s ease;
}

.b2b-seller-btn:hover {
    color: #ffffff;
    background: var(--tb-primary-600);
    border-color: var(--tb-primary-600);
}

/* Auth Cards & Forms Polish */
.tb-auth-card {
    background: var(--tb-surface);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-lg);
    box-shadow: var(--tb-shadow-md);
    padding: 2.25rem;
}

.tb-auth-card .form-control {
    border-radius: var(--tb-radius-sm);
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--tb-border);
    font-size: 0.95rem;
}

.tb-auth-card .form-control:focus {
    border-color: var(--tb-primary-500);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.tb-auth-card .btn-primary {
    border-radius: var(--tb-radius-sm);
    padding: 0.75rem 1rem;
    font-weight: 600;
}

/* Strict Zero Horizontal Overflow & Grid Safety */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.market-grid {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.market-grid > .market-grid-col {
    padding-left: 6px !important;
    padding-right: 6px !important;
    max-width: 100% !important;
}


