/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 🔒 MAGNO PLATFORM: Standard Design System (v1.0)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * This stylesheet synchronizes common UI components across all themes.
 * It uses a variable bridging technique to inherit theme colors.
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

:root {
    /* ── Variable Bridge ─────────────────────────────────────────── */
    --std-primary: var(--primary, #d4af37);
    --std-primary-rgb: var(--primary-rgb, 212, 175, 55);
    --std-card-bg: var(--card-bg, #0a0a0a);
    --std-border: var(--border-color, #222);
    --std-text-muted: var(--text-muted, #94a3b8);
    --std-white: #ffffff;
    --std-black: #000000;
}

/* ── 1. VENDOR REGISTRY (Grid & Cards) ────────────────────────── */
.vendor-registry-grid { 
    display: grid !important; 
    grid-template-columns: repeat(3, 1fr) !important; 
    gap: 25px !important; 
    margin: 20px auto !important;
    max-width: 1200px !important;
    width: 100% !important;
}

.vendor-card { 
    background: var(--std-card-bg) !important; 
    border: 1px solid var(--std-border) !important; 
    padding: 25px !important; 
    text-align: center !important; 
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; 
    text-decoration: none !important; 
    position: relative !important; 
    overflow: hidden !important; 
    display: flex !important;
    flex-direction: column !important;
    border-radius: 12px !important; 
    height: 100% !important;
}

.vendor-card:hover { 
    border-color: var(--std-primary) !important; 
    transform: translateY(-5px) !important; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.3) !important; 
}

.vendor-avatar { 
    width: 64px !important; 
    height: 64px !important; 
    background: rgba(var(--std-primary-rgb), 0.05) !important; 
    border: 1px solid var(--std-primary) !important; 
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    margin: 0 auto 15px auto !important; 
    border-radius: 50% !important; 
    color: var(--std-primary) !important; 
    overflow: hidden !important; 
}

.vendor-avatar img { width: 100% !important; height: 100% !important; object-fit: contain !important; }

.vendor-name { 
    display: block !important; 
    color: var(--std-white) !important; 
    font-size: 1.1rem !important; 
    font-weight: 800 !important; 
    text-transform: uppercase !important; 
    letter-spacing: 1px !important; 
    margin-bottom: 5px !important; 
}

.vendor-rank { 
    font-size: 0.65rem !important; 
    color: var(--std-primary) !important; 
    text-transform: uppercase !important; 
    letter-spacing: 2px !important; 
    margin-bottom: 15px !important; 
    font-weight: 700 !important;
}

.vendor-stats { 
    display: flex !important; 
    justify-content: center !important; 
    gap: 15px !important;
    margin-top: auto !important; 
    padding-top: 15px !important; 
    border-top: 1px solid rgba(255,255,255,0.05) !important; 
    font-size: 10px !important; 
    color: var(--std-text-muted) !important; 
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* ── 2. VENDOR PROFILE COMPONENTS ───────────────────────────── */
.apex-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 4px;
}
.apex-trust {
    color: var(--std-primary);
    background: rgba(var(--std-primary-rgb), 0.1);
    border: 1px solid rgba(var(--std-primary-rgb), 0.2);
}

.tab-btn {
    transition: 0.2s !important;
    border-bottom: 3px solid transparent !important;
}
.tab-btn.active {
    color: var(--std-primary) !important;
    border-bottom: 3px solid var(--std-primary) !important;
}

.vendor-product-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
}

/* ── 3. UNIFIED PRODUCT CARD SYSTEM ─────────────────────────── */
.product-card-master {
    background: var(--std-card-bg) !important;
    border: 1px solid var(--std-border) !important;
    padding: 0 !important;
    border-radius: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    height: 100% !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: 0.2s !important;
}

.product-card-master:hover {
    transform: translateY(-5px) !important;
    border-color: var(--std-primary) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
}

.product-card-visual {
    width: 100% !important;
    height: 180px !important;
    overflow: hidden !important;
    background: #111 !important;
}

.product-card-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: 0.5s !important;
}

.product-card-master:hover .product-card-img {
    transform: scale(1.1) !important;
}

.product-card-content {
    padding: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    flex: 1 !important;
}

.product-card-title {
    font-size: 14px !important;
    font-weight: 800 !important;
    color: var(--std-white) !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.product-card-price {
    font-size: 1rem !important;
    font-weight: 900 !important;
    color: var(--std-primary) !important;
    font-family: 'JetBrains Mono', monospace !important;
}

.product-card-meta {
    font-size: 10px !important;
    color: var(--std-text-muted) !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

/* ── 4. RESPONSIVENESS INJECTIONS (LOCKED RULES) ─────────────── */
/* Scoped Suppression: Only targets grids and sidebars within marketplace pages */
@media (max-width: 1024px) {
    /* Hide sidebars on mobile as requested, but only generic sidebars */
    aside, .sidebar, .filter-sidebar, .registry-sidebar {
        display: none !important;
    }
}

/* Enforce 3:2 Column Rule: Strictly scoped to marketplace grids */
.vendor-registry-grid, .vendor-product-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 1024px) {
    .vendor-registry-grid, .vendor-product-grid { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 15px !important; 
    }
}

@media (max-width: 768px) {
    .vendor-registry-grid, .vendor-product-grid { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 12px !important; 
    }
    .vendor-card { padding: 15px !important; }
}

@media (max-width: 480px) {
    .vendor-registry-grid, .vendor-product-grid { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 6px !important; 
    }
    .vendor-avatar { width: 40px !important; height: 40px !important; }
    .vendor-name { font-size: 0.8rem !important; height: auto !important; line-height: 1.2 !important; }
    .vendor-stats { font-size: 7px !important; gap: 4px !important; padding-top: 10px !important; }
}

/* ── 5. UTILITY CLASSES (Softened specificity) ────────────────── */
.btn-solid-blue, .btn-primary-std {
    background: var(--std-primary);
    color: var(--std-black);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    border: none;
}

.btn-solid-blue:hover {
    transform: scale(1.02);
    opacity: 0.9;
}
